SAP NetWeaver AS ABAP Release 752, ©Copyright 2017 SAP AG. All rights reserved.ABAP - Keyword Documentation → ABAP - Dictionary → ABAP CDS in ABAP Dictionary → ABAP CDS - Annotations → ABAP CDS - Specifying Annotations → ABAP CDS Metadata Extensions →
ABAP CDS - Evaluation of Metadata Extensions
Annotations from metadata extensions are evaluated first in the evaluation of annotations with the class CL_DD_DDL_ANNOTATION_SERVICE. If there are different metadata extensions for the same CDS entity, priority is determined by the following criteria:
The methods of the class CL_DD_DDL_ANNOTATION_SERVICE collect the annotations they have returned, depending on the variant and the layers, according to the following hierarchy:
If an existing CDS variant is specified for the evaluation, but there are no metadata extensions that are joined to the variant, processing continues with step 2, in the same way as when no variant is specified. If a non-existent CDS variant is specified, the methods of the class CL_DD_DDL_ANNOTATION_SERVICE return empty internal tables.
If there are several metadata extensions in a layer for the same variant or for no variant, the annotations of the first metadata extension to be found are used. The metadata extensions are respected here in an undefined (but stable) order.
CDS variants are not currently released for general use. It is not possible to define standalone CDS variants and the use of CDS variants in metadata extensions produces a syntax check warning.
CDS Metadata Extensions with CDS Variants