Skip to content

ABAP Keyword Documentation →  ABAP - Dictionary →  ABAP CDS in ABAP Dictionary →  ABAP CDS - Data Definitions →  ABAP CDS - DDL for Data Definitions →  ABAP CDS - DEFINE ABSTRACT ENTITY →  ABAP CDS - DEFINE ABSTRACT ENTITY, element_list 

ABAP CDS - DEFINE ABSTRACT ENTITY, element

Other versions: 7.31 | 7.40 | 7.54

Syntax


... [@element_annot1] 
    [@element_annot2]
    ...
    { [KEY] name   : typing }
  | {       _assoc : association } ...

Extras

1. ... @element_annot
2. ... KEY

Effect

Specifies an element name or publication of a CDS association assoc in the list of elements of an abstract CDS entity. name or _assoc must be used to specify a unique name that complies with the naming rules for names. Here, the name of a CDS association can start with an underscore , as recommended. The names of the elements and CDS associations are in the same namespace as the parameters of the table function. Furthermore, name cannot contain any slash (/) characters and cannot be a reserved name in ABAP Dictionary. The reserved names that cannot be used are specified in the database table TRESE.

  • If the addition association is not used, an element is defined that is typed with an elementary data type typing. The typing determines the data type of the corresponding component of the structured data type represented by the abstract CDS entity.
  • The addition association is used to publish a CDS association of the name name. No component of this name is created in the associated structured data type.

It is not case-sensitive. The blanks in the comma-separated list are ignored and can be omitted.

Addition 1

... @element_annot

Effect

Specifies annotations for the element. The annotations can be specified in front of every element and every CDS association using @element_annot.


Note

Element annotations can be used to annotate the elements and CDS associations of an abstract CDS entity with semantic attributes.

Addition 2

... KEY

Effect

KEY is used to define the current element as the key element of the current abstract CDS entity. Those elements of the element list can be defined as key elements that are placed without gaps at the start of the list.


Note

The key elements of an abstract CDS entity can be used to create an abstract data model.

Continue

ABAP CDS - DEFINE ABSTRACT ENTITY, element_annot

ABAP CDS - DEFINE ABSTRACT ENTITY, association