Get Example source ABAP code based on a different SAP table
ABAP_CDS - DDL for Data Definitions The CDS data definitions> in ABAP CDS are created using the data definition language CDS DDL> in DDL source code>. The CDS DDL follows the general CDS syntax rules for ABAP CDS> and comprises the following statements for the definition and extension of CDS entities> and CDS DDIC-based entities>:
Statements for CDS entities>:
DEFINE VIEW ENTITY>>
DEFINE VIEW ENTITY AS PROJECTION ON>>
DEFINE TABLE FUNCTION>>
DEFINE HIERARCHY>>
DEFINE CUSTOM ENTITY>>
DEFINE ABSTRACT ENTITY>>
Statements for CDS DDIC-based entities>:
DEFINE VIEW>>
Language elements that can be used in various CDS entities:
Entity annotations>
Input parameters>
Typing>
Element annotations>
Statements for CDS entity extensions>:
EXTEND VIEW ENTITY>>
EXTEND ABSTRACT ENTITY>>
EXTEND CUSTOM ENTITY>>
EXTEND VIEW>>
Latest notes: The DDL source code> of data definitions has its own editor in ADT>, which is documented there. This editor can also be used to display the actual SQL statement generated from the CDS DDL source on the database. NON_V5_HINTS
DDL source code can also be displayed in the Repository Browser> in ABAP Workbench>. ABAP_HINT_END BEGIN_SECTION SAP_INTERNAL_HINT
The TADIR> key for a DDL source for data definitions is <(>R3TR DDLS<)>. Internally, the DDL sources for different CDS entities are distinguished by IDs defined as fixed values in domain DDDDLSRCTYPE>.
Some kinds of DDL sources for data definitions also have the TADIR > key <(>R3TR STOB<)>. This has historical reasons, but all metadata included in the STOB are also included in the DDIC runtime object and the STOB is not needed. The TADIR> object STOB is not transported. The term STOB should not be used in the documentation or on any user interface. Instead of STOB name >, the documentation should refer to CDS entity name>. END_SECTION SAP_INTERNAL_HINT