CDS Annotations

CDS SQL Expressions
  • 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 :

  1. #ACTIVE: SAP Buffering active
  2. #SWITCHED_OFF: SAP buffering allowed but not active (Default)
  3. #NOT_ALLOWED: SAP buffering not allowed.

• AbapCatalog.buffering.type:

  1. #SINGLE: Buffering type- single records
  2. #GENERIC: Buffering type- generic area
  3. #FULL: Buffering type- full
  4. #NONE: Buffering type- none (Default)

• AbapCatalog.compiler.compareFilter: (Default: true)

  1. 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.
  2. 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
Defines a human-readable text that is displayed besides input fields or as column headers.
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.


@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

What do you think?

-2 Points
Upvote Downvote

Written by admin

Leave a Reply

Your email address will not be published. Required fields are marked *

CDS Views Basic Syntaxes : – Select *, Select columns, Select distinct, WHERE clause, Table Aliases, Key Elements ,DDL Syntax Rules, CREATE SQL statement

CDS SQL Expressions

SAP ABAP CDS SQL Expressions – CASE expressions ( Simple CASE, Searched CASE & Nested CASE ), COALESCE