SAP CDS ANNOTATIONS - Syntax SUBANNO



Get Example source ABAP code based on a different SAP table
  



ABAP_CDS_DDL - Annotation Syntax, subannos

ABAP_SYNTAX
... subAnno1$[: value $]
$|$[: { subannos } $]
$|$[: [ arrelem ] $]
$|$[.subAnno$[ ... $] $],
subAnno2$[: value $]
$|$[: { subannos } $]
$|$[: [ arrelem ] $]
$|$[.subAnno$[ ... $] $],
...

What does it do?
Comma-separated list of subannotations subAnno1, subAnno2, ... in the curly brackets of an annotation. The name of a subannotation can contain letters, numbers, and underscores only and must start with a letter. The same information can be specified after the name as specified after the main annotation:
A colon (:) followed by the following:
An annotation value value
Further subannotations subannos specified in curly brackets { ... }.
Elements of an annotation array arrelem in square brackets [ ... ]
The chaining of the subannotations subAnno1, subAnno2, ... with a further subannotation subAnno using a period (.).
Only those subannotations should be specified that are supported by the associated annotation definition.



Latest notes:

As well as by using a comma-separated list in curly brackets, individual subannotations can also be specified using individual structured annotation names.
NON_V5_HINTS
ABAP_HINT_END

ABAP_EXAMPLE_VX5
The following annotation definition is available.
DDLA DEMOSUBANNOS
The annotation can then, for example, be specified as follows: @DemoSubAnnos: {subAnno1: true,
subAnno2: { subAnno1: 1,
subAnno2: { subAnno1: 1,
subAnno2: 2 } } }
This example has the same semantics as the example using structured names.
ABAP_EXAMPLE_END