Ansicht
Dokumentation

ABENCDS_F1_DEFINE_ABSTRACT_ENTITY - CDS F1 DEFINE ABSTRACT ENTITY

ABENCDS_F1_DEFINE_ABSTRACT_ENTITY - CDS F1 DEFINE ABSTRACT ENTITY

CPI1466 during Backup   CL_GUI_FRONTEND_SERVICES - Frontend Services  
This documentation is copyright by SAP AG.
SAP E-Book

- DEFINE ABSTRACT ENTITY

$[@entity_annot1$]
$[@entity_annot2$]
...
$[DEFINE$] $[ROOT$] ABSTRACT ENTITY abstract_entity
         $[ parameter_list$]
          element_list$[;$]


Effect

Defines an CDS abstract entity abstract_entity in CDS DDL. When a CDS abstract entity is activated, its metadata is created but no other object instances are created on the database or in AS ABAP. The name abstract_entity must comply with the naming conventions for dictionary types and can have a maximum of 30 characters.

  • parameter_list is used to declare a list of optional input parameters for the CDS abstract entity.
  • element_list is used to declare elements, CDS associations, CDS compositions, and CDS-to-parent associations of the CDS abstract entity.

A CDS abstract entity can be used as a global structured type in ABAP programs. The entity is located in the namespace of all global types of an AS ABAP. The elements of the CDS abstract entity define the components of the global structured type that can be referenced in ABAP programs using TYPE. As is the case for any CDS entity, the annotations of a CDS abstract entity can be evaluated.

In ABAP CDS, the keyword ROOT is used to define the CDS abstract entity abstract_entity as a root entity of the hierarchy of a business object. The following applies to the root entity:

  • There is exactly one root entity in the structure of a business object.

Notes

  • A CDS abstract entity cannot be used as a data source in other CDS entities or in .
  • The DDL source code of a CDS abstract entity must have the same name as this entity.
  • No ABAP Dictionary DDIC structure visible in the tools for structures is created for a CDS abstract entity.

Example

The following DDL source code shows a CDS abstract entity:

The program DEMO_CDS_ABSTRACT_ENTITY demonstrates the following:

  • The structure of the CDS abstract entity can be evaluated using RTTI methods.
  • The structure of the CDS abstract entity can be used as a data type in the ABAP program.





PERFORM Short Reference   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
This documentation is copyright by SAP AG.

Length: 6107 Date: 20240419 Time: 002607     sap01-206 ( 58 ms )