ABAP CDS - Definition of Annotations
The CDS annotations that can be specified in CDS source code can be dictated by CDS annotation definitions. A CDS annotation definition defines a CDS annotation as a CDS object. It describes how this annotation is intended to be used in CDS source code. The description covers the following:
- The name of a main annotation
- The possible annotation values
- Whether it can be structured using subannotations
- Whether annotation arrays can be specified
An annotation is defined in a separate piece of DDLA source code and is transported with this code. DDLA source code for annotation definitions can define precisely one identically named CDS annotation using the CDS DDL statement DEFINE ANNOTATION (this annotation can, however, be the main annotation of subannotations). DDLA source code of this type can only be edited in the ABAP Development Tools (ADT) DDLA source code can also be displayed in Repository Browser in ABAP Workbench.
7.31 | 7.40 | 7.54
- The annotations defined as CDS objects are used by the ABAP Development Tools (ADT) for source code coloring and Code Completion when annotations are specified.
- The syntax check for the definition of a CDS entity in DDL source code for CDS entities does not yet evaluate the annotation definitions. It only checks the correctness of the annotation syntax.
- Customers and partners cannot currently define their own annotations. Only SAP annotations should currently be used.
- SAP Annotations lists all DDLA source code delivered by SAP.