Ansicht
Dokumentation
ABENCDS_F1_DEFINE_CUSTOM_ENTITY - CDS F1 DEFINE CUSTOM ENTITY
TXBHW - Original Tax Base Amount in Local Currency BAL Application Log DocumentationThis documentation is copyright by SAP AG.
- DEFINE CUSTOM ENTITY
$[@entity_annot1$]
$[@entity_annot2$]
...
$[@ObjectModel.query.implementedBy : 'class_name'$]
$[DEFINE$] $[ROOT$] CUSTOM ENTITY custom_entity
$[parameter_list$]
element_list$[;$]
Additions
Effect
Defines a CDS custom entity custom_entity in the CDS DDL. When a CDS custom entity is activated, its metadata is created but no other object instances are created on the database or in AS ABAP. The name custom_entity must comply with the naming conventions for dictionary types and can have a maximum of 30 characters.
- @entity_annot can be used to specify optional annotations for the CDS custom entity.
- The annotation @ObjectModel.query.implementedBy binds an ABAP class which implements an ABAP query. This query is not called by the ABAP runtime framework but by a framework like the RAP query engine.
- parameter_list is used to declare a list of optional input parameters for the CDS custom entity.
- element_list is used to declare elements, CDS associations, CDS compositions, and CDS-to-parent associations of the CDS custom entity.
A CDS custom 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 custom 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 custom entity can be evaluated.
Notes
- A CDS custom entity cannot be used as a data source in other CDS entities or in ABAP SQL.
- No ABAP Dictionary DDIC structure visible in the tools for structures is created for a CDS custom entity.
- CDS custom entities can be used as values for the CDS annotations AssociationRef and ElementRef.
- In the context of the ABAP RESTful Application Programming Model, custom entities are used as a data model basis for
RAP unmanaged queries.
Example
The following DDL source code shows a CDS custom entity:
Addition 1
... ROOT
Effect
In ABAP CDS, the keyword ROOT is used to define the CDS custom entity custom_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.
- A root entity can have child entities defined as CDS compositions using the keyword COMPOSITION, but this is not mandatory. A root entity can also be a leaf entity.
- A root entity does not have a parent entity.
To-parent associations are not allowed in root entities.
RFUMSV00 - Advance Return for Tax on Sales/Purchases SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up
This documentation is copyright by SAP AG.
Length: 7112 Date: 20240426 Time: 133913 sap01-206 ( 70 ms )