[SAP] ABAP CDS Views und Verwendung von Annotations

Pakete

SABAPDEMOS (Demonstrationen der ABAP-Dokumentation (nicht produktiv))

  • Core Data Services

SDUT (DD: Analyse-Reparatur Utilities)

Transaktionen

SDDLAR (CDS Analyse- und Reparaturwerkzeuge)

  • Anzeigen und Reparieren von DDL-Strukturen

SACM (Access Control Management)
SE63 (Übersetzungseditor)

  • Übersetzung der Endusertexte (Annotations) zum View

Fiori Apps

Query Browser (Query Browser)
View Browser (View Browser)
Analytical Query (Analytical Query)

Reports

DEMO_CDS_* (Demo-Reports für Arbeit mit CDS-Views)

Klassen

CL_DD_DDL_ANNOTATION_SERVICE (Metadaten-API für Annotationen)
CL_DD_DDL_ANALYZE (DDL Source Analyse)

Tabellen

DDLDEPENDENCY (DD: Objekte in einer Ddl-Source)

  • OBJECTNAME für CDS entities (STOB) in Spalte OBJECTTYPE
  • OBJECTNAME für generierte DB Views (VIEW) in Spalte OBJECTTYPE

ABDOC_CDS_ANNOS (Bedeutung der SAP-Annotationen in ABAP-CDS)
CDSVIEWANNOPOS (CDS View Header Annotations)
CDS_FIELD_ANNOTATION (Field level Annotation of a CDS view)
DDDDLSRCT (DDL Source Texts)

Views

RSODPABAPCDSVIEW (Mapping DDIC ABAP Object Name to CDS Object Name)

Coding

* Liefert alle Annotationen (Entität, Element, Parameter )
cl_dd_ddl_annotation_service=>get_annos( EXPORTING
                                           entityname    = 'DEMO_CDS_MDE'
                                         IMPORTING
                                           element_annos = DATA(it_element_annos) ).

cl_demo_output=>display( it_element_annos ).

* Liefert den Wert der “@EndUserText.label”-Entitätannotation
DATA(lv_label) = cl_dd_ddl_annotation_service=>get_label_4_element( entityname  = 'DEMO_CDS_VIEW_ANNOTATIONS'
                                                                    elementname = 'SOME_FIELD'
                                                                    language    = 'D' ).

WRITE: / lv_label.

Links