- Reusable and unified view model for all use cases
- Annotations enabling flexible usage in different contexts
- Efficient development
Enrich CDS data models with additional metadata. Annotations begin with @
Kinds of Annotations
- AbapCatalog Annotations
- AccessControl Annotations
- Analytics Annotations
- AnalyticsDetails Annotations
- ClientDependent Annotations
- Consumption Annotations
- DataAging Annotations
- DefaultAggregation Annotations
- EndUserText Annotations
- EnterpriseSearch Annotations
- Environment Annotations
- Hierarchy Annotations
- MappingRole Annotations
- ObjectModel Annotations
- OData Annotations
- Search Annotations
- SearchIndex Annotations
- Semantics Annotations
- UI Annotations
- VDM Annotations
AbapCatalog Annotations
Define technical settings of CDS entities in the ABAP dictionary.
• AbapCatalog.sqlViewName: Database view in ABAP dictionary that is generated at activation
• AbapCatalog.sqlViewAppendName: Database view for CDS extension
• AbapCatalog.buffering.numberofkeyFields: Number of key elements for buffering generic areas (Default 000)
• AbapCatalog.buffering.status :
- #ACTIVE: SAP Buffering active
- #SWITCHED_OFF: SAP buffering allowed but not active (Default)
- #NOT_ALLOWED: SAP buffering not allowed.
• AbapCatalog.buffering.type:
- #SINGLE: Buffering type- single records
- #GENERIC: Buffering type- generic area
- #FULL: Buffering type- full
- #NONE: Buffering type- none (Default)
• AbapCatalog.compiler.compareFilter: (Default: true)
- 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.
- false : a separate join expression is created and evaluated for each filter condition.
ClientDependent Annotation
Defines the client handling when Open SQL is used to access a CDS entity
• ClientDependent: (Default: true)
• true : The CDS view is client-specific. The view fields of the CDS entity do not cover a client
column, from the perspective of an ABAP program. When accessed using SELECT,
automatic client handling is performed.
• false : The CDS view is a cross-client view. No automatic client handling is performed.
EndUserText Annotations
Enable an intuitive consumption of the data model in User Interfaces
EndUserText.label:
Defines a human-readable text that is displayed besides input fields or as column headers.
EndUserText.quickInfo:
Defines a human-readable text that provides additional information compared to the label text. The quickInfo element is used for accessibility hints or the mouse over function.
Example
@AbapCatalog.sqlViewName: S4HCDS_CONN3ANN |
|
@AbapCatalog.compiler.compareFilter: true |
|
@AbapCatalog.Buffering.type: #GENERIC |
|
@AbapCatalog.Buffering.numberOfKeyFields: 1 |
|
@AbapCatalog.Buffering.status: #ACTIVE |
|
@EndUserText.label: 'Flight Connection with ABAP Annotations |
|
@ClientDependent: true |
|
define view s4hcds_Connection3_Annotations as select from spfli |
|
{ |
|
// Projection list |
|
} |