ABAP - Keyword Documentation →  ABAP - Core Data Services (ABAP CDS) → 
Mail Feedback

ABAP CDS - Data Definitions

CDS data definitions are written in the CDS data definition language (CDS DDL) of ABAP CDS. CDS data definitions can be used to define the following CDS entities or CDS DDIC-based entities:

A CDS entity is a structured object in ABAP CDS. When DDL source code with a CDS data definition is activated, the CDS entity is created in form of a metadata representation in system tables. The CDS entities themselves are not transported. Instead they are created after the transport of a DDL source code when this code is activated in the target system. Each CDS entity is defined in a separate piece of DDL source code in the ABAP development tools for Eclipse (ADT). In the development tools, CDS entities are only visible as CDS definitions in their DDL source code. The ABAP runtime framework and other frameworks access the internal metadata of CDS entities. For example, the ABAP runtime framework recognizes a CDS entity as a global type or as a potential data source of ABAP SQL statements. The name of a CDS must be unique accordingly.

A CDS entity represents the following type properties (or signature) as a global data type:

In ABAP CDS, CDS SQL entities can be used as data source in other CDS entities. In ABAP, a CDS entity can be specified after the TYPE addition to reference its structure type and its components in ABAP programs. The components of the structured type are, as usual, specified using the structure component selector cds_entity-comp. The properties of the structured type can be evaluated using RTTI. CDS SQL entities can be accessed in ABAP SQL read statements or AMDP but not in Native SQL.

A CDS entity cannot be used as a data type in ABAP Dictionary. It cannot, for example, be used as a type of a substructure, as an include structure, or as the row type of a table type.

The following sections describe the possible CDS entities and the associated DDL statements:

A further section describes the problems that can arise due to cyclical dependencies between CDS entities.


ABAP CDS - DDL for Data Definitions
ABAP CDS - Cyclical Dependencies
ABAP CDS - Changing the Type of a CDS Entity