Syntax
... @annotation ...
Effect
Specifies Annotation annotation in the definition of a CDS view of the ABAP CDS before statement DEFINE VIEW. The character @ must be placed before the name annotation of the annotation. The table below shows the possible predefined annotations, which can be specified, and their meanings. All other annotations are user-defined annotations.
annotation | value | Default Value | Meaning |
AbapCatalog.buffering.status | #ACTIVE, #SWITCHED_OFF, #NOT_ALLOWED | #SWITCHED_OFF | SAP buffering active, allowed but not active, not allowed. |
AbapCatalog.buffering.type | #SINGLE, #GENERIC, #FULL, #NONE | #NONE | Buffering type: Single records, generic area, complete or no SAP buffering. |
AbapCatalog.buffering.numberOfKeyFields | Number between 0 and k-1 (k is the number of key elements) | 0 | Number of key elements for buffering generic areas |
AbapCatalog.compiler.compareFilter | true, false | false | If true, the filter conditions of the path expressions of the view are compared. If the same filter condition occurs, the associated join expression is only evaluated once. Otherwise a separate join expression is created and evaluated for each filter condition. |
AbapCatalog.sqlViewName | Character string, maximum 16 characters, which consists of letters, numbers and underscores and starts with a namespace prefix. | - | Mandatory. Name of the view in ABAP Dictionary. |
ClientDependent | true, false | true | true means that the CDS view is client-specific. When accessed using SELECT, automatic client handling is performed. |
DataAging.noAgingRestriction | true, false | false | false means that outdated data is not read. |
EndUserText.label | Character string with maximum 60 characters | - | Descriptive short text of the CDS view. |
The first column shows the annotation name annotation of predefined annotations, the second column shows the possible values value and the third column shows the value, which is implicitly set for value (if the annotation is not explicitly used). If nothing is specified for value, the annotation should be specified without a value.
Notes
Example
Additional properties with predefined annotations are defined for the CDS view business_partner (except for the mandatory @AbapCatalog.sqlViewName with the name BPA_VW for the ABAP repository). The short text Business partner and the CDS view is not client-specific.
Example
SAP buffering with single record buffering is activated for the CDS view business_partner.
Example
SAP buffering for a generic area and a key element is activated for the CDS view business_partner.
Example
For user-defined annotations, see the example under annotations.
ABAP CDS - DEFINE VIEW, view_annot
原文:https://www.cnblogs.com/JackeyLove/p/13496747.html