Skip to content

ABAP Keyword Documentation →  ABAP - Dictionary →  ABAP CDS in ABAP Dictionary →  ABAP CDS - Data Definitions 

ABAP CDS - Abstract Entities

An abstract CDS entity is defined in the DDL source code of a CDS data definition in the ABAP Development Tools (ADT) using the statement DEFINE ABSTRACT ENTITY in the CDS DDL of the ABAP Core Data Services (CDS). DCL source code in an abstract CDS entity can also be displayed in Repository Browser in ABAP Workbench.

An abstract CDS entity represents all type attributes of a CDS entity:

  • A structured type defined using an element list
  • A parameter interface defined using input parameters (if applicable)

An instance of an abstract CDS entity is not created as a database object and client handling is not defined. An abstract CDS entity can be used as follows:

  • ABAP CDS
  • An abstract CDS entity can be specified as a target data source of a CDS association. A CDS association of this type can be published only and cannot be created as an instance of a join expression.
  • An abstract CDS entity cannot be used as a data source of SELECT statements or used by SQL path expressions in other CDS entities.
  • ABAP Programs
  • The structured type of the abstract CDS entity is known in ABAP programs. Like the type of any CDS entity, it can be used after the addition TYPE. The attributes of the structured type can be evaluated using RTTI.
  • An abstract CDS entity cannot be used as a data source of SELECT statements or used by path expressions in ABAP SQL.
  • Frameworks
  • The annotations of an abstract CDS entity can be evaluated using the methods of the class CL_DD_DDL_ANNOTATION_SERVICE.
  • The parameters and the CDS associations of abstract CDS entities can be evaluated by frameworks such as SADL.

Other versions: 7.31 | 7.40 | 7.54


Notes

Abstract CDS entities can be employed in the following cases:

  • They can be used as prototype definitions of data models without being created as instances of data objects.