Ansicht
Dokumentation

ABENCDS_F1_DEFINE_CUSTOM_ENTITY - CDS F1 DEFINE CUSTOM ENTITY

ABENCDS_F1_DEFINE_CUSTOM_ENTITY - CDS F1 DEFINE CUSTOM ENTITY

TXBHW - Original Tax Base Amount in Local Currency   BAL Application Log Documentation  
This documentation is copyright by SAP AG.
SAP E-Book

- DEFINE CUSTOM ENTITY

$[@entity_annot1$]
$[@entity_annot2$]
...
$[@ObjectModel.query.implementedBy : 'class_name'$]
$[DEFINE$] $[ROOT$] CUSTOM ENTITY custom_entity
         $[parameter_list$]
          element_list$[;$]


Additions

1. ... ROOT ...

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.

  • 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.
  • The annotation ObjectModel.query.implementedBy is mandatory when working in or .

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.





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 )