Ansicht
Dokumentation
ABENCDS_F1_DEFINE_ANNOTATION_SUB - CDS F1 DEFINE ANNOTATION SUB
TXBHW - Original Tax Base Amount in Local Currency RFUMSV00 - Advance Return for Tax on Sales/PurchasesThis documentation is copyright by SAP AG.
- DEFINE ANNOTATION, subannos
... $[@annotation_annot1$]
$[@annotation_annot2$]
...
subAnno1${:
type;$}$|${$[:$]{subannos}$[;$]$}$|${:array of
arrelem$};
$[@annotation_annot1$]
$[@annotation_annot2$]
...
subAnno2${:
type;$}$|${$[:$]{subannos}$[;$]$}$|${:array of
arrelem$};
...
Effect
Structures a CDS annotation using subannotations subAnno1, subAnno2, ... . The subannotations are defined in a semicolon-separated list in curly brackets { ... } in the statement define annotation (a semicolon must be placed after the final entry in the list too). The names of the subannotations of an annotation must be unique.
Each subannotation is specified using the same syntax as when the main annotation is specified after define annotation. This means the following:
- The name of the subannotation can contain letters, numbers, and underscores only and must start with a letter.
- type can be used to define the possible annotation value for a subannotation
- A subannotation can itself be structured using further subannotations subannos
- A subannotation can be defined as an annotation array of array elements arrelem using array of
Annotation definition annotations @annotation_annot1, @annotation_annot2, ... can be specified in front of each subannotation. These annotations override any identically named annotation definition annotations specified for the structured annotation itself. Any annotations not specified directly in front of a subannotation are inherited by the next higher annotation in the hierarchy.
Notes
- Colons (:) in front of the opening curly bracket and semicolons (;) after the closing curly structuring bracket { ... } are optional.
- In the annotation syntax, structured annotations are specified either using comma-separated lists in curly brackets or using structured names.
Example
Defines a structured main annotation DemoAnnoMain with three subannotations, two of which are themselves structured. The semicolons after the closing curly structuring brackets are omitted here.
The annotation can be used, for example, as followed in CDS source code:
@DemoAnnoMain: {subAnno1:true,
subAnno2:{subsubAnno1:'X',
subsubAnno2:100},
subAnno3:{subsubAnno1:'Y',
subsubAnno2:200} }
The exact same result can be achieved as follows:
@DemoAnnoMain.subAnno1:true
@DemoAnnoMain.subAnno2.subsubAnno1:'X'
@DemoAnnoMain.subAnno2.subsubAnno2:100
@DemoAnnoMain.subAnno3.subsubAnno1:'Y'
@DemoAnnoMain.subAnno3.subsubAnno2:200
Fill RESBD Structure from EBP Component Structure PERFORM Short Reference
This documentation is copyright by SAP AG.
Length: 6805 Date: 20240426 Time: 084213 sap01-206 ( 101 ms )