100% found this document useful (1 vote)
386 views133 pages

CDS Annotations for ABAP RAP Model

This document provides an overview of SAP's ABAP RESTful Application Programming Model, focusing on CDS annotations relevant to the programming model. It details various types of annotations, including ABAP and framework-specific annotations, and their usage in defining authorization checks and aggregation behavior. The document serves as custom documentation and is not a complete version of the official SAP product documentation.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
386 views133 pages

CDS Annotations for ABAP RAP Model

This document provides an overview of SAP's ABAP RESTful Application Programming Model, focusing on CDS annotations relevant to the programming model. It details various types of annotations, including ABAP and framework-specific annotations, and their usage in defining authorization checks and aggregation behavior. The document serves as custom documentation and is not a complete version of the official SAP product documentation.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

9/8/2024

SAP - ABAP RESTful Application


Programming Model
Generated on: 2024-09-08 10:50:50 GMT+0000

| 2023 FPS01

PUBLIC

Original content: [Link]


US&state=PRODUCTION&version=202310.001

Warning

This document has been generated from the SAP Help Portal and is an incomplete version of the official SAP product
documentation. The information included in custom documentation may not re ect the arrangement of topics in the SAP Help
Portal, and may be missing important aspects and/or correlations to other topics. For this reason, it is not for productive use.

For more information, please visit the [Link]

This is custom documentation. For more information, please visit the SAP Help Portal 1
9/8/2024

CDS Annotations
The following list summarizes SAP annotations of the Data De nition Language (DDL) of ABAP CDS that are relevant in the
context of ABAP RESTful programming model and released for ABAP Cloud Platform.

SAP CDS annotations are evaluated by SAP frameworks and can be either ABAP annotations or framework-speci c
annotations.

ABAP CDS - ABAP Annotations


CDS annotations that are evaluated by ABAP runtime:

AbapCatalog Annotations

AccessControl Annotations

ClientHandling Annotations

EndUserText Annotations

Environment Annotations

MappingRole Annotations

Metadata Annotations

Semantics Annotations

See also: ABAP CDS - View Annotations (ABAP Keyword Documentation)

 Tip
To access help for an ABAP annotation, position the cursor on the relevant annotation in the DDL editor and press F1 .

Framework-Speci c Annotations
Framework-speci c CDS annotations (as a rule) are exposed for OData and evaluated during runtime.

Aggregation Annotations

AccessControl Annotations

Consumption Annotations

ObjectModel Annotations

OData Annotations

Search Annotations

Semantics Annotations

UI Annotations

Related Information
CDS Annotation Syntax

This is custom documentation. For more information, please visit the SAP Help Portal 2
9/8/2024

AccessControl Annotations
Enable application developers to de ne how the authorization check for a CDS entity is executed

Scope and De nition

@Scope:[#VIEW, #TABLE_FUNCTION]
[Link] : String(20) enum { NOT_REQUIRED; NOT_ALLOWED; CHECK; PRIVILEGED_O

Usage

Annotation Meaning

[Link] This element de nes the behavior of the authorization check.

Scope: [#VIEW]

Engine Behavior: The runtime and design-time engines handle the authorization check
based on the value of the element.

Values:

Value Description

#NOT_REQUIRED During the authorization runtime, an authorization check


is executed if a DCL role exists for the entity. If no role
exists there is no check and no protection. This behavior
is the same behavior at runtime as for value #CHECK.
However in this case it is intended by the developer that
no role exists.

During development, no warning occurs when activating


the entity.

#NOT_ALLOWED During the authorization runtime, no authorization check


is executed.

During development, a warning occurs if a developer


activates a role for an entity, which has this annotation
value.

#CHECK During the authorization runtime, an authorization check


is executed if a DCL role exists for the entity. If no role
exists there is no check and no protection.

During development, a warning occurs if a developer


activates the entity and no DCL role exists for the entity.
This value is the default value.

NOTE

The value #NOT_REQUIRED is recommended for entities for which no authorization checks are planned yet, but might be
needed by the developer or customer laster. To prohibit roles for the entity, use the value #NOT_ALLOWED.

Example
When the developer activates the following DDL document, since an authorization check is not required, ABAP development
tools do not produce a warning. It does not matter whether a role exists for the entity or not.

This is custom documentation. For more information, please visit the SAP Help Portal 3
9/8/2024
At runtime, if there is a role for the entity, then ABAP performs an authorization check with the role. If there is no role, there is
no check and no protection for the entity.

 Sample Code
@[Link]: #NOT_REQUIRED
define view entity [view entity name]
as select from [table]
{
...
}

Aggregation Annotations
Speci es aggregation behavior on element level.

Scope and De nition

@Scope:[#ELEMENT]
annotation Aggregation
{
default: String(30) enum
{
NONE;
SUM;
MIN;
MAX;
AVG;
COUNT_DISTINCT;
NOP;
FORMULA;
};
exception : String( 30) enum
{
SUM;
MIN;
MAX;
AVG;
COUNT;
COUNT_DISTINCT;
FIRST;
LAST;
STANDARD_DEVIATION;
VARIANCE;
MEDIAN;
NHA;
};
referenceElement : array of ElementRef;
allowPrecisionLoss : Boolean default true;

};

Usage
With this annotation, you can specify the aggregation behaviour of elements in generic usage like analytic manager or ODATA.
Elements without default aggregation or with [Link]: #NONE will not be aggregated and will be used in
GROUP BY for aggregating access. Elements that can be aggregated are known as measures.

Annotation Meaning

This is custom documentation. For more information, please visit the SAP Help Portal 4
9/8/2024

Annotation Meaning

[Link] The annotation can be used in the views of dataCategory: #CUBE or #FACT. They must
contain a currency or unit conversion.

 Note
If an analytical query ([Link]: true) is built with a #CUBE view, the
database aggregates the units or currency and then performs the conversion. This is
faster than converting on row level. The results maybe slightly different due to rounding.

Scope: #VIEW

Type: Boolean

Evaluation Runtime (Engine):This annotation will be interpreted by the analytic manager.

[Link] Scope: #ELEMENT

Type: String of ENUM

Evaluation Runtime (Engine): This annotation is integrated by both SADL and analytic
manager. Use all values for this annotation only for elds of numeric and date type. This is
only allowed in views with dataCategory: #CUBE, #FACT, #DIMENSION. Aggregation
should not be used for all character like elds.

ENUM Description

SUM The total (sum) of all values in this column is shown in the
result line.

MAX The highest value of all values in this column is shown in the
result line.

MIN The lowest value of all values in this column is shown in the
result line.

AVG The average of all values is calculated. In this annotation,


analytic manager requires a referenceElement while SADL
does not.

 Note
The analytic manager allows AVG only together with
[Link] and exactly one
element in this list. Aggregation: { default:
#AVG , referenceElement: <element> }
behaves like Aggregation: { default: #SUM,
exception: #AVG , referenceElement:
<element> }.

COUNT_DISTINCT The number of rows is calculated. SADL and analytic


manager both need a referenceElement in this annotation.

 Note
The analytic manager allows COUNT_DISTINCT only
together with [Link]
and exactly one element in this list. behaves like
Aggregation: { default: #SUM, exception:
#COUNT_DISTINCT , referenceElement:
<element> }.

This is custom documentation. For more information, please visit the SAP Help Portal 5
9/8/2024

Annotation Meaning

NOP NOP returns a value if all values are equal. Otherwise, it


returns a special error value. It is the default in views with
and dataCategory: #CUBE, #FACT,#DIMENSION if
the data type of the element is numeric. This can only be
used by analytic manager.

FORMULA The value #FORMULA indicates that the element is a


formula. This has to be calculated after the operands have
been determined by aggregation or calculation. It should
never be aggregated. This only applies to analytic manager
and not to SADL.

 Note
This can only be used in views with
[Link]: true.

 Example
Margin : = Revenue / Cost. If Margin should be< shown
per OrgUnit in a report, the aggregates of Revenue and
Cost have to be determined per OrgUnit rst, and then
the Margin has to be calculated per OrgUnit.> }

NONE This value indicates that the element is not a measure.


Usually these elements are used in lters and GROUP BY
statements.

[Link] Aggregation: {Exception aggregation is always performed in addition to default aggregation,


which must not be equal to the #NONE. This is not an alternative to default aggregation. This
means that data is rst aggregated through the default aggregation grouped by the reference
element and then aggregated with the exception aggregation. The list of reference elements
has to contain one eld. If this eld has a foreign key association or a text association, then
all elds in the ON condition of that association have to be part of the list.

 Note
If you want to use [Link], you have to de ne
[Link] (not equal to NONE) and
[Link] in order to de ne the granularity with which the
aggregation rule is applied.

Scope: #ELEMENT

Type: String of ENUM

Evaluation Runtime (Engine): Analytic manager

ENUM Description

SUM, MAX, MIN, AVG, All these values determine the aggregation of the measure
COUNT, COUNT_DISTINCT in the same way as SUM, MAX, MIN, AVG, COUNT,
COUNT_DISTINCT in [Link].

FIRST, LAST These values indicate that the rst or last value in relation
to the reference characteristic is shown in the result line.

STANDARD_DEVIATION This value indicates that, after aggregating with the


reference characteristic, the standard deviation of the
calculated values is shown in the results row.

This is custom documentation. For more information, please visit the SAP Help Portal 6
9/8/2024

Annotation Meaning

VARIANCE This value indicates that, after aggregating with the


reference characteristic, the variance of the calculated
values is shown in the results row.

MEDIAN This value indicates that the middle value (central value) of
a set sorted in ascending order is calculated:

For a set with an uneven number of elements, the


result is the middle value.

 Example
For a set of ve elements, the result is the value
of the third element. Suppose you have the
following values: 1, 12, 2, 4, 24. When the values
are sorted in ascending order (1, 2, 4, 12, 24),
the median is the third middle value, which is 4.

For a set with an even number of elements, the


result is the average of the two middle values.

 Example
For a set of six elements, the result is the
average of the third and fourth elements.
Suppose you have the following values: 1, 12, 2,
4, 24, 6. When the values are sorted in
ascending order (1, 2, 4, 6, 12, 24), the median
is the average of the values 4 and 6, which is 5.

NHA No aggregation along the hierarchy. This value ensures that


nodes without a postable value part, and which only
aggregate the values of their children, are calculated as
NULL. This means they have no value if they are not
postable nodes. Postable nodes get the value of the
postable child.

[Link] This annotation can be used in views of dataCategory: #CUBE or #FACT which
contain a currency or unit conversion. If an analytical query ([Link]:true),
which is built on top of such a cube-view with with this annotation, the database rst
aggregates grouped by the currency or unit and them performs the currency or unit
conversion This is much faster than the conversion row by row, but due to rounding effects,
the result is slightly different.

Scope: #ELEMENT

Type: Array of elementRef. You can specify a reference characteristic.

Evaluation Runtime (Engine): Analytic manager.

Examples
Example 1: default Aggregation

 Sample Code
@[Link]:true
GlobalCurrency,

@[Link]: #SUM

This is custom documentation. For more information, please visit the SAP Help Portal 7
9/8/2024
@Semantics: { amount : {currencyCode: 'GlobalCurrency'} }
FixedAmountInGlobalCrcy,

When selecting FixedAmountInGlobalCrcy the SUM of this element is calculated.

Example 2: exception aggregation

 Sample Code
calendarDay,
@[Link]: true
unit,
@[Link]: #SUM
@[Link]: #LAST
@[Link]: ‘calenderDay’
@[Link] : ‘unit'
Quantity

This view describes the quantity of certain goods in a stock per calendar day. The measure quantity can be aggregated with
SUM for all dimensions except the calendar day.

Non-aggregated Data

calendarDay Plant Material Quantity

01/01/2018 Plant1 Material1 10 PC

02/01/2018 Plant1 Material1 20 PC

01/01/2018 Plant2 Material1 30 PC

02/01/2018 Plant2 Material1 10 PC

01/01/2018 Plant1 Material2 50 PC

02/01/2018 Plant1 Material2 40 PC

01/01/2018 Plant2 Material2 40 PC

02/01/2018 Plant2 Material2 70PC

Aggregate Quantity and Group by Material and


Aggregate Quantity and Group by Material and
CalendarDay

Material calendarDay Quantity

Material1 01/01/2018 40 PC

Material1 02/01/2018 30 PC

Material1 Result 30 PC

Material2 01/01/2018 90 PC

Material2 02/01/2018 110 PC

Material2 Result 110 PC

Result Result 140PC

Example 3: Counter-optimized

This is custom documentation. For more information, please visit the SAP Help Portal 8
9/8/2024
For CDS views representing master data reports (the FROM clause refers to a CDS view categorized as #DIMENSION), a
counter of the different dimension values can be de ned by combining the annotation Aggregation: #SUM with a select list
entry containing constant value 1:

 Sample Code
@[Link]: 'CostCenters per ControlingArea'
@[Link]: true
define view ControllingAreaView
as SELECT from CostCenterDimension {
controllingArea,
@[Link]: #SUM
1 as costCenterCount
}

With costCenter in the key of the dimension, no exception aggregation is involved, thus improving the performance of the
report.

 Note
This pattern can be combined with CAST statements (for reusing texts of DDIC data types) and/or CASE statements (for
de ning restricted measures). You must not use other constants than 1 however, or add annotation
[Link].

Related Information
AnalyticsDetails Annotations

Analytics Annotations
Enable the analytic manager for multidimensional data consumption, performing data aggregation, and slicing and dicing
data. It is mandatory for each ENUM value that on eld in the storage view exists. BI front ends like SAP Analytics Cloud can
consume the data via the analytic manager.

Scope and De nition

annotation Analytics
{
dataCategory : String(20) enum { DIMENSION; FACT; CUBE; AGGREGATIONLEVEL; };
query : Boolean default true;
hidden : Boolean default true;

planning
{
enabled : Boolean default true;
};

dataExtraction
{
enabled : Boolean default true;
delta
{
byElement
{
name : ElementRef;
maxDelayInSeconds : Integer default 1800;
detectDeletedRecords : Boolean default true;
ignoreDeletionAfterDays : Integer;

This is custom documentation. For more information, please visit the SAP Help Portal 9
9/8/2024
};

changeDataCapture
{
automatic : Boolean default true;
mapping: array of
{
role : String(30) enum {MAIN; LEFT_OUTER_TO_ONE_JOIN;};
table : String(30);
// only used if association is not specified
viewElement : array of ElementRef;
// only used if association is not specified
tableElement : array of String(30);
filter : array of
{
tableElement : String(30);
operator : String(11) enum {EQ;NOT_EQ;GT;GE;LT;LE;BETWEEN;NOT_BETWEEN;} default #
value : String(45);
highValue : String(45);
};
};
};
};

filter : array of
{
viewElement : ElementRef;
operator : String(11) enum {EQ;NOT_EQ;GT;GE;LT;LE;BETWEEN;NOT_BETWEEN;} default #EQ;
value : String(45);
highValue : String(45);
};

alternativeKey : array of ElementRef;


partitionBy : array of ElementRef;
// replication in cloud not allowed as long as communication scenario is unclear
};

viewModelReplication
{
enabled : Boolean default true;
};

hints : String(1298);

writeBack
{
className : String(30);
// Implements IF_ROOPS_ODP_WRITEBACK
};

settings
{
maxProcessingEffort : String(20) enum { LOW; MEDIUM; HIGH; UNLIMITED; } default #HIGH;

olapPushdown : String( 30 ) enum { OFF; MAX; };

zeroValues: {
handling: String(20) enum { SHOW; HIDE; HIDE_IF_ALL; } default #SHOW;
hideOnAxis: String(20) enum { ROWS; COLUMNS; ROWS_COLUMNS; } default #ROWS_COLUMNS;
};

rows: {
hierarchicalDisplay : {
active : Boolean;
expandTo: ElementRef;
};
totalsLocation: String(10) enum { BOTTOM; TOP; };
};

columns {
hierarchicalDisplay : {
active : Boolean;
expandTo: ElementRef;
};

This is custom documentation. For more information, please visit the SAP Help Portal 10
9/8/2024
totalsLocation: String(10) enum { RIGHT; LEFT; };
};

displayOriginalInitialValue: Boolean default true;

initialValueForMissingText : Boolean default true;

valueHelp : {
supressInitialValue : Boolean default true;
}

runtimeExtensibility : {
allowed : Boolean default true;
}

};

internalName : String(30) enum { DEFAULT; LOCAL; GLOBAL; };


technicalName : String( 16 ) ;
variableCheck: {
implementedBy : String(255); // String = 'ABAP:<Classname>' , class implements IF_RSRTS_CDS_VA
}

constraints: {
filter : String(20) enum { UNIQUE_PER_CELL; UNIQUE_PER_QUERY; };
}

processingEngine : String(5) enum { AE; MDS; };


onlyRestrictedAttributeTextAccess : Boolean default true;
readClassName : String(30);
excludeFromRuntimeExtensibilty : Boolean default true;

document
{
@Scope:[#VIEW]
storageForEntity: array of EntityRef;

@Scope:[#VIEW]
storagePersistence: array of EntityRef;

@Scope:[#VIEW]
serviceClassName: String(30); // implements IF_RSDOC_SERVICE_VIRT

@Scope:[#ELEMENT]
type: String(4) enum { DOC; TRA; SVA; SVH; HNM; HNO; HIO; };

@Scope:[#ELEMENT]
reference: String(30);

@Scope:[#ELEMENT]
semantics: String(30) enum { ID; VERSION; TAG; QPROV; TYPE; OWNER; INFOPROV;
SVA_INFOPROV; KYFNM; STATUS; SESS
DOCUMENT; SELECTIONS; PROPERTY; }
};

};

Usage
The analytic manager needs a star schema (multidimensional) and a query to consume the data. Most annotations to de ne
the star schema in different CDS views are speci ed in ObjectModel annotations. Some Semantics annotations are also
available. The Analytics annotations also specify the facts (center of the star schema), extraction capabilities for replicating
data into further systems, and analytic query properties. A semantic distinction can be made in the Analytics annotations
between annotations that are relevant for the InfoProvider (CUBE or DIMENSION) level and annotations that are only relevant
for analytic queries.

[Link] This annotation should be used for elem

Scope: #ELEMENT

This is custom documentation. For more information, please visit the SAP Help Portal 11
9/8/2024
Type: String of ENUM

Evaluation Runtime (Engine):Analytic m

ENUM

UNIQUE_PER_CELL

UNIQUE_PER_QUERY

[Link] Analytic queries can be de ned on top o

Scope: #VIEW

Type: String of ENUM

Evaluation Runtime (Engine): Analytic

ENUM

DIMENSION

FACT

CUBE

AGGREGATION_LEVEL

[Link] In this annotation, if a CDS view is based

 Note
It is important that the key of the main

This is custom documentation. For more information, please visit the SAP Help Portal 12
9/8/2024

Scope: #VIEW

Type: Array of ElementRef

Evaluation Runtime (Engine): Analytic

[Link] The application developer can enable th

[Link] By using this annotation, the system will


image in the extracted data.

Scope: #VIEW

Type: Boolean

Evaluation Runtime (Engine): Analytic

[Link]
This annotation only makes sense togeth
number of days. The main purpose is ar

 Example
If records are archived after 2 years, th

Scope: #VIEW

Type: Integer - speci ed number of days

Evaluation Runtime (Engine): Analytic

[Link] There is always a time delay between ta

Scope: #VIEW

Type: Integer - Maximum number of sec

Evaluation Runtime (Engine): Analytic

[Link] Application developers can enable the g


DATS) or a UTC time stamp.

Scope: #VIEW

Type: ElementRef - the name of an elem

Evaluation Runtime (Engine): Analytic

 Note
If the eld is a time stamp, the system

[Link] Use the CDC (change data capture) delt

Scope: #VIEW

Evaluation Runtime (Engine): Analytic

[Link] In case of simple CDS views like project

Scope: #VIEW

Type: Boolean

Evaluation Runtime (Engine): Analytic

[Link] In case of more complex CDS views, e.g


see also example 3.

This is custom documentation. For more information, please visit the SAP Help Portal 13
9/8/2024
Scope: #VIEW

Type: array of:

 Code Syntax
array of
{
role : String
table : Strin
// only used
viewElement :
// only used
tableElement
filter : arra

See individual annotation descriptions fo

Evaluation Runtime (Engine):Analytic m

[Link] This annotation allows the de nition of


Element.

Filter on logging table:

.tableElement: Name of the element

.operator: Restriction operator, possi

.value: The lter value.

.highValue: That speci es the upper

Scope: #VIEW

Type: array of:

 Code Syntax
array of {

Evaluation Runtime (Engine):Analytic m

[Link] This annotation de nes the role of the da

Scope: #VIEW

Type: String of ENUM

Evaluation Runtime (Engine):Analytic m

ENUM

MAIN

LEFT_OUTER_TO_ONE_JOIN

[Link] Name of the table to be logged.

This is custom documentation. For more information, please visit the SAP Help Portal 14
9/8/2024
Scope: #VIEW

Type: String

Evaluation Runtime (Engine):Analytic m

[Link] List of table key elds that map to CDS

 Note
Both arrays, viewElement and tabl
contain exactly all key elements of the

Scope: #VIEW

Type: ElementRef

Evaluation Runtime (Engine):Analytic m

[Link] List of CDS view elements that map to k

If [Link] LEFT_OUTER_TO_ONE_
used in the on-conditions of the joins.

Scope: #VIEW

Type: ElementRef

Evaluation Runtime (Engine):Analytic m

[Link] Application developers can use this ann

Scope: #VIEW

Type: Boolean

The default setting is true. In this case, t

Evaluation Runtime (Engine):Analytic m

 Note
This view must be annotated with Ana

 Tip
Delta capabilities must be provided fo

[Link] Filters to be applied after the extraction

Scope: #VIEW

Evaluation Runtime (Engine): Analytic

Type

 Code Syntax
array of {

This is custom documentation. For more information, please visit the SAP Help Portal 15
9/8/2024

[Link] This annotation gives a list of view elem

If a CDS view might return more than 1 m

Scope: #VIEW

Type: Array of ElementRef

Evaluation Runtime (Engine): Analytic

[Link] The analytic manager offers features to


With the annotations,[Link]

 Note
The view that provides the documents
annotation [Link]

[Link] This annotation should be used in the do


[Link]

For each dimension eld in the cube view


#TRA. This eld has to have the same ty
hierarchies, then four additional elds w

The annotation should be used in the do


[Link]

 Note
The annotation [Link]

Administrative elds need to h

For each dimension eld of the

Scope: #ELEMENT

Type: String

Evaluation Runtime (Engine): Analytic

[Link] Each enumeration (Enum) value listed b

 Note
The annotation [Link]

Administrative elds need to h

For each dimension eld of the

Scope: #ELEMENT

Type: String of ENUM

Evaluation Runtime (Engine): Analytic

ENUM

ID

TAG

QPROV

TYPE
This is custom documentation. For more information, please visit the SAP Help Portal 16
9/8/2024

OWNER

INFOPROV

SVA-INFOPROV

KYFNM

STATUS

SESSION_ID

TIMESTAMP

DOCUMENT

SELECTIONS

PROPERTY

[Link] A CDS-based DocumentStore handles D


with implements a special interface IF_

Scope: #VIEW

Type: String

Evaluation Runtime (Engine): Analytic

[Link] This annotation provides a list of cube v


[Link]. #DOCS

Scope: #VIEW

Type: Array of EntityRef

Evaluation Runtime (Engine): Analytic

[Link] This annotation can be used in CDS-cub


allowed. On the query level, it describes

Scope: #VIEW

Type: Array of EntityRef

Evaluation Runtime (Engine): Analytic

[Link] The annotation [Link]

Administrative elds need to hav

For each dimension eld of the r

Scope: #ELEMENT

Type: String of ENUM

Evaluation Runtime (Engine): Analytic

ENUM

DOC

TRA

SVA

SVH

This is custom documentation. For more information, please visit the SAP Help Portal 17
9/8/2024
HNM

HNO

HIO

[Link] Some BI clients allow to extend the runti


feature either because they are DPP rele
Fields in the CDS cube view with this an

Scope: #ELEMENT

Type: Boolean

Evaluation Runtime (Engine): Analytic

The analytic manager ensures that an an

[Link] Usage on the element level: You can use


[Link] are not e

Scope: #ELEMENT, #VIEW

Type: Boolean

True-

The element will not be added to


the ag can't be deleted becaus

The view cannot be consumed b

False- The view can be consumed by ana

Evaluation Runtime (Engine): Analytic

[Link] This annotation is reserved for special h

Usage on the view level: Views with Ana

Scope: #VIEW

Type: String

Evaluation Runtime (Engine): Analytic

[Link] The CDS model is transformed to an Info


DIMENSION) are mapped to InfoObject
name is derived by default from the SQL
view. In all other cases, the InfoObject na

With this annotation, the identi er that is


@[Link]

Scope: #ELEMENT, #VIEW

Type: String of ENUM

Evaluation Runtime (Engine): Analytic

 Note
If multiple elements are used in the ON
This default behavior can be overruled

ENUM

LOCAL

This is custom documentation. For more information, please visit the SAP Help Portal 18
9/8/2024

GLOBAL

[Link] Only for views with [Link]


keys in the query result are read privileg
of the text view).

Scope: #VIEW

Type: Boolean

Evaluation Runtime (Engine): Analytic

[Link] An input-enabled query provides writeba

Scope: #VIEW

Type: Boolean

True: The view is enabled for planning. T

False: The view is not enabled for planni

 Note
The view has to select data from a view

 Note
This view must be annotated with Ana

Evaluation Runtime (Engine): Speci es

[Link] Speci es the Analytic engine with which

Scope: #ELEMENT

This is custom documentation. For more information, please visit the SAP Help Portal 19
9/8/2024
Type: String of ENUM

Evaluation Runtime (Engine): Analytic

ENUM

AE

MDS

[Link] Query view classi cation.

Scope: #VIEW

Type: Boolean

True- The query view will be exposed to

 Note
Data will be selected from the view sp
the DCL has to be assigned to the view

False: The query view will not be expose

Evaluation Runtime (Engine): By taggin

 Note
This view must not be annotated with A

[Link] Only for views with [Link]


the methods of the class instead selecti
responsible for data authorization (DCL)

Scope: #VIEW

Type: String . Name of an ABAP class, w

Evaluation Runtime (Engine): Speci es

 Note
The read class is not called if the view

[Link] This annotation switches on the universa

Scope: #VIEW

Type: Boolean

Evaluation Runtime (Engine): Analytic

[Link] If universal hierarchy display is switched

Scope: #VIEW

Type: ElementRef

Evaluation Runtime (Engine): Analytic

[Link] This annotation speci es are shown to th

Scope: #VIEW

Type: String of ENUM

This is custom documentation. For more information, please visit the SAP Help Portal 20
9/8/2024
Evaluation Runtime (Engine): Analytic

ENUM

RIGHT

LEFT

[Link] The Analytical Manager usually display

It can be set in the header of a dimensio

It can only be set for dimensions where t

Scope: #VIEW

Type: Boolean

Evaluation Runtime (Engine): Analytic

[Link] If text should be displayed but a text is

If the text should remain empty, this ann

In the text view with ObjectMod

With [Link]

Scope: #VIEW

Type: Boolean

Evaluation Runtime (Engine): Analytic

[Link] If InfoProviders store large amounts of d

When the limit is reached, the analytic m

Scope: #VIEW

Type: String of ENUM

Evaluation Runtime (Engine): This anno

ENUM

LOW

MEDIUM

HIGH

UNLIMITED

[Link] The Analytic manager is able to map so


This is what we call "pushdown". Unfortu
[Link]
means with OFF you can switch off the p

Scope: #VIEW

Type:String of ENUM

Evaluation Runtime (Engine): Analytic

ENUM

OFF

This is custom documentation. For more information, please visit the SAP Help Portal 21
9/8/2024

MAX

[Link] This annotation shows all dimensions th

Scope: #VIEW

Type: Boolean

Evaluation Runtime (Engine): Analytic

[Link] With the annotation, the hierarchy will be

Scope: #VIEW

Type: ElementRef

Evaluation Runtime (Engine): Analytic

[Link] This annotation speci es if the totals ap

If nothing is speci ed the default setting

If there is no hierarchy, the totals

If there is a display hierarchy, th

Scope: #VIEW

Type: String of ENUM

Evaluation Runtime (Engine): Analytic

ENUM

BOTTOM

TOP

[Link] If this annotation is set in the header of t


If not all dimensions or measures of the

Scope: #VIEW

Type: Boolean

Evaluation Runtime (Engine): Analytic

[Link] This annotation can be used in views of t

If a text association for the representativ


be added when value help is processed.

Scope #VIEW

Type: Boolean

Evaluation Runtime (Engine): Analytic

[Link] You can specify whether rows or columns

Scope: #VIEW

Type: String of ENUM

Evaluation Runtime (Engine): This anno

This is custom documentation. For more information, please visit the SAP Help Portal 22
9/8/2024
ENUM

SHOW

HIDE

HIDE_IF_ALL

[Link] You can specify whether rows or columns

Scope: #VIEW

Type: String of ENUM

Evaluation Runtime (Engine): This anno

ENUM

ROWS

COLUMNS

ROWS_COLUMNS

[Link] Names in the analytical model are derive


[Link], the nam

Scope: #VIEW, #ELEMENT

Type: String

Evaluation Runtime (Engine): Analytic

[Link] The consistency of the variable input ca

This is custom documentation. For more information, please visit the SAP Help Portal 23
9/8/2024
Scope: #VIEW

Type: String - Name of an ABAP class th

Evaluation Runtime (Engine): Analytic

 Note
This is only interpreted in the context o

[Link] In the UI of the CDS view replication, a c


is used to enable a view for view model
Scope: #VIEW

Type: Boolean

Evaluation Runtime (Engine): Analytic

[Link] The annotation is used to enable a view f

Scope: #VIEW

Type: Boolean

Evaluation Runtime (Engine): Analytic

[Link] Views with [Link]

Scope: #VIEW

Type: String. Name of the ABAP class th

Evaluation Runtime (Engine): Speci es

 Note
Only relevant if [Link]

Examples
Example 1

Example for replication-enabled master data.

 Sample Code
@[Link]: 'EPM Demo: Employee'
@Analytics:{ dataCategory: #DIMENSION , [Link]: true }
@[Link]: #CHECK
@[Link]: 'EmployeeUUID'
@[Link]: 'SEPM_IEMPLOYEE'
define view SEPM_I_Employee as
select from snwd_employees

association [0..1] to SEPM_I_Company as _Company on $[Link]


...

{
key snwd_employees.node_key as EmployeeUUID,
@[Link]: '_Company'
snwd_employees.parent_key as CompanyUUID,
...}

Example 2

This is custom documentation. For more information, please visit the SAP Help Portal 24
9/8/2024
Example for transactional data (fact).

 Sample Code
@[Link]: 'EPM Demo: Sales Order Item with Addtl. Data (private view)'
@[Link]: #CUBE
@[Link]: #CHECK
@[Link]: 'SEPM_PSOIC'

define view SEPM_P_SalesOrderItemCube

as select from SEPM_I_SalesOrderItem

association [0..1] to SEPM_I_SalesOrder_E as _SalesOrder_E on $[Link]


...

{
@[Link]: '_SalesOrder_E'
key _SalesOrder.SalesOrder,
_SalesOrder_E,
...}

Example 3

Example for de ning a list of tables that should be logged for delta data extraction.

 Sample Code
@Analytics: {
dataCategory: #FACT,
dataExtraction: {
enabled: true,
[Link]:
[ { table: 'rsodpcdcunittab2', role: #MAIN, viewElement: ['view_key1', 'view_key2'], tabl
{ table: 'rsodpcdcunittab1', role: #LEFT_OUTER_TO_ONE_JOIN, viewElement: ['view_key3'],
} }

Related Information
ObjectModel Annotations
Semantics Annotations

AnalyticsDetails Annotations
Enable application developers to specify the default multidimensional layout of the query, the sequence of variables in UI
consumption, and the speci c aggregation and planning behavior of the data. All these annotations can only be used in views
with @[Link] : true.

Scope and De nition

@Scope:[#ELEMENT]
annotation AnalyticsDetails
{
query
{
formula : String(1298);
axis : String(20) enum { FREE; ROWS; COLUMNS; };
totals: String(20) enum { HIDE; SHOW; };
scaling : Integer;

This is custom documentation. For more information, please visit the SAP Help Portal 25
9/8/2024
decimals : Integer;
display : String(20) enum { KEY; TEXT; TEXT_KEY; KEY_TEXT; };
sortDirection : String(20) enum { ASC; DESC; };
hidden : Boolean default true;
displayHierarchy : String(20) enum { OFF; ON; FILTER; FILTER_ONLY; };
hierarchyInitialLevel : Integer;
hierarchyBinding : array of
{
type : String(12) enum { ELEMENT; PARAMETER; CONSTANT; USER_INPUT; SYSTEM_FIELD; };
value : String(512);
variableSequence : Integer;
};
hierarchySettings
{
hidePostedNodesValues : Boolean default true;
hideNodeWithOneChild : Boolean default true;
childNodePosition : String(10) enum { BELOW ; ABOVE; };
};
elementHierarchy
{
parent : ElementRef;
initiallyCollapsed : Boolean default true;
};
@Scope:[#ELEMENT, #PARAMETER]
variableSequence : Integer;
resultValuesSource : String(10) enum { CUBE; DIMENSION; };
resultValueHelpSource : String(10) enum { QUERY; DIMENSION; };
reverseSign: Boolean default true;

onCharacteristicStructure: Boolean default true;


collisionHandling:
{ formula : String( 20) enum { DEFAULT; THIS; CONCURRENT; };
decimals : String( 20) enum { DEFAULT; THIS; CONCURRENT; };
scaling : String( 20) enum { DEFAULT; THIS; CONCURRENT; };
semanticObject : String( 20) enum { DEFAULT; THIS; CONCURRENT; };
};

ignoreFurtherFilter:
{ forElement : array of ElementRef;
forAllElements : Boolean; }

};
exceptionAggregationSteps : array of
{
exceptionAggregationBehavior : String(14) enum
{
SUM;
MIN;
MAX;
COUNT;
COUNT_DISTINCT;
AVG;
STD;
FIRST;
LAST;
NHA;
};
exceptionAggregationElements : array of String(30);
};
planning
{
enabled : Boolean default true;
disaggregation : String enum { NONE; TOTAL; DIFFERENCE; };
distribution : String enum { EQUAL; PROPORTIONAL; PROPORTIONAL_REF; };
distributionReference : elementRef;
};
};

@Scope: [#PARAMETER]
variable {
usageType : String(20) enum { PARAMETER; FILTER; FORMULA; };
referenceElement : ElementRef;
mandatory : Boolean default true;
defaultValue : String(1024);

This is custom documentation. For more information, please visit the SAP Help Portal 26
9/8/2024
defaultValueHigh : String(1024);
defaultHierarchyNode : {
nodeType : String( 30 );
node : array of {
element : String( 30 );
value : String(1024);
};
};
defaultRanges : array of {
sign : String(1) enum { I; E; };
option : String(2) enum { EQ; BT; CP; LE; GE; NE; NB; NP; GT; LT; };
low : String(1024);
high : String(1024);
};
selectionType : String(20) enum { SINGLE; INTERVAL; RANGE; HIERARCHY_NODE; };
multipleSelections : Boolean default true;
hierarchyBinding : array of {
type : String(20) enum { PARAMETER; CONSTANT; SYSTEM_FIELD;};
value : String(512) ;
variableSequence : Integer;
};
};
};

Usage

Annotation Meaning

This is custom documentation. For more information, please visit the SAP Help Portal 27
9/8/2024

Annotation Meaning

[Link] Usually, the default aggregation deter

 Caution

In some cases different aggregation b


default aggregation behavior can't be

 Note
Example: A measure "Inventory" can
according to time the last or average

Exception aggregation is optional and


speci ed elements. In general, there c
Therefore, a list of ExceptionAggr
the aggregation behavior.

 Note
Example: In the query there's a mea
is a measure of the underlying CUB
query with exceptionAggregati
Customer, the sales must rst be
there is a value for sales, this means
summed up again.

Scope: #ELEMENT

Type: String of ENUM

Evaluation Runtime (Engine): The (lo


Firstly, the DefaultAggregation is perf
ExceptionAggregationSteps. T
StepNumber.

The rst remark holds even if the def


the result is still grouped by the exce
aggregated according to the list of Ex
for calculation can be de ned precise

ENUM

SUM

MIN

MAX

NHA

COUNT

AVG

STD

FIRST

LAST

This is custom documentation. For more information, please visit the SAP Help Portal 28
9/8/2024

Annotation Meaning

[Link] The elements that should be aggregat


see [Link]

Scope: #ELEMENT

Type: String - list of elements represe

Evaluation Runtime (Engine): Analyt

[Link] This annotation allows you to de ne t


[Link].e

If a measure is speci ed with this ann


entries for aggregated values. These v
aggregated value of the cell.

Scope: #ELEMENT

Type: String of ENUM

Evaluation Runtime (Engine): Analyt

ENUM

NONE

TOTAL

DIFFERENCE

[Link] If disaggregation is chosen, you can c


annotation will be ignored if CDS view

Scope: #ELEMENT

Type: String of ENUM

Evaluation Runtime (Engine): Analyt

ENUM

EQUAL

PROPORTIONAL

PROPORTIONAL_REF

[Link] You can specify a sibling member in t


[Link].d

This annotation will be ignored if CDS

Scope: #ELEMENT

Type: ElementRef - Name of sibling m

Evaluation Runtime (Engine): Analyt

This is custom documentation. For more information, please visit the SAP Help Portal 29
9/8/2024

Annotation Meaning

[Link] Individual members in the selection li


can only be used in input-enabled ana
[Link]: true and An
annotation, it is input-ready in the ana

Scope: #ELEMENT

Type: Boolean - The member in the se

Evaluation Runtime (Engine): Analyt

[Link] For a tabular display of the query resu


elements can be directly annotated w
all need to be on the same axis. The a
If no [Link].

The default value for elements that ar


belong to the same eld in the query,

Scope: #ELEMENT

Type: String of ENUM

Evaluation Runtime (Engine): Analyt


layout is derived by this annotation.

ENUM

FREE

ROWS

COLUMNS

[Link] If a query has a measure and a charac


member with a formula. Then it has to
property from the measure structure
both members are a formula it has to
speci ed, the property of the measur

 Note
The [Link] annotat
-.formula, -.scaling, or -.semanticOb

[Link] Determines which setting for decimal


relevant for measures. For other elem

Scope: #ELEMENT

Type: String of ENUM

Evaluation Runtime (Engine): Analyt

ENUM

DEFAULT

THIS

CONCURRENT

This is custom documentation. For more information, please visit the SAP Help Portal 30
9/8/2024

Annotation Meaning

[Link] Determines which formula should be

Scope: #ELEMENT

Type: String of ENUM

Evaluation Runtime (Engine): Analyt

ENUM

DEFAULT

THIS

CONCURRENT

[Link] Determines which setting for scaling (


Scope: #ELEMENT

Type: String of ENUM

Evaluation Runtime (Engine): Analyt

ENUM

DEFAULT

THIS

CONCURRENT

[Link] Determines which semantic object (C


Scope: #ELEMENT

Type: String of ENUM

Evaluation Runtime (Engine): Analyt

ENUM

DEFAULT

THIS

CONCURRENT

[Link] For elds that represent measures, re


to be used. This element is only relev

Scope: #ELEMENT

Type: Integer from 0 to 9.

Evaluation Runtime (Engine): Analyt

This is custom documentation. For more information, please visit the SAP Help Portal 31
9/8/2024

Annotation Meaning

[Link] This annotation de nes if a dimension


speci ed, the default is taken from th
#TEXT if the dimension supports text

Scope: #ELEMENT

Type: String of ENUM

Evaluation Runtime (Engine): Analyt


cube views.

ENUM

KEY

TEXT

TEXT_KEY

KEY_TEXT

[Link] This annotation allows you to specify


query result is shown in a hierarch for

Scope: #ELEMENT

Type: String of ENUM

Evaluation Runtime (Engine): Analyt

ENUM

OFF

ON

FILTER

FILTER_ONLY

[Link] A hierarchical display of structure me


the measure structure and the charac
-.[Link]

[Link] If true, the hierarchy node represented


entry has children. The elements of th
way. With [Link]
element.

Scope:#ELEMENT

Type: Boolean

Evaluation Runtime (Engine): Analyt

This is custom documentation. For more information, please visit the SAP Help Portal 32
9/8/2024

Annotation Meaning

[Link] Elements of a structure (measure or c


Query. To achieve a hierarchical displa
@[Link]
parent entry.

If the element belongs to the measure


the characteristic structure, the paren

Scope:#ELEMENT

Type: ElementRef. This is the alias of

Evaluation Runtime (Engine): Analyt

[Link] This annotation allows you to specify


required from the element list of the v
will be interpreted as a formula.

Scope: #ELEMENT

Type: String

This expression can contain the follow

Cube measures

Arithmetic expressions

Functions NDIV0 and NODIM

CASE expressions with a max

WHEN clause can con

ELSE clause is option

Evaluation Runtime (Engine): Analyt

[Link] With this annotation, an element of a s


[Link] is used the

Scope: #ELEMENT

Type: Boolean

Evaluation Runtime (Engine): Analyt

[Link] General example for AnalyticsDet

 Example
[Link]
In this case, parameter_name speci

This is custom documentation. For more information, please visit the SAP Help Portal 33
9/8/2024

Annotation Meaning

[Link] The [Link].h


element with a display hierarchy. One
rst entry is supplied to the rst key
If there is no hierarchy directory, the h

[Link]
parameter, a ltered element or by a
[Link]

Scope: #ELEMENT

Type: String of ENUM

Evaluation Runtime (Engine): Analyt

ENUM

ELEMENT

PARAMETER

CONSTANT

USER_INPUT

[Link] This annotation contains, depending o


element name and an identi er for the
values are those of @[Link]

Scope: #ELEMENT

Type: String

Evaluation Runtime (Engine): Analyt

[Link] This annotation allows you to specify

In case lters or parameters are not a


the CDS document.

Scope: #ELEMENT

Type: Integer - This number de nes th

Evaluation Runtime (Engine): Analyt

[Link] This annotation de nes which hierarc

Scope: #ELEMENT

Type: Integer - Hierarchy level with th

Evaluation Runtime (Engine): Analyt

This is custom documentation. For more information, please visit the SAP Help Portal 34
9/8/2024

Annotation Meaning

[Link] De nes whether the nodes should exp

Scope: #ELEMENT

Type: Integer - This number de nes th

Type: String of ENUM

Evaluation Runtime (Engine): Analyt

ENUM

BELOW

ABOVE

[Link] For some hierarchies, the hierarchy no


over all its child nodes) which are dis
posted values can be suppressed.

Scope: #ELEMENT

Type: Boolean

Evaluation Runtime (Engine): Analyt

[Link] Node 1 has children Node 11 and Nod


B. Then Node 111 will be presented as

[Link] The feature "constant selection" of th


[Link]
and the annotation, and AnalyticsD
.forAllElements, lters for all dim
in that list are ignored.

[Link] The feature "constant selection" of th


[Link]
and the annotation, and AnalyticsD
variant,forElement, only the lters

Scope: #ELEMENT

Type: Boolean

Evaluation Runtime (Engine): Analyt

[Link] The feature "constant selection" of th


[Link]
and the annotation, and AnalyticsD
.forAllElements, lters for all dim

Scope: #ELEMENT

Type: Array of ElementRef

Evaluation Runtime (Engine): Analyt

This is custom documentation. For more information, please visit the SAP Help Portal 35
9/8/2024

Annotation Meaning

[Link] All measures, restricted measures, an


elements can be assigned to a second
belonging to the characteristic structu
restricted element : CASE WHEN...TH

Scope: #ELEMENT

Type: Boolean

Evaluation Runtime (Engine): Analyt

[Link] This annotation speci es which value


dynamic lter. This is only supported

Scope: #ELEMENT, #PARAMETER

Evaluation Runtime (Engine): Speci


Provider or if it should be lled up by

Scope: #ELEMENT, #PARAMETER

Type: String of ENUM

Evaluation Runtime (Engine): Analyt

ENUM

QUERY

DIMENSION

[Link] This annotation in uences the list of v


supported for elements.

Scope: #ELEMENT, #PARAMETER

Type: String of ENUM

Evaluation Runtime (Engine): Analyt

ENUM

CUBE

DIMENSION

[Link] The sign of a measure will be ipped


only a display feature. Calculations w
elements.

Scope: #ELEMENT, #PARAMETER

Type: Boolean

Evaluation Runtime (Engine):

This is custom documentation. For more information, please visit the SAP Help Portal 36
9/8/2024

Annotation Meaning

[Link] For measures, restricted measures, a


is only relevant for measures. For othe

Scope: #ELEMENT

Type: Integer - number from 0 to 9.

Evaluation Runtime (Engine): This an

[Link] If nothing is speci ed, the rows are so


for dimension on columns. With this a
(descending).

Scope: #ELEMENT

Type: String of ENUM

Evaluation Runtime (Engine): Analyt

ENUM

ASC

DESC

[Link] For dimensions, you can set the behav

Scope: #ELEMENT

Type: String of ENUM

Evaluation Runtime (Engine): Analyt

ENUM

HIDE

SHOW

[Link] In general, a CDS parameter represen


derivation. But in Analytics, this conc
nodes. In some cases the input should
annotations. If these annotations are u

[Link] If user input is necessary for the para


this annotation. UIs will create user pr
(consumption. lter). This annotation c
parameters are not annotated, they ar
document. The sequence is calculate

Scope: #ELEMENT, #PARAMETER

Type: Integer - The order of paramete

Evaluation Runtime (Engine): Analyt

[Link] These annotations allow one to specif


selectionType #HIERARCHY_NODE. A
semantic elements in the correspond

This is custom documentation. For more information, please visit the SAP Help Portal 37
9/8/2024

Annotation Meaning

[Link] The .[Link]


It must be used in combination with A
hierarch node is seen as a list of elem
with [Link]
separately. Element is reference ing t
the value represents a leaf.

With the node sub annotations, each

The annotation AnalyticsDetails


the hierarch view.

Scope: #PARAMETER

Type: String

Evaluation Runtime (Engine): Analyt

[Link] The [Link]


a hierarch node lter. It must be used
#HIERARCHY_NODE. A hierarch node
the corresponding view with ObjectM

With the node sub annotations, each

Scope: #PARAMETER

Type: String

Evaluation Runtime (Engine): Analyt

[Link] The .[Link]


It must be used in combination with A
hierarch node is seen as a list of elem
with [Link]

With the node sub annotations, each

If the value of the eld NodeType is

Scope: #PARAMETER

Type: String

Evaluation Runtime (Engine): Analyt

[Link] This annotation speci es the default f


with the sub eld high.

Scope: #PARAMETER

Type: String

Evaluation Runtime (Engine): Analyt

[Link] This annotation speci es the default f


with the sub eld low.

Scope: #PARAMETER

Type: String

Evaluation Runtime (Engine): Analyt

This is custom documentation. For more information, please visit the SAP Help Portal 38
9/8/2024

Annotation Meaning

[Link] This annotation speci es the default f


with the sub eld option.

Scope: #PARAMETER

Type: String of ENUM

Evaluation Runtime (Engine): Analyt

ENUM

EQ

BT

CP

LE

GE

NE

NB

NP

GT

LT

[Link] This annotation speci es the default f


with the sub eld sign.

This annotation speci es the default f


with the sub eld sign.

Scope: #PARAMETER

Type: String of ENUM

Evaluation Runtime (Engine): Analyt

ENUM

[Link] This annotation speci es a default va


If the variable is hidden, the variable
must comply with the data type of the

Scope: #PARAMETER

Type: String

Evaluation Runtime (Engine): Analyt

This is custom documentation. For more information, please visit the SAP Help Portal 39
9/8/2024

Annotation Meaning

[Link] This annotation is used in combinatio


bound of an interval. AnalyticsDet
variables of the selection type #INTE

Scope: #PARAMETER

Type: String

Evaluation Runtime (Engine): Analyt

[Link] This annotation determines how the k


input eld, or a system eld. Allowed

Scope: #PARAMETER

Type: String of ENUM

Evaluation Runtime (Engine): Analyt

ENUM

PARAMETER

CONSTANT

SYSTEM_FIELD

[Link] This annotation contains, depending o


element name, the identi er for the us
@[Link] for system

Scope: # PARAMETER

Type: String

Evaluation Runtime (Engine): Analyt

[Link] This annotation shows the position of


according to the order of all variables

 Note
This annotation is only relevant for t

Scope: # PARAMETER

Type: Integer

Evaluation Runtime (Engine): Analyt

[Link] If this is set to true, the system enforc


optional and the query might be exec

 Note
If the annotation is not set, the varia

Scope: # PARAMETER

Type: Boolean

Evaluation Runtime (Engine): Analyt

This is custom documentation. For more information, please visit the SAP Help Portal 40
9/8/2024

Annotation Meaning

[Link] This annotation is used to indicate tha


with the selectionType you get.

Scope: # PARAMETER

Type: Boolean

Evaluation Runtime (Engine): Analyt

[Link] This annotation refers to an element i


In the case of a lter variable, this ann
In general, it restricts the usage in exp
value help.

Scope: #PARAMETER

Type: String

Evaluation Runtime: Analytic manag

[Link] This annotation determines how value

Scope: #PARAMETER

Type: String of ENUM

Evaluation Runtime: Analytic manag

ENUM

SINGLE

INTERVAL

RANGE

HIERARCHY_NODE

[Link] This annotation is a classi cation cor


Variable. The usage of the parameter
annotation. Whether the parameter is

Scope: #PARAMETER

Type: String of ENUM

Evaluation Runtime: Analytic manag

ENUM

PARAMETER

FILTER

FORMULA

Examples
This is custom documentation. For more information, please visit the SAP Help Portal 41
9/8/2024
Example 1

Calculated Elements

 Sample Code
@[Link] : true
define view fincancial as select from sales

{
@[Link] : #ROWS
product,
@[Link] : #COLUMNS
@[Link] : 'revenue - cost'

1 as absolute_margin,

@[Link] : 'NDIV0($projection.absolute_margin / revenue ) * 100'

1 as relative_margin,

@[Link] : 'CASE WHEN $projection.relative_margin > 20 THEN revenue ELSE


1 as revenue_for_margin_gt_20

Example 2

Display hierarchy selection: Specify the hierarchy directly.

 Sample Code
@[Link] : true

define view costcenter_reporting

with parameters

cost_center_hier_param : String

as select from costcenters

...

@[Link] : {

displayHierarchy: #ON,

hierarchyInitialLevel: 3, // three levels of the hierarchy will be opened at start

hierarchySettings{hidePostedNodesValues: true }, // don't show posted node values

hierarchyBinding :

[ { type : #CONSTANT, value : 'CONTR_AREA_10' },

{ type : #PARAMETER, value : 'cost_center_hier_param' }

costcenter, // hierarchy node filter

costs,
This is custom documentation. For more information, please visit the SAP Help Portal 42
9/8/2024

...

Example 3

Use of $session variables, especially $session.system_date.

The system supports variables like $session.system_date for different use cases:

In cube parameters

 Sample Code
@[Link] : true

define view …
as select from zCostCenter_Flt( P_KeyDate: $session.system_date )

In queries on time-dependent master data in where clauses

 Sample Code
} where
DateTo >= $session.system_date and
DateFrom <= $session.system_date

In paths to time-dependent attributes or texts

 Sample Code
_CostCenter[1: DateTo >= $session.system_date and DateFrom <= $session.system_date]._Text[1

In restricted key gures

 Sample Code
case when PostingDate = $session.system_date then ammount as currentAmmount

Consumption Annotations
De ne a speci c behavior that relates to the consumption of CDS content through domain-speci c frameworks.

Usage
Via these annotations, the speci c behavior is de ned which is related to the consumption of CDS content. This metadata
makes no assumptions about the concrete consumption technology/infrastructure, but it is applicable across multiple
consumption technologies (e.g. Analytics or OData).

Annotation De nition

This is custom documentation. For more information, please visit the SAP Help Portal 43
9/8/2024

Annotation De nition

Annotations belonging to Consumption. lter regulate ltered queries on UIs.

Usually lter values are entered manually by the user on a UI. By using lter annotations query lters can be in uenced.

Scope: [ELEMENT]

Evaluation Runtime (Engine): Interpreted by ABAP Runtime Environment

[Link] Boolean (true, false) Scope: [ENTITY,ELEMENT]

As an association annotation, this an


to temporal CDS views that do not b
ther on-condition. The annotation ind
with key-date semantics, the associ
date.

As a view annotation, this annotation


consumed at a key date.

[Link] This annotation allows to specify a d


lter of a view element

This annotation must be used in com


selectionType:#HIERARCHY_N

The default is either proposed to the


consumption framework of the view
explicitly specify a different value.

A hierarchy node is seen as a list of


elements in the corresponding view
@[Link]:

nodeType Value:

elementRef

node[] With node each part can be set to a

Value:

element

value

[Link] String(1024) Speci es a default value for a lter


proposed to the end user or implicit
in case the end user does not explic
The result type of the string express
of the annotated element.

[Link] String(1024) This annotation is used in combinati


default interval for a lter of a view e

In this case, the defaultValue co


defaultValueHigh thge upper b

[Link] String(12) This annotation determines how the

#ELEMENT Name of an element, which has a un


is used for this hierarchy component

#PARAMETER Parameter name.

This is custom documentation. For more information, please visit the SAP Help Portal 44
9/8/2024

Annotation De nition

#CONSANT Constant.

#USER_INPUT USER_INPUT is optional. It will be re


query. It can contain a name. USER_
provided with the same user input a
the list of all values in accordance w
[Link]

#SYSTEM_FIELD System eld.

[Link] String(512) This annotation contains, depending


parameter name (without : or $param
identi er for the user input eld, res

[Link] Boolean (true, false) Speci es that the lter is hidden for
In combination with a derivation, this
without user interaction.

[Link] Boolean (true, false) This annotation enforces a user to en


even if a default value exists.

[Link] Boolean (true, false) This annotation is used to indicate t


the lter input (selection) UIs combi
following combinations are available
selectionType SINGLE and

selectionType INTERVAL an
interval

selectionType INTERVAL an
intervals

selectionType RANGE and m


ranges ( complete (ABAP lik

[Link] String(20) This annotation de nes how values c

SINGLE Speci es that a single value must b

INTERVAL Speci es that an interval must be en


An Interval is a special case of range
operator=BT.

RANGE Speci es that a range must be enter


A range is a complete SELECT-optio

HIERARCHY_NODE Speci es that a hierarchy node mus


Refers to the complete hierarchy und

[Link] Integer This annotation allows you to specify


variables on the variable input UIs.
The number de nes the position of t
input eld.

[Link] Boolean (true, false) (default This annotation prevents elds from
false) the eld will not be exposed to UIs.

Scope: #ELEMENT, #PARAMETER

[Link] String(1024) This annotation can be used on actio


default values for the action consum
speci ed value in the annotation is t
executing the action on the UI.

This is custom documentation. For more information, please visit the SAP Help Portal 45
9/8/2024

Annotation De nition

[Link] string This annotation leverages enhanced


The semantic semantic object that i
be speci ed as the value.

 Example
SAP Fiori has introduced the conce
whereby an intent is a combination
<semanticObject> <action>
is used in SAP Fiori UIs to dynamic
the annotated view as a source.

Scope: #ELEMENT, #PARAMETER,

For more information, see Based on

[Link] string This annotation de nes whether the


view are automatically retrieved with
Possible Values:
value help, or whether they must be
#AUTOMATICALLY_WHEN_DISPLAYED
The annotation must be used in the v
(default in OData V4)
Scope: #ENTITY
#ON_EXPLICIT_REQUEST (default in
OData V2)

Annotations belonging to [Link] nition directly establish a relationship to an entity that acts as a value help provider.

The value help can be consumed without an association to the target value help provider.

Scope: [ELEMENT, PARAMETER]

Evaluation Runtime (Engine): Interpreted by ABAP Runtime Environment

[Link][] De nes an additional binding condit


target value help provider entity for
and/or returning values from the sel

element Speci es the element in the target v


linked to the local element or param

localElement Speci es the local element that is li


the target value help provider entity

localParameter Speci es the local parameter that is


in the target value help provider enti

parameter Speci es the parameter in the targe


linked to the local element or param

usage The binding may either specify an a


help list (#FILTER), or an additiona
value help record (#RESULT) or a co
(#FILTER_AND_RESULT). If not sp
#FILTER_AND_RESULT. If distinctV
bindings must specify the usage as

[Link] Speci es whether the value help res


values for the annotated eld or par
be used for ltering, but only the val
value help was requested for will be

This is custom documentation. For more information, please visit the SAP Help Portal 46
9/8/2024

Annotation De nition

[Link][] De nes the binding for the value hel


requires speci cation of the entity a
help for the annotated element.

element Value:

elementRef

name Value:

entityRef

[Link] This annotation contains a language-


the value list, if more than one value

If not speci ed the label of the value

[Link] The presentation variant indicates h


displayed.

[Link] Uniquely identi es alternative value

Omission means the OData term is a

If more than one value help is de ne


used.

[Link] Value

Boolean (default: true)

[Link] Value

Boolean (default: true)

Example 1

The annotation [Link] is used to de ne a value help for the annotated element. The value
help provider can be a different CDS entity without association. To consume the value help, the value help provider entity must
be added to the respective OData service.

You can lter the available value help options by de ning an additional binding. In the following example case, only the business
partners are displayed that use the same currency code.

 Sample Code
This is custom documentation. For more information, please visit the SAP Help Portal 47
9/8/2024

DEFINE VIEW BuPaView AS SELECT FROM db_bp


{
key bp.bp_id as BusinessPartnerID,
...
bp.currency_code as CurrencyCode,
bp.company_name as CompanyName,
}

DEFINE VIEW SOView AS SELECT FROM db_so as so


{
so.sales_order_id as SalesOrderID,

[Link] as CurrCode,
@[Link]: [{ entity : { name : 'I_AIVS_BusinessPartner',
element : 'BusinessPartnerID'},
additionalBinding : [{ localElement : 'CurrCode',
element : 'CurrencyCode'
}]
}]
_BusinessPartner.BusinessPartnerID

Example 2

 Sample Code
define view sales_order_vh as select from SalesOrder as so
{

@[Link]: [{ qualifier: 'ValueHelp2',
entity : { name : 'I_BusinessPartner',
element : 'BusinessPartnerID'
},
label : 'Business Partner Value Help'
},
{ entity : { name : 'I_BuPa',
element : 'BusinessPartnerID'
},
label : 'Business Partner VH'
}]
_BusinessPartner.BusinessPartnerID

Event Annotations
Annotation Meaning

@[Link] Use this annotation in an abstract entity to de ne which elds are


exposed in the cloud event envelope. Furthermore, it can be used to
lter the events on a channel.
The attribute name must follow these naming guidelines:

It must have an 'xsap' pre x.

It must not exceed 20 characters in length.

It should only include lowercase letters (a-z) or numbers (0-


9).

 Note
The elds UnitOfMeasure and Currency can't be de ned
as lters.

This is custom documentation. For more information, please visit the SAP Help Portal 48
9/8/2024

Annotation Meaning

@[Link] Use this annotation to de ne the external name which maps to the
eld of the abstract entity. The abstract entity de nes the internal
format of an external event.

Hierarchy Annotations
Enables an application developer to specify a parent-child hierarchy that they want to make explicitly accessible in a data
model, together with the structure that de nes this hierarchy.

Scope and De nition

@Scope:[#VIEW]
Annotation Hierarchy
{
parentChild : array of
{
name : String(127);
label : String;
multipleParents : Boolean default true;
recurseBy : elementRef;
recurse
{
parent : array of elementRef;
child : array of elementRef;
};
siblingsOrder : array of
{
by : elementRef;
direction : String(4) enum { ASC = 'ASC'; DESC = 'DESC'; } default #ASC;
};
rootNode
{
visibility : String(25) enum { ADD_ROOT_NODE_IF_DEFINED; ADD_ROOT_NODE; DO_NOT_ADD_ROOT_NO
};
orphanedNode
{
handling : String(20) enum { ROOT_NODES; ERROR; IGNORE; STEPPARENT_NODE; } default #ROOT_N
stepParentNodeId : array of String;
};
directory : associationRef;
};
};

Usage
The parent-child hierarchy can be de ned in two ways. The rst is a hierarchy based directly on the master data/dimension
entity, for example, employees and managers. In this case, the hierarchy is time dependent if the master data entity is as well.
The second is a speci c hierarchy view. Here, the recursion can be de ned on abstract keys and several hierarchies may exist.
With abstract keys, the nodes could be different business entities and it is possible that leaves belong to multiple parent nodes.
These features are not available when the hierarchy is de ned directly in the master data. In this scenario, the relation between
the node and parent node can depend on the time independent of the time dependency of the dimension.

The second is a speci c hierarchy view. Here, the recursion can be de ned on abstract keys and several hierarchies may exist.
With abstract keys, the nodes could be different business entities and it is possible that leaves belong to multiple parent nodes.
These features are not available when the hierarchy is de ned directly in the master data. In this scenario the relation between
the node and parent node can depend on the time independent of the time dependency of the dimension.

 Note
This is custom documentation. For more information, please visit the SAP Help Portal 49
9/8/2024
A simple example of a parent-child hierarchy is the “Employee” master data. A “Manager” is an “Employee” and almost
every “Employee” is assigned to a “Manager”.

On entity level the following metadata can be de ned:

Annotation Meaning

[Link] For external hierarchies, the view of hierarchy nodes often contain
multiple alternative hierarchies. A user is supposed to choose a s
for display, and their selection is used as a lter when selecting fr
node view. The directory annotation identi es an association, t
directory association, from the hierarchy node view to a view (the
hierarchy directory), providing all available alternative hierarchie
hierarchy node view. The hierarchy view may be a standard dimen
also provide text.

Scope: #VIEW

Type: AssociationRef . This denotes the name of the hierarchy dire


used to lter the nodes.

Evaluation Runtime (Engine): Analytic manager: The hierarchy d


as user input help, and a chosen hierarchy directory entry is used
nodes via the hierarchy directory association.

[Link] User-friendly name of the hierarchy. Only relevant if the view de n


only, and [Link] is not used.

Scope: #VIEW

Type: String - as a description of the hierarchy.

Evaluation Runtime (Engine): Analytic manager: This name can


input help for [Link]. The hierarchy
there isn't a directory label de ned. See [Link]

[Link] Indicates that multiple parents might occur in the hierarchy.

 Note
In a geographic hierarchy, for example, you might want to assign
Turkey to the continents Europe and Asia.

 Caution
We need to distinguish the above use case from the following on
hierarchy YEAR, QUARTER, MONTH January under 2011 and Jan
2012 are not the same member with multiple parents. They are
Januaries.

Scope: #VIEW

Type: Boolean. This de nes whether multiple parents occur in the


Default setting is true.

Evaluation Runtime (Engine): The analytic manager can handle h


leaves with multiple parents, but it does't support nodes with mu
This annotation is only relevant for engines that cannot handle mu
annotation is not interpreted by theAnalytic manager:.

This is custom documentation. For more information, please visit the SAP Help Portal 50
9/8/2024

Annotation Meaning

[Link] Technical name of the hierarchy. Only relevant if the view de nes o
only, and [Link] is not used.

Scope: #VIEWThe hierarchy is accessed in queries or in program


this name. The description can be set with the
[Link].

Type: String

Evaluation Runtime (Engine): Analytic manager:

[Link] De nes how nodes without a parent (more precisely with a parent
occur as a child) are processed.

Scope: #VIEW

Type:

Evaluation Runtime (Engine): Depending on the annotation value


manager will ignore orphaned nodes, treat them as root nodes, pu
step parent node or raise an error.

ENUM Description

ROOT_NODES Treat nodes as root nodes (d

ERROR Stop processing and show an

IGNORE Ignore nodes and remove the


hierarchy.

STEPPARENT_NODE Put nodes under a step paren

[Link] De nes how nodes without a parent (more precisely with a parent
occur as a child) are processed.

With the annotation


[Link]
STEPPARENT_NODE this annotation contains the node ID
parent node(s).

With parent-child hierarchies, you need to de ne a step p


each component (each parent-child combination).

Scope: #VIEW

Type:

Evaluation Runtime (Engine):Analytic manager:

ENUM Description

stepParentNodeId node ID(s) of the step parent

[Link] If the underlying view de nition does not contain an association d


parent-child relationship but only “normal” elements, this annotat
used to de ne the children.

Scope: #VIEW

Type: Array of ElementRef. The element names de ne the key ele


"child".

Evaluation Runtime (Engine): Analytic manager

This is custom documentation. For more information, please visit the SAP Help Portal 51
9/8/2024

Annotation Meaning

[Link] If the underlying view de nition does not contain an association d


parent-child relationship but only “normal” elements, this annotat
used to de ne the parents.

Scope: #VIEW

Type: Array of ElementRef. The element names de ne the key ele


"parent".

Evaluation Runtime (Engine): Analytic manager

[Link] De nes the parent-child relationship in a hierarchy based on an ex


association from hierarchy node to its parent node in the same vie

Scope: #VIEW

Type: ElementRef. The name of the parent-child association need


here.

Evaluation Runtime (Engine): Analytic manager

[Link] Using this annotation, you can de ne dedicated metadata for how
node(s) in the hierarchy.

Scope: #VIEW

Type:

Evaluation Runtime (Engine): Depending on the annotation value


manager might add an extra root node to the hierarchy. The label
the value of [Link].

ENUM Description

ADD_ROOT_NODE_IF_DEFINED The system will add the root


hierarchy if it is explicitly de
system will not add an extra
node. This is the default.

ADD_ROOT_NODE The system will always add a


root node to the hierarchy. Al
descendants of this node.

DO_NOT_ADD_ROOT_NODE The system will not add an a


root node to the hierarchy.

[Link] [Link] de nes the orde


the same parent.

[Link] de nes the


which contains the values to be ordered.

Scope: #VIEW

Type: ElementRef

Evaluation Runtime (Engine): The analytic manager sorts all chil


the given order.

This is custom documentation. For more information, please visit the SAP Help Portal 52
9/8/2024

Annotation Meaning

[Link] [Link] de nes the orde


the same parent.

[Link] d
order of values with the same parent is “ascending” or “descendin

Scope: #VIEW

Type:

Evaluation Runtime (Engine): The analytic manager sorts all chil


the given order.

ENUM Description

ASC The sort order is ascending (

DESC The sort order is descending

ObjectModel Annotations
Provide de nitions of text-related aspects of the CDS-based data model

Usage

Annotation Meaning

[Link] Sets the OData annotation for lterable or non- lterable elements according to the
annotation value true or false.

The annotation overrules element default settings regarding lter enablement for th
element.

If the annotated CDS view is exposed in an OData service, the non- lterable prope
are marked with an OData annotation in the OData metadata. The default of being
lterable is not shown in the metadata.

Scope: [ELEMENT]

Evaluation Runtime (Engine): SADL

Value: BOOLEAN

This is custom documentation. For more information, please visit the SAP Help Portal 53
9/8/2024

Annotation Meaning

[Link]: References the query implementation class for the unmanaged query.
Scope: [VIEW]

This annotation is evaluated when the unmanaged query is executed whereby the
query implementation class is called to perform the query.

To reference the query implementation class, ABAP: must be added to the string
reference.

 Example
@[Link]: 'ABAP:<query_impl_class>

This annotation can be used in all CDS entity types except of abstract entities. Wh
using this annotation, the elds de ned in the CDS view refer to the custom query
need to match the data coming from the referenced query implementation class.

 Note
This annotation substitutes the deprecated annotation @QueryImplementedBy
''.

[Link] Sets the OData annotation for sortable or non-sortable properties according to the
annotation value true or false.

The annotation overrules element default settings regarding sorting enablement for
element.

If the annotated CDS view is exposed in an OData service, the non-sortable proper
are marked with an OData annotation in the OData metadata. The default of being
sortable is not shown in the metadata.

Scope: [ELEMENT]

Evaluation Runtime (Engine): SADL

Value: BOOLEAN

[Link] De nes the associated view, which provides textual descriptions for the annotated
eld.

Scope: [ELEMENT]

Evaluation Runtime (Engine):

SADL - Enriches the OData entity type of the view with the textual descript
of the target view applying an automated language ltering. The name of th
auto-generated text property will be composed out of the annotated eld n
and the constant suffix _Text. This OData property is mapped onto the rst
text eld of the associated target CDS view annotated with
@[Link]:true.

Analytic Manager - Uses the associated view as TEXT view for annotated
eld.

[Link][ ] Establishes the conjunction of a eld with its descriptive language-independent tex
Scope: [ELEMENT]

Evaluation Runtime (Engine): SADL - First text eld listed in the annotation array
be handled as descriptive text of the annotated eld in OData exposure scenarios.

This is custom documentation. For more information, please visit the SAP Help Portal 54
9/8/2024

Annotation Meaning

[Link]
Value: { ASSOCIATED_TEXT_UI_HIDDEN }

Scope: [VIEW, ELEMENT]

Suppresses the text element of the text association to be visible on the UI.

Value: { NONE }

Scope: [ ELEMENT]

Overrules the annotation [Link]: {


ASSOCIATED_TEXT_UI_HIDDEN } that is speci ed on entity level. For t
annotated element the text element of the text association is visible on the

[Link] Scope: [VIEW, ELEMENT]

Value: 'AssocRef'

The annotations de nes an associated view which de nes textual description for t
annotated eld. The corresponding code eld in the associated view is de ned by
on-condition of the association.

[Link] To support the decision on cache strategies for higher layers and to enable client-s
statement routing using these caches, the data class is used. The different data
classes correspond to different life time cycles. The annotation dataClass has the
following values:

TRANSACTIONAL: The view contains data which is written or changed in h


volume transactions (also for background processing). Examples are head
and items for Sales Order processing or Financial Postings.

MASTER: Master data is read but not written or changed in high volume
transactions (also for background processing). It typically drives the busin
process decisions when business logic is executed. It is also shown to the
as context information and to enable user decisions when these transaction
are executed manually. Examples are material, business partner or accoun

ORGANIZATIONAL: The data describes the organizational structure of a


company and its business processes. It can be seen as a special type of
master data. This data is only written or changed when organization change
are implemented at the customer. Examples are sales unit, distribution
channel and cost center.

CUSTOMIZING: The data describes how a concrete business process is


executed at the customer. It consists typically of content delivered by SAP
enriched and extended by the customer. This data is typically even less
common changed. Examples are countries, unit of measures, currency.

META: Meta data speci es how the system is con gured or describes the
technical structure of entities. Typically this is part of shipped content.
Changes are done in xes or upgrades. Examples are DDIC structures, el
control, authorization objects.

MIXED: This option is chosen if the CDS view contains data of multiple dat
classes

This is custom documentation. For more information, please visit the SAP Help Portal 55
9/8/2024

Annotation Meaning

[Link] The category serviceQuality re ects the quality of service with regards to the expe
performance of the CDS view. Based on the serviceQuality, the consumer can decid
a view ts to the demanded response time and throughput requirements. There are
levels of service quality: 'A', 'B', 'C' and 'D' corresponding to decreasing KPIs. 'A' ha
the highest requirements and 'D' the lowest. There is one additional level 'X' where
KPIs are speci ed. This level is used as the default. serviceQuality 'P' is reserved
views that are used to structure the view hierarchy and that don't have any consum
outside of the hierarchy.

Scope:[#ENTITY, #TABLE_FUNCTION]

[Link] The sizeCategory is used to support the resource consumption within HANA . The
resource consumption on HANA is mainly driven by the set of data which has to be
searched through and the set of data which has to be materialized in order to comp
the result set. These are the different sizeCategory labels for CDS views:

S: Expected number of rows is < 1.000

M: Expected number of rows is is between 1.000 and 99.999

L: Expected number of rows is between 100.000 and 9.999.999

XL: Expected number of rows is between 10.000.000 and 99.999.999

XXL: expected number of rows is >= 100.000.000

Scope:[#ENTITY, #TABLE_FUNCTION]

[Link]: References the calculation class for the annotated virtual element.
Scope: [ELEMENT]

This annotation de nes the code exit for virtual elements. The query framework is
during runtime to retreive the values for the virtual element in the calculation class

To reference the calculation class, ABAP: must be added to the string reference.

Examples
Example 1

This example demonstrates how you can de ne language-dependent texts with a text association.

 Sample Code
define view I_Material
association [0..*] to I_MaterialText as _Text ... {
@[Link]: ’_Text’
key Material,
_Text, ...
}

define view I_MaterialText ... {


key Material,
@[Link]: true
key Language,
@[Link]: true
MaterialName,
@[Link]: true
MaterialDescription, ...
}

This is custom documentation. For more information, please visit the SAP Help Portal 56
9/8/2024
Example 2

This example demonstrates how you can de ne language-independent texts within the same view.

 Sample Code
define view I_Plant ... {
@[Link]: [’PlantName’]
key Plant,
@[Link]: true
PlantName, ...
}

OData Annotations
Capture OData-related aspects to expose data gained from a CDS entity in an OData service.

Scope and De nition

Annotation OData
{
@Scope:[#ELEMENT]
etag : Boolean default true;

@Scope:[#ENTITY]
entitySet
{
name : String(30);
};
entityType
{
name : String(128);
};

action: array of {
name : String(128);
localName : String(30);
};
property
{
name : String(128);
};

@Scope:[#SERVICE]
schema
{
name : String(128);
};

Usage
OData annotations de ne OData speci c properties in backend development objects.

Runtime:

Exposed for OData

Annotation Value Description

This is custom documentation. For more information, please visit the SAP Help Portal 57
9/8/2024

Annotation Value Description

[Link] array of Scope: [ ELEMENT ]

Mandatory Values: Denotes the external name of an action for an arbitrary OData service. The
annotation maps the localName to the external OData name.
localName

Name

localName String(30) Denotes the action name for mapping to the OData action name (name).

name String(128 Provides the action name for OData.

[Link] String(30) Scope: [ ENTITY]

Denotes the external name of the entity set for an arbitrary OData service.

 Note
You can also de ne the name of the entity set in the service de nition by using
an alias: expose /DMO/C_Travel_U as Travel. The name of the alias in
the service de nition will be used even if you use the annotation in the CDS
view.

[Link] String(128) Scope: [ENTITY]

Denotes the external name of the entity type for an arbitrary OData service.

 Example
This example demonstrates how OData annotations can be used to change the
name of the entity type in the metadata of the OData service::

@[Link]: 'Travel'
@[Link]: 'TravelType'
define root entity /DMO/I_TRAVEL
{
key TravelID : [Link]( 8 );
… }

[Link] Boolean Scope: [ ENTITY]


default true Do not use this annotation. Declare ETags in behavior de nitions.

[Link] String(128) Scope: [ELEMENT ] in abstract entities

Denotes the external name of CDS elements, parameters or associations for the
properties of an abstract entity.

[Link] String(128) Scope: [ SERVICE ]

Denotes the external name of the service in an OData representation.

This annotation is used in service de nitions.

Search Annotations
This annotation marks a view as searchable. You de ne the fuzziness threshold as well as the speci cs of term mappings at
element level.

This is custom documentation. For more information, please visit the SAP Help Portal 58
9/8/2024

Scope and De nition

@Scope:[#ENTITY]
Annotation Search
{
searchable : Boolean default true;
};
@Scope:[#ELEMENT]
Annotation Search
{
defaultSearchElement : Boolean default true;
ranking : String(6) enum { HIGH = 'high'; MEDIUM = 'medium'; LOW = 'low'; } default #MEDIUM;
fuzzinessThreshold : Decimal(3,2);
termMappingDictionary : String(128);
termMappingListId : array of String(32);
};

Usage

Annotation Meaning

[Link] De nes if a CDS entity is generally relevant for search scenarios. This annotation must be set in
case other search-related annotations are being de ned for elements of the respective CDS
entity. The annotation offers a general switch and a means to quickly detect whether a view is
relevant or not.

Scope: #Entity

Evaluation Runtime (Engine): Interpreted by Enterprise Search and SADL

Values:

Value Description

Boolean (true, false) De nes whether a view is relevant for search or not.

Default: true

[Link] Speci es that the element is to be considered in a freestyle search (for example a SELECT…)
where no columns are speci ed.

Usually, such a search must not operate on all elements – for performance reasons, and
because not all elements (e.g. internal keys) do qualify for this kind of access.

Scope: #Element

Evaluation Runtime (Engine): Interpreted by Enterprise Search and SADL

Values:

Value Description

Boolean (true, false) De nes weather the element is to be considered in a freestyle


search.
Default: true

[Link] Speci es how relevant the values of an element are for ranking, if the freestyle search terms
match the element value.

Scope: #Element

Evaluation Runtime (Engine) : Interpreted by Enterprise Search

Values:

Value Description

This is custom documentation. For more information, please visit the SAP Help Portal 59
9/8/2024

Annotation Meaning

HIGH The element is of high relevancy; this holds usually for ID and
their descriptions.

MEDIUM The element is of medium relevancy; this holds usually for


other, important element. This is the default.

LOW Although the element is relevant for freestyle search, a hit in


this element has no real signi cance for a result item's ranking.

[Link] Speci es the least level of fuzziness (with regard to some comparison criteria passed at
runtime) the element has to have to be considered in a fuzzy search at all.

 Note
A fuzzy search enables a certain degree of error tolerance and returns records even if the
search term contains additional or missing characters or other types of spelling errors.

 Note
To perform a fuzzy search you have to set the search mode to fuzzy in the customizing
settings of your ABAP system. Find the customizing node under SAP NetWeaver
Implementation Guide Search and Operational Analytics Enterprise Search Search
Con guration Set Parameters for Federated Search .

If in the customizing a value for Fuzzy Similarity is present, the value of the parameter
[Link] will become void.

Scope: #Element

Evaluation Runtime (Engine): Interpreted by SADL

Values:

Value Description

Decimal (3,2) The least level of fuzziness the element has to have to be
considered in a fuzzy search at all, e.g. 0.7.

The value can be between 0 and 1.

We recommend using the default value 0.7 to start with. Later


on, you can ne-tune the search settings based on your
experiences with the search. You can also ne-tune the search
using feedback collected from your users. A value between
0.7 and 0.99 would be most useful. Use 1 for exact matches.

[Link] Speci es the table that holds the term mappings (synonyms) to be considered in the context of
a search on this view.

Scope: #Element

Evaluation Runtime (Engine): No engine usage right now. Reserved for future usage.

Values:

Value Description

String(128) De nes the term mapping dictionary, e.g. a table or entity.

This is custom documentation. For more information, please visit the SAP Help Portal 60
9/8/2024

Annotation Meaning

[Link] Speci es one or multiple list IDs within the term mapping dictionary mentioned before.

The list is implemented as a column of the term mapping table, with the list ID as content of
this column. This concept has the aim to enable overarching term mapping dictionaries while
being able to separate domain-speci c content at the same time.

Scope: #Element

Evaluation Runtime (Engine): No engine usage right now. Reserved for future usage.

Values:

Value Description

Array of String(32) De nes one or more columns of the term mapping dictionary.

Example
The following example demonstrates how the search annotations are used in a CDS view.

 Sample Code
@[Link]: true

define view demo_search


as select from db_flight
{
@[Link]: true
@[Link]: 0.7
key carrid,
key connid,
@[Link]: true
@[Link]: 0.7
fldate,
price,
currencycode
}

The search is executed primarily on the elements carrid and fldate with a fuzziness threshold of 0.7.

Semantics Annotations
Used by the core engines for data processing and data consumption

Scope and De nition

@Scope: [#ELEMENT, #PARAMETER]


Annotation Semantics
address
{
type : array of String(10) enum
{
HOME;
WORK;
PREF;
OTHER;
};
city : Boolean default true;
street : Boolean default true;
streetNoNumber : Boolean default true;

This is custom documentation. For more information, please visit the SAP Help Portal 61
9/8/2024
number : Boolean default true;
country : Boolean default true;
region : Boolean default true;
subRegion : Boolean default true;
zipCode : Boolean default true;
postBox : Boolean default true;
label : Boolean default true;
};
amount
{
currencyCode : ElementRef;
};
businessDate
{
at : Boolean default true;
from : Boolean default true;
to : Boolean default true;
};
calendar
{
dayOfMonth : Boolean default true;
dayOfYear : Boolean default true;
week : Boolean default true;
month : Boolean default true;
quarter : Boolean default true;
halfyear : Boolean default true;
year : Boolean default true;
yearWeek : Boolean default true;
yearMonth : Boolean default true;
yearQuarter : Boolean default true;
yearHalfyear : Boolean default true;
};
currencyCode : Boolean default true;
dateTime : Boolean default true;
durationInDays : Boolean default true;
durationInHours : Boolean default true;
durationInMinutes : Boolean default true;
durationInSeconds : Boolean default true;
eMail
{
type : array of String(10) enum
{
HOME;
WORK;
PREF;
OTHER;
};
address : Boolean default true;
from : Boolean default true;
sender : Boolean default true;
to : Boolean default true;
cc : Boolean default true;
bcc : Boolean default true;
subject : Boolean default true;
body : Boolean default true;
keywords : Boolean default true;
received : Boolean default true;
};
fiscal
{
yearVariant : Boolean default true;
period : Boolean default true;
year : Boolean default true;
yearPeriod : Boolean default true;
quarter : Boolean default true;
yearQuarter : Boolean default true;
week : Boolean default true;
yearWeek : Boolean default true;
dayOfYear : Boolean default true;
};
language : Boolean default true;
largeObject
{
mimeType : ElementRef;

This is custom documentation. For more information, please visit the SAP Help Portal 62
9/8/2024
fileName : ElementRef;
contentDispositionPreference: String(30) enum { ATTACHMENT;
INLINE; };
};
mimeType : Boolean default true;
name
{
fullName : Boolean default true;
givenName : Boolean default true;
additionalName : Boolean default true;
familyName : Boolean default true;
nickName : Boolean default true;
suffix : Boolean default true;
prefix : Boolean default true;
jobTitle : Boolean default true;
};
organization
{
name : Boolean default true;
unit : Boolean default true;
role : Boolean default true;
};
quantity
{
unitOfMeasure : ElementRef;
};
signReversalIndicator : Boolean default true;
systemDateTime
{
createdAt : Boolean default true;
lastChangedAt : Boolean default true;
localInstanceLastChangedAt : Boolean default true;
};
telephone
{
type : array of String(10) enum
{
HOME;
CELL;
WORK;
FAX;
PREF;
TEXT;
VOICE;
VIDEO;
PAGER;
TEXT_PHONE;
};
};
text : Boolean default true;
unitOfMeasure : Boolean default true;
user
{
createdBy : Boolean default true;
lastChangedBy : Boolean default true;
localInstanceLastChangedBy : Boolean default true;
};
uuid : Boolean default true;

Usage
Semantic annotations complement the concept of semantic data types, while semantic data types always introduce speci c
behavior in the provider/core infrastructure (through dedicated operations or conversion functions).

Semantic annotations allow the standardizing of semantics that only have an impact on the consumption side (such as currency
code representation together with the amount).

Annotation Meaning

This is custom documentation. For more information, please visit the SAP Help Portal 63
9/8/2024

Annotation Meaning

Annotations belonging to [Link] tag elements of addresses that can be used in contact cards.

Scope: [ELEMENT, PARAMETER]

Evaluation Runtime (Engine): Interpreted by the RAP runtime engine (SADL): Translates CDS annotations into the corresponding OData
annotations.

[Link] [] This annotation tags an element that contains an address.

Scope: [ELEMENT]

Values: String(10)

The following enumerations are provided

#HOME Home address

#WORK Work address

#PREF Preferred address (default)

OTHER other address

[Link] Boolean default The annotated eld contains a plain-text


true string that contains the name of a city.

[Link] The annotated eld contains a plain-text


string that contains the name of a country.

[Link] The annotated eld contains a plain-text


string representing the formatted address
for printing.

[Link] The annotated eld contains a street


number separated from a street name.

[Link] The annotated eld contains information


about a post office box.

[Link] The annotated eld contains a plain-text


string that contains the name of a region.

[Link] The annotated eld contains a street


name and a street number.

[Link] The annotated eld contains a street


name separated from a street number.

[Link] The annotated eld contains a plain-text


string that contains the name of a
subregion.

[Link] The annotated eld contains a numeric


string that contains the ZIP code (type of
postal code used within the United
States).

This is custom documentation. For more information, please visit the SAP Help Portal 64
9/8/2024

Annotation Meaning

[Link] This annotation tags an element that contains a currency


amount.

Scope: [ELEMENT]

Evaluation Runtime (Engine): Interpreted by the RAP runtime


engine (SADL). Translates CDS annotations into the
corresponding OData annotations.

Values:

elementRef The annotated eld contains a monetary


amount, and the corresponding currency
code is contained in the referenced eld.

Annotations belonging to [Link] denotes dates in the business context.

Scope: [ELEMENT, PARAMETER]

Evaluation Runtime (Engine):Interpreted by the RAP runtime engine (SADL). Translates CDS annotations into the corresponding OData
annotations.

[Link] Boolean default The value of the annotated eld contains a


true business date referring to a point in time.

[Link] The value of the annotated eld contains a


business date specifying the start of a
time period.

[Link] The value of the annotated eld contains a


business date specifying the end of a time
period.

Annotations belonging to [Link] follow the iCalendar standard (RFC5545 )

Scope: [ELEMENT, PARAMETER]

Evaluation Runtime (Engine): SADL: Translates CDS annotations into the corresponding OData annotations

Values: Boolean default true

[Link] Boolean default The value of the annotated eld is a day


true number relative to a calendar month.

 Example
1 - 31

[Link] The value of the annotated eld is a day


number relative to a calendar year.

 Example
1 - 366

[Link] The value of the annotated eld is a half


year number relative to a calendar year.

 Example
1 or 2

This is custom documentation. For more information, please visit the SAP Help Portal 65
9/8/2024

Annotation Meaning

[Link] The value of the annotated eld encodes a


calendar month number as a string
following the logical pattern MM consisting
of two digits.

 Example
The string matches the regex pattern
0[1-9]|1[0-2]

[Link] The value of the annotated eld encodes a


calendar quarter number as a string
following the logical pattern Q consisting
of a single digit.

 Example
The string matches the regex pattern
[1-4]

[Link] The value of the annotated eld encodes a


calendar week number as a string
following the logical pattern WW consisting
of two digits.

 Example
The string matches the regex pattern
0[1-9]|[1-4][0-9]|5[2-3]

[Link] The value of the annotated eld encodes a


year number as a string following the
logical pattern (-?)YYYY(Y*) consisting
of an optional minus sign for years B.C.,
followed by at least four digits.

 Example
The string matches the regex pattern
-?([1-9][0-9]{3,}|0[0-9]{3})

[Link] This annotation tags a eld containing a currency code

This can be either an ISO code or an SAP currency code


(data type CUKY).

Scope: [ELEMENT, PARAMETER]

Evaluation Runtime (Engine): Interpreted by the RAP runtime


engine (SADL). Translates CDS annotations into the
corresponding OData annotations.

Values: Boolean default true

This is custom documentation. For more information, please visit the SAP Help Portal 66
9/8/2024

Annotation Meaning

[Link] This annotation tags a eld containing a date with time value.

Scope: [ELEMENT,PARAMETER]

Evaluation Runtime (Engine): Interpreted by the RAP runtime


engine (SADL). Translates CDS annotations into the
corresponding OData annotations.

Values: Boolean default true

[Link] This annotation tags a eld containing a number that describes


a time period in days.

Scope: [ELEMENT,PARAMETER]

Evaluation Runtime (Engine): Interpreted by the RAP runtime


engine (SADL). Translates CDS annotations into the
corresponding OData annotations.

Values: Boolean default true

[Link] This annotation tags a eld containing a number that described


a time period in hours.

Scope: [ELEMENT,PARAMETER]

Evaluation Runtime (Engine): Interpreted by the RAP runtime


engine (SADL). Translates CDS annotations into the
corresponding OData annotations.

Values: Boolean default true

[Link] This annotation tags a eld containing a number that describes


a time period in minutes.

Scope: [ELEMENT,PARAMETER]

Evaluation Runtime (Engine): Interpreted by the RAP runtime


engine (SADL). Translates CDS annotations into the
corresponding OData annotations.

Values: Boolean default true

[Link] This annotation tags a eld containing a number that describes


a time period in seconds.

Scope: [ELEMENT,PARAMETER]

Evaluation Runtime (Engine): Interpreted by the RAP runtime


engine (SADL). Translates CDS annotations into the
corresponding OData annotations.

Values: Boolean default true

Annotations belonging to [Link] are required for time-based calculations in analytical use cases.

Scope: [ELEMENT, PARAMETER]

Evaluation Runtime (Engine): Some attributes contain the respective information (as plain integers), and the processor needs the
semantics in order to identify them.

This is custom documentation. For more information, please visit the SAP Help Portal 67
9/8/2024

Annotation Meaning

[Link] Boolean default A scal period is covered by nancial


true reports, for example, an annual report
covers a scal period of one year, but a
quarterly report includes accounting data
for three months.
The value of the annotated eld encodes a
scal period as a string following the
logical pattern PPP consisting of three
digits. This scal period usually is a
quarter of a year.

 Example
The string matches the regex pattern
[0-9]{3}

[Link] A scal period is covered by nancial


reports, for example, an annual report
covers a scal period of one year, but a
quarterly report includes accounting data
for three months.
The value of the annotated eld encodes a
scal quarter as a string following the
logical pattern Q consisting of one digit.

 Example
The string matches the regex pattern
[1-4]

[Link] A scal period is covered by nancial


reports, for example, an annual report
covers a scal period of one year, but a
quarterly report includes accounting data
for three months.
The value of the annotated eld encodes a
scal week as a string following the
pattern WW consisting of two digits.

 Example
The string matches the regex pattern
0[1-9]|[1-4][0-9]|5[2-3]

[Link] The value of the annotated eld encodes a


scal year number as a string following
the logical pattern YYYY consisting of four
digits.

 Example
The string matches the regex pattern
[1-9][0-9]{3}

This is custom documentation. For more information, please visit the SAP Help Portal 68
9/8/2024

Annotation Meaning

[Link] The value of the annotated eld encodes a


scal year and period as a string following
the logical pattern YYYYPPP consisting of
seven digits. The last three digits
represent the scal period in the year.

 Example
The string matches the regex pattern
([1-9][0-9]{3})([0-9]{3})

[Link] The value of the annotated eld encodes a


scal year and quarter as a string
following the logical pattern YYYYQ
consisting of ve digits. The last digit
represents the scal quarter in the year.

 Example
The string matches the regex pattern
([1-9][0-9]{3,}|0[0-9]{3})[1-4]

[Link] The value of the annotated eld encodes a


scal year and period as a string following
the logical pattern YYYYWW consisting of
seven digits. The last three digits
represent the scal period in the year.

 Example
The string matches the regex pattern
([1-9][0-9]{3,}|0[0-9]{3})(0[1-9]|[1-4]
[0-9]|5[2-3])

[Link] The value of the annotated eld encodes a


scal year variant, which describes the
number of periods in a scal year and how
they match the calendar year.

[Link] This annotation identi es a language.

Scope: [ELEMENT, PARAMETER]

Evaluation Runtime (Engine): Interpreted by the RAP runtime


engine (SADL). Translates CDS annotations into the
corresponding OData annotations.

Values: Boolean default true

Annotations belonging to [Link] tag elements that refer to details about an organization.

Scope: [ELEMENT, PARAMETER]

Evaluation Runtime (Engine):Interpreted by the RAP runtime engine (SADL). Translates CDS annotations into the corresponding OData
annotations.

[Link] Boolean default The value of the annotated eld contains


true the organization name.

This is custom documentation. For more information, please visit the SAP Help Portal 69
9/8/2024

Annotation Meaning

[Link] The value of the annotated eld specify


the function or part played in a particular
situation by the object the vCard
represents.

 Example
ROLE:Project Leader

[Link] The value of the annotated eld contains


the name of the organization unit.

[Link] This annotation tags an element that contains a measured


quantity.

Scope: [ELEMENT, PARAMETER]

Evaluation Runtime (Engine): Interpreted by the RAP runtime


engine (SADL). Translates CDS annotations into the
corresponding OData annotations.

Values:

elementRef The value of the annotated eld


references a unit of measure related to a
measured quantity.

[Link] This annotation reverses the sign of the annotated view element

Scope: [ELEMENT, PARAMETER]

This annotation is used in analytical queries of CDS view with


@[Link]: #HIERARCHY
annotations.

Values: Boolean (default true)

Annotations belonging to [Link] tag elements that specify the date/time that is recorded by the technical
infrastructure/database.

Scope: [ELEMENT, PARAMETER]

Evaluation Runtime (Engine): Interpreted by the RAP runtime engine (SADL). Translates CDS annotations into the corresponding OData
annotations.

[Link] The annotated element contains a timestamp indicating when


the database record was created.

Values: Boolean default true

[Link] The annotated element contains a timestamp indicating when


the database record was last changed.

Values: Boolean default true

The annotated element is used for the total ETag eld in


managed scenarios with draft. It is automatically updated by
the RAP managed runtime framework.

This is custom documentation. For more information, please visit the SAP Help Portal 70
9/8/2024

Annotation Meaning

[Link] The annotated element contains a timestamp indicating when


the database record was last changed.

Values: Boolean default true

The annotated element is used for the ETag master eld in


managed scenarios. It is automatically updated by the RAP
managed runtime framework.

[Link] This annotation identi es a human-readable text that is not


necessarily language-dependent.

Scope: [ELEMENT, PARAMETER]

Evaluation Runtime (Engine): Interpreted by the RAP runtime


engine (SADL). Translates CDS annotations into the
corresponding OData annotations.

Values: Boolean default true

[Link] This annotation tags a eld as containing a unit of measure.

Scope: [ELEMENT, PARAMETER]

Evaluation Runtime (Engine): Interpreted by the RAP runtime


engine (SADL). Translates CDS annotations into the
corresponding OData annotations.

Values: Boolean default true

Annotations belonging to [Link] tag elements that de ne the ID of the user related to the data record.

Scope: [ELEMENT, PARAMETER]

Evaluation Runtime (Engine): Interpreted by the RAP runtime engine (SADL). Translates CDS annotations into the corresponding OData
annotations.

[Link] The value of the annotated eld speci es the user who created
a data record.

Values: Boolean default true

[Link] The value of the annotated eld speci es the user who changed
a data record at last.

Values: Boolean default true

[Link] The value of the annotated eld speci es the user who changed
a data record at last.

Values: Boolean default true

[Link] This annotated eld contains a URL and the value is the mime
type of the resource addressed by the URL. A mime type is
required when opening a document for viewing, or when
accessing document content during text analysis. In UIs,
documents are usually presented with an icon that symbolizes
their mime type.”

[Link] The annotated eld contains a mime type. It is required when


opening a document for viewing, or when accessing document
content during text analysis. In UIs, documents are usually
presented with an icon that symbolizes their mime type.

Values:Boolean default true

This is custom documentation. For more information, please visit the SAP Help Portal 71
9/8/2024

Annotation Meaning

[Link] The annotation references an optional eld containing the le


name of a mime object.

Values:String(30) enum

[Link] The annotation provides a list of acceptable mime types for the
related stream property to restrict or verify the user entry
accordingly. If any subtype is accepted, this can be indicated
by *.

Values:Array of String(255)

Examples
Example 1

The following CDS view fetches sales order items. Here, the annotations assign the units and currencies to the corresponding
elds.

 Sample Code
DEFINE VIEW SalesOrderItem as select from ...
{
...

@[Link]
currency_code as CurrencyCode,

@[Link]: 'CurrencyCode'
gross_amount as GrossAmount,

@[Link]
unit_of_measure as UnitOfMeasure,

@[Link]: 'UnitOfMeasure'
quantity as Quantity,

...
}

Example 2

The following CDS view fetches language-dependant data annotating the corresponding language elds and text elds:

 Sample Code
DEFINE VIEW chartOfAccountsTexts AS SELECT FROM ...
{
key ktopl AS chartOfAccounts,

@[Link]: true
key spras AS language,

@[Link]: true
ktplt AS chartOfAccountsName
}

UI Annotations
This is custom documentation. For more information, please visit the SAP Help Portal 72
9/8/2024
Represent semantic views on business data through the use of speci c patterns that areindependent of UI technologies.

Scope and De nition

 Sample Code
@[Link] : true

{
@Scope:[#ENTITY]
headerInfo
{
@[Link] : 40
typeName : String(60);
@[Link] : 40
typeNamePlural : String(60);
typeImageUrl : String(1024);
imageUrl : ElementRef;
title
{
type : String(40) enum
{
STANDARD;
WITH_INTENT_BASED_NAVIGATION;
WITH_NAVIGATION_PATH;
WITH_URL;
} default #STANDARD;
@[Link] : 40
label : String(60);
iconUrl : String(1024);
criticality : ElementRef;
criticalityRepresentation : String(12) enum
{
WITHOUT_ICON;
WITH_ICON;
} default #WITHOUT_ICON;
value : ElementRef;
targetElement : ElementRef;
url : ElementRef;
};
description
{
type : String(40) enum
{
STANDARD;
WITH_INTENT_BASED_NAVIGATION;
WITH_NAVIGATION_PATH;
WITH_URL;
} default #STANDARD;
@[Link] : 40
label : String(60);
iconUrl : String(1024);
criticality : ElementRef;
criticalityRepresentation : String(12) enum
{
WITHOUT_ICON;
WITH_ICON;
} default #WITHOUT_ICON;
value : ElementRef;
targetElement : ElementRef;
url : ElementRef;
};
};
@Scope:[#ENTITY]
badge
{
headLine
{
type : String(40) enum
{
STANDARD;
WITH_INTENT_BASED_NAVIGATION;
This is custom documentation. For more information, please visit the SAP Help Portal 73
9/8/2024
WITH_NAVIGATION_PATH;
WITH_URL;
} default #STANDARD;
@[Link] : 40
label : String(60);
iconUrl : String(1024);
criticality : ElementRef;
criticalityRepresentation : String(12) enum
{
WITHOUT_ICON;
WITH_ICON;
} default #WITHOUT_ICON;
value : ElementRef;
targetElement : ElementRef;
url : ElementRef;
};
title
{
type : String(40) enum
{
STANDARD;
WITH_INTENT_BASED_NAVIGATION;
WITH_NAVIGATION_PATH;
WITH_URL;
} default #STANDARD;
@[Link] : 40
label : String(60);
iconUrl : String(1024);
criticality : ElementRef;
criticalityRepresentation : String(12) enum
{
WITHOUT_ICON;
WITH_ICON;
} default #WITHOUT_ICON;
value : ElementRef;
targetElement : ElementRef;
url : ElementRef;
};
typeImageUrl : String(1024);
imageUrl : ElementRef;
mainInfo
{
type : String(40) enum
{
STANDARD;
WITH_INTENT_BASED_NAVIGATION;
WITH_NAVIGATION_PATH;
WITH_URL;
} default #STANDARD;
@[Link] : 40
label : String(60);
iconUrl : String(1024);
criticality : ElementRef;
criticalityRepresentation : String(12) enum
{
WITHOUT_ICON;
WITH_ICON;
} default #WITHOUT_ICON;
value : ElementRef;
targetElement : ElementRef;
url : ElementRef;
};
secondaryInfo
{
type : String(40) enum
{
STANDARD;
WITH_INTENT_BASED_NAVIGATION;
WITH_NAVIGATION_PATH;
WITH_URL;
} default #STANDARD;
@[Link] : 40
label : String(60);
iconUrl : String(1024);

This is custom documentation. For more information, please visit the SAP Help Portal 74
9/8/2024
criticality : ElementRef;
criticalityRepresentation : String(12) enum
{
WITHOUT_ICON;
WITH_ICON;
} default #WITHOUT_ICON;
value : ElementRef;
targetElement : ElementRef;
url : ElementRef;
};
};
@Scope:[#ENTITY]
chart : array of
{
qualifier : String(120);
@[Link] : 40
title : String(60);
@[Link] : 80
description : String(120);
chartType : String(40) enum
{
COLUMN;
COLUMN_STACKED;
COLUMN_STACKED_100;
COLUMN_DUAL;
COLUMN_STACKED_DUAL;
COLUMN_STACKED_DUAL_100;
BAR;
BAR_STACKED;
BAR_STACKED_100;
BAR_DUAL;
BAR_STACKED_DUAL;
BAR_STACKED_DUAL_100;
AREA;
AREA_STACKED;
AREA_STACKED_100;
HORIZONTAL_AREA;
HORIZONTAL_AREA_STACKED;
HORIZONTAL_AREA_STACKED_100;
LINE;
LINE_DUAL;
COMBINATION;
COMBINATION_STACKED;
COMBINATION_STACKED_DUAL;
HORIZONTAL_COMBINATION_STACKED;
HORIZONTAL_COMBINATION_STACKED_DUAL;
PIE;
DONUT;
SCATTER;
BUBBLE;
RADAR;
HEAT_MAP;
TREE_MAP;
WATERFALL;
BULLET;
VERTICAL_BULLET;
HORIZONTAL_WATERFALL;
HORIZONTAL_COMBINATION_DUAL;
DONUT_100;
};
dimensions : array of ElementRef;
measures : array of ElementRef;
dimensionAttributes : array of
{
dimension : ElementRef;
role : String(10) enum
{
CATEGORY;
SERIES;
CATEGORY2;
};
valuesForSequentialColorLevels: array of String(1024);
emphasizedValues: array of String(1024);
};

This is custom documentation. For more information, please visit the SAP Help Portal 75
9/8/2024
measureAttributes : array of
{
measure : ElementRef;
role : String(10) enum
{
AXIS_1;
AXIS_2;
AXIS_3;
};
asDataPoint : Boolean default true;
useSequentialColorLevels: Boolean default true;
};
actions : array of
{
type : String(40) enum
{
FOR_ACTION;
FOR_INTENT_BASED_NAVIGATION;
};
@[Link] : 40
label : String(60);
dataAction : String(120);
requiresContext : Boolean default true;
invocationGrouping : String(12) enum
{
ISOLATED;
CHANGE_SET;
} default #ISOLATED;
semanticObjectAction : String(120);
};
};
@Scope:[#ENTITY]
selectionPresentationVariant : array of
{
qualifier : String(120);
id : String(120);
@[Link] : 40
text : String(60);
selectionVariantQualifier : String(120);
presentationVariantQualifier : String(120);
};
@Scope:[#ENTITY]
selectionVariant : array of
{
qualifier : String(120);
id : String(120);
@[Link] : 40
text : String(60);
parameters : array of
{
name : ParameterRef;
value : String(1024);
};
filter : String(1024);
};
@Scope:[#ENTITY]
presentationVariant : array of
{
qualifier : String(120);
id : String(120);
@[Link] : 40
text : String(60);
maxItems : Integer;
sortOrder : array of
{
by : ElementRef;
direction : String(4) enum
{
ASC;
DESC;
};
};
groupBy : array of ElementRef;
totalBy : array of ElementRef;

This is custom documentation. For more information, please visit the SAP Help Portal 76
9/8/2024
total : array of ElementRef;
includeGrandTotal : Boolean default true;
initialExpansionLevel : Integer;
requestAtLeast : array of ElementRef;
visualizations : array of
{
type : String(40) enum
{
AS_LINEITEM;
AS_CHART;
AS_DATAPOINT;
};
qualifier : String(120);
element : ElementRef;
};
selectionFieldsQualifier : String(120);
};

@Scope:[#ELEMENT, #PARAMETER]
hidden : Boolean default true;
@Scope:[#ELEMENT]
masked : Boolean default true;
@Scope:[#ELEMENT]
multiLineText : Boolean default true;
@Scope:[#ELEMENT]
lineItem : array of
{
@Scope: [#ELEMENT, #ENTITY]
qualifier : String(120);
position : DecimalFloat;
exclude : Boolean default true;
hidden : Boolean default true;
importance : String(6) enum { HIGH; MEDIUM; LOW; };
type : String(40) enum
{
AS_ADDRESS;
AS_CHART;
AS_CONNECTED_FIELDS;
AS_CONTACT;
AS_DATAPOINT;
AS_FIELDGROUP;
FOR_ACTION;
FOR_INTENT_BASED_NAVIGATION;
STANDARD;
WITH_INTENT_BASED_NAVIGATION;
WITH_NAVIGATION_PATH;
WITH_URL;
} default #STANDARD;
@[Link] : 40
label : String(60);
iconUrl : String(1024);
@Scope: [#ELEMENT, #ENTITY]
criticality : ElementRef;
criticalityRepresentation : String(12) enum
{
WITHOUT_ICON;
WITH_ICON;
} default #WITHOUT_ICON;
dataAction : String(120);
requiresContext : Boolean default true;
invocationGrouping : String(12) enum { ISOLATED; CHANGE_SET; } default #ISOLATED;
semanticObjectAction : String(120);
value : ElementRef;
valueQualifier : String(120);
targetElement : ElementRef;
url : ElementRef;
};
@Scope:[#ELEMENT]
identification : array of
{
position : DecimalFloat;
exclude : Boolean default true;
importance : String(6) enum { HIGH; MEDIUM; LOW; };
type : String(40) enum

This is custom documentation. For more information, please visit the SAP Help Portal 77
9/8/2024
{
AS_ADDRESS;
AS_CHART;
AS_CONNECTED_FIELDS;
AS_CONTACT;
AS_DATAPOINT;
AS_FIELDGROUP;
FOR_ACTION;
FOR_INTENT_BASED_NAVIGATION;
STANDARD;
WITH_INTENT_BASED_NAVIGATION;
WITH_NAVIGATION_PATH;
WITH_URL;
} default #STANDARD;
@[Link] : 40
label : String(60);
iconUrl : String(1024);
criticality : ElementRef;
criticalityRepresentation : String(12) enum
{
WITHOUT_ICON;
WITH_ICON;
} default #WITHOUT_ICON;
dataAction : String(120);
requiresContext : Boolean default true;
invocationGrouping : String(12) enum { ISOLATED; CHANGE_SET; } default #ISOLATED;
semanticObjectAction : String(120);
value : ElementRef;
valueQualifier : String(120);
targetElement : ElementRef;
url : ElementRef;
};
@Scope:[#ELEMENT]
statusInfo : array of
{
position : DecimalFloat;
exclude : Boolean default true;
importance : String(6) enum { HIGH; MEDIUM; LOW; };
type : String(40) enum
{
AS_ADDRESS;
AS_CHART;
AS_CONNECTED_FIELDS;
AS_CONTACT;
AS_DATAPOINT;
AS_FIELDGROUP;
FOR_ACTION;
FOR_INTENT_BASED_NAVIGATION;
STANDARD;
WITH_INTENT_BASED_NAVIGATION;
WITH_NAVIGATION_PATH;
WITH_URL;
} default #STANDARD;
@[Link] : 40
label : String(60);
iconUrl : String(1024);
criticality : ElementRef;
criticalityRepresentation : String(12) enum
{
WITHOUT_ICON;
WITH_ICON;
} default #WITHOUT_ICON;
dataAction : String(120);
requiresContext : Boolean default true;
invocationGrouping : String(12) enum { ISOLATED; CHANGE_SET; } default #ISOLATED;
semanticObjectAction : String(120);
value : ElementRef;
valueQualifier : String(120);
targetElement : ElementRef;
url : ElementRef;
};
@Scope:[#ELEMENT]
fieldGroup : array of
{

This is custom documentation. For more information, please visit the SAP Help Portal 78
9/8/2024
qualifier : String(120);
@[Link] : 40
groupLabel : String(60);
position : DecimalFloat;
exclude : Boolean default true;
importance : String(6) enum { HIGH; MEDIUM; LOW; };
type : String(40) enum
{
AS_ADDRESS;
AS_CHART;
AS_CONNECTED_FIELDS;
AS_CONTACT;
AS_DATAPOINT;
AS_FIELDGROUP;
FOR_ACTION;
FOR_INTENT_BASED_NAVIGATION;
STANDARD;
WITH_INTENT_BASED_NAVIGATION;
WITH_NAVIGATION_PATH;
WITH_URL;
} default #STANDARD;
@[Link] : 40
label : String(60);
iconUrl : String(1024);
criticality : ElementRef;
criticalityRepresentation : String(12) enum
{
WITHOUT_ICON;
WITH_ICON;
} default #WITHOUT_ICON;
dataAction : String(120);
requiresContext : Boolean default true;
invocationGrouping : String(12) enum { ISOLATED; CHANGE_SET; } default #ISOLATED;
semanticObjectAction : String(120);
value : ElementRef;
valueQualifier : String(120);
targetElement : ElementRef;
url : ElementRef;
};
@Scope:[#ELEMENT]
dataPoint
{
qualifier : String(120);
@[Link] : 40
title : String(60);
@[Link] : 80
description : String(120);
@[Link] : 193
longDescription : String(250);
targetValue : DecimalFloat;
targetValueElement : ElementRef;
forecastValue : ElementRef;
minimumValue : DecimalFloat;
maximumValue : DecimalFloat;
visualization : String(12) enum
{
NUMBER;
BULLET_CHART;
DONUT;
PROGRESS;
RATING;
};
valueFormat
{
scaleFactor : DecimalFloat;
numberOfFractionalDigits : Integer;
};
referencePeriod
{
@[Link] : 80
description : String(120);
start : ElementRef;
end : ElementRef;
};

This is custom documentation. For more information, please visit the SAP Help Portal 79
9/8/2024
criticality : ElementRef;
criticalityValue : Integer enum
{
NEGATIVE;
CRITICAL;
POSITIVE;
};
criticalityRepresentation : String(12) enum
{
WITHOUT_ICON;
WITH_ICON;
} default #WITHOUT_ICON;
criticalityCalculation
{
improvementDirection : String(8) enum
{
MINIMIZE;
TARGET;
MAXIMIZE;
};
acceptanceRangeLowValue : DecimalFloat;
acceptanceRangeHighValue : DecimalFloat;
toleranceRangeLowValue : DecimalFloat;
toleranceRangeLowValueElement : ElementRef;
toleranceRangeHighValue : DecimalFloat;
toleranceRangeHighValueElement : ElementRef;
deviationRangeLowValue : DecimalFloat;
deviationRangeLowValueElement : ElementRef;
deviationRangeHighValue : DecimalFloat;
deviationRangeHighValueElement : ElementRef;
constantThresholds: array of
{
aggregationLevel: array of ElementRef;
acceptanceRangeLowValue: DecimalFloat;
acceptanceRangeHighValue: DecimalFloat;
toleranceRangeLowValue: DecimalFloat;
toleranceRangeHighValue: DecimalFloat;
deviationRangeLowValue: DecimalFloat;
deviationRangeHighValue: DecimalFloat;
};

};
trend : ElementRef;
trendCalculation
{
referenceValue : ElementRef;
isRelativeDifference : Boolean default true;
upDifference : DecimalFloat;
upDifferenceElement : ElementRef;
strongUpDifference : DecimalFloat;
strongUpDifferenceElement : ElementRef;
downDifference : DecimalFloat;
downDifferenceElement : ElementRef;
strongDownDifference : DecimalFloat;
strongDownDifferenceElement : ElementRef;
};
responsible : ElementRef;
responsibleName : String(120);
};
@Scope:[#ELEMENT]
selectionField : array of
{
qualifier : String(120);
position : DecimalFloat;
exclude : Boolean default true;
element : ElementRef;
};
@Scope:[#ELEMENT]
facet : array of
{
qualifier : String(120);
@CompatibilityContract: {
c1: { usageAllowed: false },
c2: { usageAllowed: true,

This is custom documentation. For more information, please visit the SAP Help Portal 80
9/8/2024
[Link]: [ #REMOVE ],
[Link]: [ #NONE ]} }
feature : String(40);
id : String(120);
purpose : String(40) enum
{
STANDARD;
HEADER;
QUICK_VIEW;
QUICK_CREATE;
FILTER;
} default #STANDARD;
parentId : String(120);
position : DecimalFloat;
exclude : Boolean default true;
hidden : Boolean default true;
isPartOfPreview : Boolean default true;
isSummary : Boolean default true;
isMap : Boolean default true;
importance : String(6) enum
{
HIGH;
MEDIUM;
LOW;
};
@[Link] : 40
label : String(60);
type : String(40) enum
{
COLLECTION;
ADDRESS_REFERENCE;
BADGE_REFERENCE;
CHART_REFERENCE;
CONTACT_REFERENCE;
DATAPOINT_REFERENCE;
FIELDGROUP_REFERENCE;
HEADERINFO_REFERENCE;
IDENTIFICATION_REFERENCE;
LINEITEM_REFERENCE;
STATUSINFO_REFERENCE;
URL_REFERENCE;
};
targetElement : ElementRef;
targetQualifier : String(120);
url : ElementRef;
};
@Scope:[#ENTITY, #ELEMENT]
textArrangement : String(13) enum
{
TEXT_FIRST;
TEXT_LAST;
TEXT_ONLY;
TEXT_SEPARATE;
};
//=================================================
// Version 7.69
//=================================================
@Scope: [#ELEMENT]
kpi : array of
{
qualifier : String(120);
id : String(120);
@[Link]: 10
shortDescription : String(20);
selectionVariantQualifier : String(120);
detail
{
defaultPresentationVariantQualifier : String(120);
alternativePresentationVariantQualifiers : array of String(120);
semanticObject : String(120);
semanticObjectAction : String(120);
};
dataPoint
{

This is custom documentation. For more information, please visit the SAP Help Portal 81
9/8/2024
@[Link] : 40
title : String(60);
@[Link] : 80
description : String(120);
@[Link] : 193
longDescription : String(250);
targetValue : DecimalFloat;
forecastValue : DecimalFloat;
minimumValue : DecimalFloat;
maximumValue : DecimalFloat;
valueFormat
{
scaleFactor : DecimalFloat;
numberOfFractionalDigits : Integer;
};
visualization : String(12) enum
{
NUMBER;
BULLET_CHART;
DONUT;
PROGRESS;
RATING;
};
referencePeriod {
@[Link]: 80
description : String(120);
start : ElementRef;
end : ElementRef;
};
criticality : ElementRef;
criticalityValue : Integer enum
{
NEGATIVE;
CRITICAL;
POSITIVE;
};
criticalityRepresentation : String(12) enum
{
WITHOUT_ICON;
WITH_ICON;
} default #WITHOUT_ICON;
criticalityCalculation
{
improvementDirection : String(8) enum
{
MINIMIZE;
TARGET;
MAXIMIZE;
};
acceptanceRangeLowValue : DecimalFloat;
acceptanceRangeHighValue : DecimalFloat;
toleranceRangeLowValue : DecimalFloat;
toleranceRangeHighValue : DecimalFloat;
deviationRangeLowValue : DecimalFloat;
deviationRangeHighValue : DecimalFloat;
constantThresholds : array of
{
aggregationLevel : array of ElementRef;
acceptanceRangeLowValue : DecimalFloat;
acceptanceRangeHighValue : DecimalFloat;
toleranceRangeLowValue : DecimalFloat;
toleranceRangeHighValue : DecimalFloat;
deviationRangeLowValue : DecimalFloat;
deviationRangeHighValue : DecimalFloat;
};
};
trend : ElementRef;
trendCalculation
{
referenceValue : ElementRef;
isRelativeDifference : Boolean ;
upDifference : DecimalFloat;
strongUpDifference : DecimalFloat;
downDifference : DecimalFloat;

This is custom documentation. For more information, please visit the SAP Help Portal 82
9/8/2024
strongDownDifference : DecimalFloat;
};
responsible : ElementRef;
responsibleName: String(120);
};

};

@Scope: [#ELEMENT]
valueCriticality: array of
{
qualifier : String(120);
value : String(120);
criticality : Integer enum
{
NEGATIVE;
CRITICAL;
POSITIVE;
};
};

@Scope: [#ELEMENT]
criticalityLabels : array of {
qualifier: String(120);
criticality: Integer enum
{
NEGATIVE;
CRITICAL;
POSITIVE;
};
@[Link]: 40
label: String(60);
};

@Scope: [#ELEMENT]
connectedFields : array of
{
qualifier : String(120);
@[Link] : 40
groupLabel : String(60);
@[Link] : 197
template : String(255);
name : String(120);
exclude : Boolean default true;
hidden : Boolean default true;
importance : String(6) enum { HIGH; MEDIUM; LOW; };
type : String(40) enum
{
AS_ADDRESS;
AS_CHART;
AS_CONNECTED_FIELDS;
AS_CONTACT;
AS_DATAPOINT;
AS_FIELDGROUP;
FOR_ACTION;
FOR_INTENT_BASED_NAVIGATION;
STANDARD;
WITH_INTENT_BASED_NAVIGATION;
WITH_NAVIGATION_PATH;
WITH_URL;
} default #STANDARD;
@[Link] : 40
label : String(60);
iconUrl : String(1024);
criticality : ElementRef;
criticalityRepresentation : String(12) enum
{
WITHOUT_ICON;
WITH_ICON;
} default #WITHOUT_ICON;
dataAction : String(120);
requiresContext : Boolean default true;
invocationGrouping : String(12) enum { ISOLATED; CHANGE_SET; } default #ISOLATED;
semanticObjectAction : String(120);

This is custom documentation. For more information, please visit the SAP Help Portal 83
9/8/2024
value : ElementRef;
valueQualifier : String(120);
targetElement : ElementRef;
url : ElementRef;
};

};

Usage
The focus of OData UI vocabulary developed by SAP is on usage patterns of data in UIs, not on UI patterns. The vocabulary is
completely independent of the UI technologies or devices that consume the data. The usage patterns of data used by the
OData UI vocabulary represent certain semantic views on business data. Some of them are very generic, others are based on
the concept of an entity, something tangible to end-users. Examples for entities are semantic object instances or business
object instances. Looking at different UI patterns, these data usage patterns reoccur again and again. To generate OData
annotations from CDS views, CDS annotations are reused from different domains, for example Consumption, Communication,
Semantics, EndUserText. The CDS annotations that are additionally required in a UI domain are listed in the following table.

UI Annotations

Parent Annotation Annotation Type Value

[Link]

[Link] .typeName String(60) #mandatory

 Note
This annota
@EndUser

[Link] typeNamePlural String(60) #mandatory

[Link] typeImageUrl String(1024) #optional

[Link] imageUrl elementRef #optional

This is custom documentation. For more information, please visit the SAP Help Portal 84
9/8/2024

Parent Annotation Annotation Type Value

[Link] imageData elementRef

[Link] title.

This is custom documentation. For more information, please visit the SAP Help Portal 85
9/8/2024

Parent Annotation Annotation Type Value

[Link] [Link] String(40) STAN


enum
Map
you w
addi

A sta
ODat

Whe
elem

WITH

Data
de n
the O
URL

For m

Whe
elem

Whe
elem

WITH
Data

Data
Data
to a
de n
targe
the O

For m

Whe
elem

Whe
elem

WITH

Default: STA

This is custom documentation. For more information, please visit the SAP Help Portal 86
9/8/2024

Parent Annotation Annotation Type Value

[Link] [Link] String(60) #optional

[Link] [Link] String(1024) #optional

[Link] [Link] elementRef This annotat


values 0, 1, 2

Neu

Nega

Crit

Posit

[Link] [Link] String(12) #mandatory


enum
WITH

WITH

Default:

WITHOUT_IC

[Link] [Link] ElementRef

[Link] [Link] ElementRef

[Link] [Link] ElementRef

[Link] description

This is custom documentation. For more information, please visit the SAP Help Portal 87
9/8/2024

Parent Annotation Annotation Type Value

[Link] [Link] String(40) STAN


enum
Map
you w
addi

A sta
ODat

Whe
elem

WITH

Data
de n
the O
URL

For m

Whe
elem

Whe
elem

WITH
Data

Data
Data
to a
de n
targe
the O

For m

Whe
elem

Whe
elem

WITH

Default: STA

This is custom documentation. For more information, please visit the SAP Help Portal 88
9/8/2024

Parent Annotation Annotation Type Value

[Link] [Link] String(60) #optional

[Link] [Link] String(1024) #optional

[Link] [Link] elementRef This annotat


values 0, 1, 2

Neu

Nega

Crit

Posit

[Link] [Link] String(12) #mandatory


enum
WITH

WITH

Default:

WITHOUT_IC

[Link] [Link] ElementRef

[Link] [Link] ElementRef

[Link] [Link] ElementRef

This is custom documentation. For more information, please visit the SAP Help Portal 89
9/8/2024

Parent Annotation Annotation Type Value

[Link] .[Link] String(40) STAN


enum
Map
you w
addi

A sta
ODat

Whe
elem

WITH

Data
de n
the O
URL

For m

Whe
elem

Whe
elem

WITH
Data

Data
Data
to a
de n
targe
the O

For m

Whe
elem

Whe
elem

WITH

Default: STA

This is custom documentation. For more information, please visit the SAP Help Portal 90
9/8/2024

Parent Annotation Annotation Type Value

[Link] .[Link] String (60) #Optional

[Link] .[Link] String (1024) #Optional

[Link] .[Link] ElementRef This annotat


values 0, 1, 2

Neu

Nega

Crit

Posit

[Link] .[Link] String(12)


enum WITH

WITH

Default:

WITHOUT_IC

[Link] .[Link] ElementRef

[Link] .[Link] ElementRef

[Link] .[Link] ElementRef

[Link] title.

This is custom documentation. For more information, please visit the SAP Help Portal 91
9/8/2024

Parent Annotation Annotation Type Value

[Link] [Link] String(40) STAN


enum
Map
you w
addi

A sta
ODat

Whe
elem

WITH

Data
de n
the O
URL

For m

Whe
elem

Whe
elem

WITH
Data

Data
Data
to a
de n
targe
the O

For m

Whe
elem

Whe
elem

WITH

Default: STA

This is custom documentation. For more information, please visit the SAP Help Portal 92
9/8/2024

Parent Annotation Annotation Type Value

[Link] [Link] String(60) #optional

[Link] [Link] String(1024) #optional

[Link] [Link] elementRef This annotat


values 0, 1, 2

Neu

Nega

Crit

Posit

[Link] [Link] String(12) #mandatory


enum
WITH

WITH

Default:

WITHOUT_IC

[Link] [Link] ElementRef

[Link] [Link] ElementRef

[Link] [Link] ElementRef

This is custom documentation. For more information, please visit the SAP Help Portal 93
9/8/2024

Parent Annotation Annotation Type Value

[Link] typeImageUrl String(1024); #optional

[Link] imageUrl ElementRef #optional

[Link] mainInfo

This is custom documentation. For more information, please visit the SAP Help Portal 94
9/8/2024

Parent Annotation Annotation Type Value

[Link] [Link] String(40) STAN


enum
Map
you w
addi

A sta
ODat

Whe
elem

WITH

Data
de n
the O
URL

For m

Whe
elem

Whe
elem

WITH
Data

Data
Data
to a
de n
targe
the O

For m

Whe
elem

Whe
elem

WITH

Default: STA

This is custom documentation. For more information, please visit the SAP Help Portal 95
9/8/2024

Parent Annotation Annotation Type Value

[Link] [Link] String(60) #optional

[Link] [Link] String(1024) #optional

[Link] [Link] elementRef This annotat


values 0, 1, 2

Neu

Nega

Crit

Posit

[Link] [Link] String(12) #mandatory


enum
WITH

WITH

Default:

WITHOUT_IC

[Link] [Link] ElementRef

[Link] [Link] ElementRef

[Link] [Link] ElementRef

This is custom documentation. For more information, please visit the SAP Help Portal 96
9/8/2024

Parent Annotation Annotation Type Value

[Link] secondaryInfo

This is custom documentation. For more information, please visit the SAP Help Portal 97
9/8/2024

Parent Annotation Annotation Type Value

[Link] [Link] String(40) STAN


enum
Map
you w
addi

A sta
ODat

Whe
elem

WITH

Data
de n
the O
URL

For m

Whe
elem

Whe
elem

WITH
Data

Data
Data
to a
de n
targe
the O

For m

Whe
elem

Whe
elem

WITH

Default: STA

This is custom documentation. For more information, please visit the SAP Help Portal 98
9/8/2024

Parent Annotation Annotation Type Value

[Link] [Link] String(60) #optional

[Link] [Link] String(1024) #optional

[Link] [Link] elementRef This annotat


values 0, 1, 2

Neu

Nega

Crit

Posit

[Link] [Link] String(12) #mandatory


enum
WITH

WITH

Default:

WITHOUT_IC

[Link] [Link] ElementRef

[Link] [Link] ElementRef

[Link] [Link] ElementRef

[Link] quali er String(120)

This is custom documentation. For more information, please visit the SAP Help Portal 99
9/8/2024

Parent Annotation Annotation Type Value

[Link] title String(60) #mandatory

 Note
The elemen
@EndUser

[Link] description String(120) #optional

[Link] longDescription String(250) #optional

[Link] targetValue DecimalFloat #not compat

 Caut
If you use t
[Link]

[Link] forecastValue ElementRef

[Link] minimumValue DecimalFloat

[Link] maximumValue DecimalFloat

[Link] valueFormat DecimalFloat #optional

[Link] [Link] DecimalFloat #optional

[Link] [Link] Integer #optional

This is custom documentation. For more information, please visit the SAP Help Portal 100
9/8/2024

Parent Annotation Annotation Type Value

[Link] visualization String(12) NUM


enum

The
ann

BUL
bulle

DON

PRO
prog

RAT
com

[Link] withCriticalityLabels Boolean #optional


(default:
true)

[Link] referencePeriod #optional

[Link] [Link] String(120) #optional

[Link] [Link] elementRef #optinal

[Link] [Link] elementRef #optional

[Link] criticality elementRef This annotat


values 0, 1, 2

Neu

Nega

Crit

Posit

This is custom documentation. For more information, please visit the SAP Help Portal 101
9/8/2024

Parent Annotation Annotation Type Value

[Link] criticalityValue Integer enum Nega

Criti

Posit

[Link] criticalityRepresentation String enum #mandatory

WITH

WITH

Default:

WITHOUT_IC

[Link] criticalityCalculation

[Link] [Link] String(8) MINI


enum
TAR

MAX

[Link] [Link] DecimalFloat

[Link] [Link] DecimalFloat

[Link] [Link] DecimalFloat

[Link] [Link] DecimalFloat

[Link] [Link] DecimalFloat

[Link] [Link] DecimalFloat

[Link] [Link] (array of)

[Link] [Link] (array of)


elementRef

[Link] [Link] DecimalFloat

[Link] [Link] DecimalFloat

[Link] [Link] DecimalFloat

[Link] [Link] DecimalFloat

This is custom documentation. For more information, please visit the SAP Help Portal 102
9/8/2024

Parent Annotation Annotation Type Value

[Link] [Link] DecimalFloat

[Link] [Link] DecimalFloat

[Link] trend elementRef 1: St

2 : Up

3 : Si

4: Do

5 : St

[Link] trendCalculation

[Link] [Link] elementRef

[Link] [Link]fference boolean

Default: False

[Link] [Link]fference DecimalFloat

[Link] [Link]fference DecimalFloat

[Link] [Link]fference DecimalFloat

[Link] [Link]fference DecimalFloat

[Link] responsible ElementRef # not compa

 Caut
If you use t
[Link]

This is custom documentation. For more information, please visit the SAP Help Portal 103
9/8/2024

Parent Annotation Annotation Type Value

[Link] responsibleName String (120) # not compa

 Caut
If you use t
[Link]

[Link]

[Link] quali er String(120)

[Link] id String(120)

[Link] shortDescription String(120)

[Link] selectionVariantQuali er String(120)

[Link] detail String(120)

[Link] [Link] er String(120)

[Link] [Link] ers (array of)


String(120)

[Link] [Link] String(120)

[Link] [Link] String(120)

[Link] dataPoint

[Link] (array of )

This is custom documentation. For more information, please visit the SAP Help Portal 104
9/8/2024

Parent Annotation Annotation Type Value

[Link] quali er String(120)

[Link] position DecimalFloat #mandatory

[Link] exclude Boolean #optional

Default: true

[Link] element elementRef #mandatory


annotated, th
associated v
table for a co
in another CD

 Caut
Must not b
annotated,
value.

[Link] (array of )

[Link] quali er String(120);

[Link] value Expression

[Link] criticality Integer enum 1: Ne

2: Cr

3: Po

[Link] (array of )

[Link] quali er String(120);

[Link] criticality Integer enum 1: Ne

2: Cr

3: Po

[Link] label String(60);

[Link]

This is custom documentation. For more information, please visit the SAP Help Portal 105
9/8/2024

Parent Annotation Annotation Type Value

[Link] quali er String(120)

[Link] title String(60) #optional

[Link] description String(120) #optional

[Link] chartType String enum COLUMN;

COLUMN_ST

COLUMN_ST

COLUMN_D

COLUMN_ST

COLUMN_ST

BAR;

BAR_STACK

BAR_STACK

BAR_DUAL;

BAR_STACK

BAR_STACK

AREA;

AREA_STAC

AREA_STAC

HORIZONTA

HORIZONTA

HORIZONTA

LINE;

LINE_DUAL;

COMBINATIO

COMBINATIO

COMBINATIO

HORIZONTA

HORIZONTA

PIE;

DONUT;
This is custom documentation. For more information, please visit the SAP Help Portal 106
9/8/2024

Parent Annotation Annotation Type Value

SCATTER;

BUBBLE;

RADAR;

HEAT_MAP;

TREE_MAP;

WATERFALL;

BULLET;

VERTICAL_B

HORIZONTA

HORIZONTA

DONUT_100

[Link] dimensions elementRef

[Link] measures elementRef

[Link] [Link] elementRef

[Link] [Link] String(10) These annot


enum
CAT
for w
X-ax
with
axis.

SER

Line
SERI
with
value
role,
cons
assig

CATE

[Link] [Link] array of


String(1024)

[Link] [Link] array of


String(1024)

[Link] measureAttributes (array of)

This is custom documentation. For more information, please visit the SAP Help Portal 107
9/8/2024

Parent Annotation Annotation Type Value

[Link] [Link] ElementRef

[Link] [Link] String(10) This annotat


enum AXIS

Exam

Bubb
is se
for w
the
AXIS
mak

AXIS

For a

AXIS

For a

[Link] [Link] Boolean

Default : true

[Link] [Link] Boolean

Default : false

[Link] actions

[Link] [Link] String(40)


enum FOR_

FOR_

[Link] [Link] String(60)

[Link] [Link] String(120)

[Link] [Link] Boolean

Default: true

This is custom documentation. For more information, please visit the SAP Help Portal 108
9/8/2024

Parent Annotation Annotation Type Value

[Link] actions. invocationGrouping String(12) ISOL


enum
Desc
be ex
exec
whic

CHA

Desc
be ex
cann
insta
selec

Default: ISOL

[Link] [Link] String(120)

UI.
selectionPresentationVariant

UI. quali er String(120)


selectionPresentationVariant

UI. id String(120)
selectionPresentationVariant

UI. text String(60)


selectionPresentationVariant

UI. selectionVariantQuali er String(120)


selectionPresentationVariant

UI. presentationVariantQuali er String(120)


selectionPresentationVariant

This is custom documentation. For more information, please visit the SAP Help Portal 109
9/8/2024

Parent Annotation Annotation Type Value

UI selectionVariant

[Link] quali er String(120)

[Link] id : String(120)

[Link] text String(60)

[Link] parameters (array of)

[Link] [Link] ParameterRef

[Link] [Link] String(1024)

[Link] lter String(1024)

[Link] quali er String(120)

[Link] id : String(120)

[Link] text String(60)

[Link] maxItems Integer

[Link] sortOrder (array of)

This is custom documentation. For more information, please visit the SAP Help Portal 110
9/8/2024

Parent Annotation Annotation Type Value

[Link] [Link] elementRef

[Link] [Link] String(4) ASC


enum
DES

[Link] groupBy rray of


elementRef

[Link] totalBy array of


elementRef

[Link] total array of


elementRef

[Link] includeGrandTotal Boolean

Default: true

[Link] initialExpansionLevel Integer

[Link] requestAtLeast array of


elementRef

This is custom documentation. For more information, please visit the SAP Help Portal 111
9/8/2024

Parent Annotation Annotation Type Value

[Link] visualizations (array of)

[Link] [Link] String(40) AS_L


enum as lin

AS_C
chart

AS_D
visua

Default: AS_

[Link] [Link] er String(120)

[Link] [Link] ElementRef

[Link] selectionFieldsQuali er String(120)

[Link] Boolean

Default true

This is custom documentation. For more information, please visit the SAP Help Portal 112
9/8/2024

Parent Annotation Annotation Type Value

[Link] Boolean

Default true

[Link] Boolean

Default true

[Link] String(13) TEXT


enum code

TEXT
text.

TEXT
code

TEXT
the c

[Link] quali er String(120)

[Link] feature String(40)

[Link] id String(120)

[Link] purpose String(40) #not compat


enum
 Caut
You can onl
speci ed.

STANDARD;

HEADER;

QUICK_VIEW

QUICK_CRE

FILTER;

default: STA

This is custom documentation. For more information, please visit the SAP Help Portal 113
9/8/2024

Parent Annotation Annotation Type Value

[Link] parentId String(120) #not compat

 Caut
You can onl
speci ed.

[Link] position DecimalFloat

[Link] exclude Boolean

Default: true

[Link] hidden Boolean

Default: true

[Link] isPartOfPreview Boolean

Default: true

[Link] isSummary Boolean

Default: true

[Link] isMap Boolean

Default: true

[Link] importance String(6)


enum HIGH

MED

LOW

[Link] label String(60) #optional

This is custom documentation. For more information, please visit the SAP Help Portal 114
9/8/2024

Parent Annotation Annotation Type Value

[Link] type String(40) COL


enum
• id e

• no

ADD

- targ

- targ

- isM

BAD

- targ

CHA

- targ

- targ

CON

- targ

- targ

DATA

- targ

- targ

HEA

- targ

- targ

IDEN

- targ

LINE

- targ

- targ

STAT

- targ

- targ

URL_

- url

[Link] targetElement elementRef

[Link] targetQuali er String(120)

This is custom documentation. For more information, please visit the SAP Help Portal 115
9/8/2024

Parent Annotation Annotation Type Value

[Link] url ElementRef

[Link]

[Link] quali er String(120)

[Link] position DecimalFloat #mandatory

[Link] exclude Boolean

Default: True

[Link] hidden Boolean

Default: True

[Link] importance String(6)


enum
 Note
If no impor
having imp

HIGH

MED

LOW

This is custom documentation. For more information, please visit the SAP Help Portal 116
9/8/2024

Parent Annotation Annotation Type Value

[Link] type String(40) AS_ADDRES


enum
AS_CHART;

AS_CONNEC

AS_CONTAC

AS_DATAPO

AS_FIELDGR

FOR_ACTION

FOR_INTENT

STANDARD;

WITH_INTEN

WITH_NAVIG

WITH_URL;

} default #ST
label

[Link] label String(60) #optional

[Link] iconUrl String(1024) #optional

[Link] criticality ElementRef This annotat


values 0, 1, 2

Neu

Nega

Crit

Posit

[Link] criticalityRepresentation String(12)


enum WITH

WITH

Default:

WITHOUT_IC

[Link] dataAction String(120)

This is custom documentation. For more information, please visit the SAP Help Portal 117
9/8/2024

Parent Annotation Annotation Type Value

[Link] requiresContext Boolean

Default: True

[Link] invocationGrouping String(12) #optional


enum
 Note
This annota
[Link]

ISOL

Desc
be ex
exec
whic

CHA

Desc
be ex
cann
insta
selec

Default: ISOL

[Link] semanticObjectAction String(120)

[Link] value ElementRef For type AS_

Value
elem
@co
(or a

Value
asso
refer
direc

If yo
view
start

All other typ

Value
anno
value

Value
anno
asso

[Link] valueQuali er String(120)

This is custom documentation. For more information, please visit the SAP Help Portal 118
9/8/2024

Parent Annotation Annotation Type Value

[Link] targetElement ElementRef

[Link] url ElementRef


 Caut
You need to
annotation

[Link] cation

[Link] cation quali er String(120)

[Link] cation position DecimalFloat #mandatory

[Link] cation exclude Boolean

Default: True

[Link] cation hidden Boolean

Default: True

This is custom documentation. For more information, please visit the SAP Help Portal 119
9/8/2024

Parent Annotation Annotation Type Value

[Link] cation importance String(6)


enum
 Note
If no impor
having imp

HIGH

MED

LOW

[Link] cation type String(40) AS_ADDRES


enum
AS_CHART;

AS_CONNEC

AS_CONTAC

AS_DATAPO

AS_FIELDGR

FOR_ACTION

FOR_INTENT

STANDARD;

WITH_INTEN

WITH_NAVIG

WITH_URL;

} default #ST
label

[Link] cation label String(60) #optional

[Link] cation iconUrl String(1024) #optional

[Link] cation criticality ElementRef This annotat


values 0, 1, 2

Neu

Nega

Crit

Posit

This is custom documentation. For more information, please visit the SAP Help Portal 120
9/8/2024

Parent Annotation Annotation Type Value

[Link] cation criticalityRepresentation String(12)


enum WITH

WITH

Default:

WITHOUT_IC

[Link] cation dataAction String(120)

[Link] cation requiresContext Boolean

Default: True

[Link] cation invocationGrouping String(12) #optional


enum
 Note
This annota
[Link]

ISOL

Desc
be ex
exec
whic

CHA

Desc
be ex
cann
insta
selec

Default: ISOL

[Link] cation semanticObjectAction String(120)

This is custom documentation. For more information, please visit the SAP Help Portal 121
9/8/2024

Parent Annotation Annotation Type Value

[Link] cation value ElementRef For type AS_

Value
elem
@co
(or a

Value
asso
refer
direc

If yo
view
start

All other typ

Value
anno
value

Value
anno
asso

[Link] cation valueQuali er String(120)

[Link] cation targetElement ElementRef

[Link] cation url ElementRef


 Caut
You need to
the annotat

[Link]

This is custom documentation. For more information, please visit the SAP Help Portal 122
9/8/2024

Parent Annotation Annotation Type Value

[Link] quali er String(120)

[Link] position DecimalFloat #mandatory

[Link] exclude Boolean

Default: True

[Link] hidden Boolean

Default: True

[Link] importance String(6)


enum
 Note
If no impor
having imp

HIGH

MED

LOW

[Link] type String(40) AS_ADDRES


enum
AS_CHART;

AS_CONNEC

AS_CONTAC

AS_DATAPO

AS_FIELDGR

FOR_ACTION

FOR_INTENT

STANDARD;

WITH_INTEN

WITH_NAVIG

WITH_URL;

} default #ST
label

This is custom documentation. For more information, please visit the SAP Help Portal 123
9/8/2024

Parent Annotation Annotation Type Value

[Link] label String(60) #optional

[Link] iconUrl String(1024) #optional

[Link] criticality ElementRef This annotat


values 0, 1, 2

Neu

Nega

Crit

Posit

[Link] criticalityRepresentation String(12)


enum WITH

WITH

Default:

WITHOUT_IC

[Link] dataAction String(120)

[Link] requiresContext Boolean

Default: True

This is custom documentation. For more information, please visit the SAP Help Portal 124
9/8/2024

Parent Annotation Annotation Type Value

[Link] invocationGrouping String(12) #optional


enum
 Note
This annota
[Link]

ISOL

Desc
be ex
exec
whic

CHA

Desc
be ex
cann
insta
selec

Default: ISOL

[Link] semanticObjectAction String(120)

[Link] value ElementRef For type AS_

Value
elem
@co
(or a

Value
asso
refer
direc

If yo
view
start

All other typ

Value
anno
value

Value
anno
asso

[Link] valueQuali er String(120)

This is custom documentation. For more information, please visit the SAP Help Portal 125
9/8/2024

Parent Annotation Annotation Type Value

[Link] targetElement ElementRef

[Link] url ElementRef


 Caut
You need to
annotation

UI. eldGroup

UI. eldGroup quali er String(120)

UI. eldGroup groupLabel #optional

UI. eldGroup position DecimalFloat #mandatory

UI. eldGroup exclude Boolean

Default: True

This is custom documentation. For more information, please visit the SAP Help Portal 126
9/8/2024

Parent Annotation Annotation Type Value

UI. eldGroup hidden Boolean

Default: True

UI. eldGroup importance String(6)


enum
 Note
If no impor
having imp

HIGH

MED

LOW

UI. eldGroup type String(40) AS_ADDRES


enum
AS_CHART;

AS_CONNEC

AS_CONTAC

AS_DATAPO

AS_FIELDGR

FOR_ACTION

FOR_INTENT

STANDARD;

WITH_INTEN

WITH_NAVIG

WITH_URL;

} default #ST
label

UI. eldGroup label String(60) #optional

UI. eldGroup iconUrl String(1024) #optional

This is custom documentation. For more information, please visit the SAP Help Portal 127
9/8/2024

Parent Annotation Annotation Type Value

UI. eldGroup criticality ElementRef This annotat


values 0, 1, 2

Neu

Nega

Crit

Posit

UI. eldGroup criticalityRepresentation String(12)


enum WITH

WITH

Default:

WITHOUT_IC

UI. eldGroup dataAction String(120)

UI. eldGroup requiresContext Boolean

Default: True

UI. eldGroup invocationGrouping String(12) #optional


enum
 Note
This annota
[Link]

ISOL

Desc
be ex
exec
whic

CHA

Desc
be ex
cann
insta
selec

Default: ISOL

UI. eldGroup semanticObjectAction String(120)

This is custom documentation. For more information, please visit the SAP Help Portal 128
9/8/2024

Parent Annotation Annotation Type Value

UI. eldGroup value ElementRef For type AS_

Value
elem
@co
(or a

Value
asso
refer
direc

If yo
view
start

All other typ

Value
anno
value

Value
anno
asso

UI. eldGroup valueQuali er String(120)

UI. eldGroup targetElement ElementRef

UI. eldGroup url ElementRef


 Caut
You need to
annotation

[Link]

[Link] quali er String(120)

[Link] groupLabel #optional

This is custom documentation. For more information, please visit the SAP Help Portal 129
9/8/2024

Parent Annotation Annotation Type Value

[Link] template String(255)

[Link] name String(120)

[Link] exclude Boolean

Default: True

[Link] hidden Boolean

Default: True

[Link] importance String(6)


enum
 Note
If no impor
having imp

HIGH

MED

LOW

[Link] type String(40) AS_ADDRES


enum
AS_CHART;

AS_CONNEC

AS_CONTAC

AS_DATAPO

AS_FIELDGR

FOR_ACTION

FOR_INTENT

STANDARD;

WITH_INTEN

WITH_NAVIG

WITH_URL;

} default #ST
label

This is custom documentation. For more information, please visit the SAP Help Portal 130
9/8/2024

Parent Annotation Annotation Type Value

[Link] label String(60) #optional

[Link] iconUrl String(1024) #optional

[Link] criticality ElementRef This annotat


values 0, 1, 2

Neu

Nega

Crit

Posit

[Link] criticalityRepresentation String(12)


enum WITH

WITH

Default:

WITHOUT_IC

[Link] dataAction String(120)

[Link] requiresContext Boolean

Default: True

This is custom documentation. For more information, please visit the SAP Help Portal 131
9/8/2024

Parent Annotation Annotation Type Value

[Link] invocationGrouping String(12) #optional


enum
 Note
This annota
[Link]

ISOL

Desc
be ex
exec
whic

CHA

Desc
be ex
cann
insta
selec

Default: ISOL

[Link] semanticObjectAction String(120)

[Link] value ElementRef For type AS_

Value
elem
@co
(or a

Value
asso
refer
direc

If yo
view
start

All other typ

Value
anno
value

Value
anno
asso

[Link] valueQuali er String(120)

This is custom documentation. For more information, please visit the SAP Help Portal 132
9/8/2024

Parent Annotation Annotation Type Value

[Link] targetElement ElementRef

[Link] url ElementRef


 Caut
You need to
annotation

Example

This is custom documentation. For more information, please visit the SAP Help Portal 133

Common questions

Powered by AI

The 'AnalyticsDetails.query.hierarchySettings.hideNodeWithOneChild' affects data presentation by hiding hierarchy nodes with only one child from the display. This reduces redundancy and simplifies the hierarchy display, making the hierarchy structure more comprehensible and visually clean for the end-user, especially in complex datasets where such nodes do not add significant analytical value .

The 'Analytics.processingEngine' annotation specifies which analytic engine is used to process the view. This affects the execution path by determining whether the view is handled by a specific engine capable of managing the query's complexity or data size, thereby influencing performance and resource allocation .

The 'Analytics.query.totals' annotation determines the display of totals for dimensions in queries. By specifying whether totals are shown or hidden, designers can control the query output to align with business requirements and user preferences, facilitating summary analysis or preventing clutter in reports. Strategically, it ensures focus on necessary details or aggregates, aiding clearer insights and performance optimization of the query execution .

The 'Analytics.hidden' annotation is used to ensure that an element is not added to the generated data model, meaning it is not exposed for consumption by analytical tools. This is particularly important in scenarios where certain data elements need to be excluded from the user-facing view to maintain clarity or comply with security protocols .

The 'Analytics.variableCheck.implementedBy' annotation ensures the consistency of variable input checks by specifying the ABAP class responsible for implementing the logic to validate input variables. This provides a customizable and secure method to enforce business logic and data integrity before executing the analytical process .

The 'UI.headerInfo.title.criticality' annotation in OData UI annotations is used to visually represent the urgency or importance of a data point through an associated criticality score, such as negative, critical, or positive. This aids in quickly identifying areas needing attention or action within user interfaces, incorporating business semantics directly into the UI for enhanced decision-making .

The 'Analytics.settings.valueHelp.suppressInitialValue' impacts user interaction by preventing an initial value from automatically being displayed when the value help (dropdown or selection help) is invoked. This forces users to make an explicit choice instead of working with a potentially default or pre-filled value, hence reducing errors due to misinterpretation or assumptions .

Setting 'Analytics.settings.maxProcessingEffort' is important to control the computing resources allocated for processing large datasets in a CDS view. If left unset, it may result in inefficient performance, as excessive computational effort could lead to long processing times or system resource exhaustion during peak loads. Properly configuring this setting ensures efficient resource utilization by limiting processing effort appropriately .

The 'Analytics.viewModelReplication.enabled' annotation is applicable for enabling the replication of a view from its original model, facilitating data redundancy, backup, or parallel processing scenarios. This can be critically useful for enhancing data availability, conducting distributed analytics, or testing scenarios in separate environments without affecting the primary data model .

Both annotations activate the universal hierarchy display for columns and rows, respectively. This enhances data visualization by allowing users to view data in a structured hierarchy. For columns, this means hierarchical information is shown within the column grouping, and for rows, it applies to displaying hierarchy levels of data, thus improving readability and data analysis by leveraging a multi-dimensional perspective .

You might also like