Get Example source ABAP code based on a different SAP table
ABAP_CDS - Scopes for Annotations Annotations> can be specified in ABAP CDS source code for the following scopes by using annotation syntax >. The scopes in which an annotation can be specified are determined with the @Scope>> annotation in the corresponding annotation definition.
CDS DDL>:
Annotation definition annotations> for a CDS annotation definition>
in front of the statement DEFINE ANNOTATION>>
Entity annotations> for a CDS entity>
in front of the statements DEFINE VIEW ENTITY>>, DEFINE VIEW ENTITY AS PROJECTION>>, DEFINE TABLE FUNCTION>>, DEFINE HIERARCHY>>, DEFINE CUSTOM ENTITY>>, DEFINE ABSTRACT ENTITY >>, DEFINE VIEW >>.
View annotations for a CDS view>. View annotations are subdivided into:
View entity annotations> in front of the statement DEFINE VIEW ENTITY>>
Projection view annotations> in front of the statement DEFINE VIEW ENTITY AS PROJECTION>>
DDIC-based view annotations> in front of the statement DEFINE VIEW>>
Which view annotation can be used where is not governed by the @Scope>> annotation, but is documented for each DEFINE> statement.
Extension annotations> for a CDS view extension>
in front of the statement EXTEND VIEW> > or EXTEND VIEW ENTITY>>
Function annotations> for a CDS table function>
in front of the statement DEFINE TABLE FUNCTION>>
Hierarchy annotations> for a CDS hierarchy>
in front of the statement DEFINE HIERARCHY>>
Parameter annotations> for a parameter> of a CDS view>
in front of and after the parameter>
Parameter annotations> for a parameter> of a CDS table function>
in front of and after the parameter>
Parameter annotations> for a parameter> of an CDS custom entity>
in front of the parameter>
Parameter annotations> for a parameter> of an CDS abstract entity>
in front of the parameter>
Element annotations> for an element of the SELECT> list of a CDS view>
in front of and after the element
Element annotations> for an element> in the element list> of a CDS table function>
in front of and after the element>
Metadata extension annotations> for a CDS metadata extension>
in front of the statement ANNOTATE> >
CDS SDL>:
Service definition annotations> for a CDS service definition>
In the statement DEFINE SERVICE>>
CDS DCL>:
Role annotations> for a CDS role>
in front of the statement DEFINE ROLE> >
Access policy annotation> for a CDS access policy>
PFCG mapping annotation> for a PFCG mapping>
in front of the statement DEFINE PFCG_MAPPING>> The ABAP annotations that are possible for a scope are documented under ABAP annotations>. For framework-specific annotations by SAP, see the tables in the document Framework-specific annotations >.
Latest notes: The annotations specified in the source code of a CDS entity can be annotated or overridden using the annotations of CDS metadata extensions>. NON_V5_HINTS ABAP_HINT_END