CDS Annotations for ABAP RAP Model
CDS Annotations for ABAP RAP Model
| 2023 FPS01
PUBLIC
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.
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.
AbapCatalog Annotations
AccessControl Annotations
ClientHandling Annotations
EndUserText Annotations
Environment Annotations
MappingRole Annotations
Metadata Annotations
Semantics Annotations
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:[#VIEW, #TABLE_FUNCTION]
[Link] : String(20) enum { NOT_REQUIRED; NOT_ALLOWED; CHECK; PRIVILEGED_O
Usage
Annotation Meaning
Scope: [#VIEW]
Engine Behavior: The runtime and design-time engines handle the authorization check
based on the value of the element.
Values:
Value Description
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:[#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 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.
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> }.
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
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.> }
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
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.
This is custom documentation. For more information, please visit the SAP Help Portal 6
9/8/2024
Annotation Meaning
MEDIAN This value indicates that the middle value (central value) of
a set sorted in ascending order is calculated:
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.
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.
[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
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,
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
Material1 01/01/2018 40 PC
Material1 02/01/2018 30 PC
Material1 Result 30 PC
Material2 01/01/2018 90 PC
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.
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);
};
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;
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; };
};
valueHelp : {
supressInitialValue : Boolean default true;
}
runtimeExtensibility : {
allowed : Boolean default true;
}
};
constraints: {
filter : String(20) enum { UNIQUE_PER_CELL; UNIQUE_PER_QUERY; };
}
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.
Scope: #ELEMENT
This is custom documentation. For more information, please visit the SAP Help Portal 11
9/8/2024
Type: String of ENUM
ENUM
UNIQUE_PER_CELL
UNIQUE_PER_QUERY
Scope: #VIEW
ENUM
DIMENSION
FACT
CUBE
AGGREGATION_LEVEL
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
Scope: #VIEW
Type: Boolean
[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
Scope: #VIEW
Scope: #VIEW
Note
If the eld is a time stamp, the system
Scope: #VIEW
Scope: #VIEW
Type: Boolean
This is custom documentation. For more information, please visit the SAP Help Portal 13
9/8/2024
Scope: #VIEW
Code Syntax
array of
{
role : String
table : Strin
// only used
viewElement :
// only used
tableElement
filter : arra
Scope: #VIEW
Code Syntax
array of {
Scope: #VIEW
ENUM
MAIN
LEFT_OUTER_TO_ONE_JOIN
This is custom documentation. For more information, please visit the SAP Help Portal 14
9/8/2024
Scope: #VIEW
Type: String
Note
Both arrays, viewElement and tabl
contain exactly all key elements of the
Scope: #VIEW
Type: ElementRef
If [Link] LEFT_OUTER_TO_ONE_
used in the on-conditions of the joins.
Scope: #VIEW
Type: ElementRef
Scope: #VIEW
Type: Boolean
Note
This view must be annotated with Ana
Tip
Delta capabilities must be provided fo
Scope: #VIEW
Type
Code Syntax
array of {
This is custom documentation. For more information, please visit the SAP Help Portal 15
9/8/2024
Scope: #VIEW
Note
The view that provides the documents
annotation [Link]
Note
The annotation [Link]
Scope: #ELEMENT
Type: String
Note
The annotation [Link]
Scope: #ELEMENT
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
Scope: #VIEW
Type: String
Scope: #VIEW
Scope: #VIEW
Scope: #ELEMENT
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
Scope: #ELEMENT
Type: Boolean
Type: Boolean
True-
Scope: #VIEW
Type: String
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
Scope: #VIEW
Type: Boolean
Scope: #VIEW
Type: Boolean
Note
The view has to select data from a view
Note
This view must be annotated with Ana
Scope: #ELEMENT
This is custom documentation. For more information, please visit the SAP Help Portal 19
9/8/2024
Type: String of ENUM
ENUM
AE
MDS
Scope: #VIEW
Type: Boolean
Note
Data will be selected from the view sp
the DCL has to be assigned to the view
Note
This view must not be annotated with A
Scope: #VIEW
Note
The read class is not called if the view
Scope: #VIEW
Type: Boolean
Scope: #VIEW
Type: ElementRef
Scope: #VIEW
This is custom documentation. For more information, please visit the SAP Help Portal 20
9/8/2024
Evaluation Runtime (Engine): Analytic
ENUM
RIGHT
LEFT
Scope: #VIEW
Type: Boolean
With [Link]
Scope: #VIEW
Type: Boolean
Scope: #VIEW
ENUM
LOW
MEDIUM
HIGH
UNLIMITED
Scope: #VIEW
Type:String of ENUM
ENUM
OFF
This is custom documentation. For more information, please visit the SAP Help Portal 21
9/8/2024
MAX
Scope: #VIEW
Type: Boolean
Scope: #VIEW
Type: ElementRef
Scope: #VIEW
ENUM
BOTTOM
TOP
Scope: #VIEW
Type: Boolean
Scope #VIEW
Type: Boolean
Scope: #VIEW
This is custom documentation. For more information, please visit the SAP Help Portal 22
9/8/2024
ENUM
SHOW
HIDE
HIDE_IF_ALL
Scope: #VIEW
ENUM
ROWS
COLUMNS
ROWS_COLUMNS
Type: String
This is custom documentation. For more information, please visit the SAP Help Portal 23
9/8/2024
Scope: #VIEW
Note
This is only interpreted in the context o
Type: Boolean
Scope: #VIEW
Type: Boolean
Scope: #VIEW
Note
Only relevant if [Link]
Examples
Example 1
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
{
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'
{
@[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:[#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;
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
Caution
Note
Example: A measure "Inventory" can
according to time the last or average
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
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
Scope: #ELEMENT
Scope: #ELEMENT
ENUM
NONE
TOTAL
DIFFERENCE
Scope: #ELEMENT
ENUM
EQUAL
PROPORTIONAL
PROPORTIONAL_REF
Scope: #ELEMENT
This is custom documentation. For more information, please visit the SAP Help Portal 29
9/8/2024
Annotation Meaning
Scope: #ELEMENT
Scope: #ELEMENT
ENUM
FREE
ROWS
COLUMNS
Note
The [Link] annotat
-.formula, -.scaling, or -.semanticOb
Scope: #ELEMENT
ENUM
DEFAULT
THIS
CONCURRENT
This is custom documentation. For more information, please visit the SAP Help Portal 30
9/8/2024
Annotation Meaning
Scope: #ELEMENT
ENUM
DEFAULT
THIS
CONCURRENT
ENUM
DEFAULT
THIS
CONCURRENT
ENUM
DEFAULT
THIS
CONCURRENT
Scope: #ELEMENT
This is custom documentation. For more information, please visit the SAP Help Portal 31
9/8/2024
Annotation Meaning
Scope: #ELEMENT
ENUM
KEY
TEXT
TEXT_KEY
KEY_TEXT
Scope: #ELEMENT
ENUM
OFF
ON
FILTER
FILTER_ONLY
Scope:#ELEMENT
Type: Boolean
This is custom documentation. For more information, please visit the SAP Help Portal 32
9/8/2024
Annotation Meaning
Scope:#ELEMENT
Scope: #ELEMENT
Type: String
Cube measures
Arithmetic expressions
Scope: #ELEMENT
Type: Boolean
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]
parameter, a ltered element or by a
[Link]
Scope: #ELEMENT
ENUM
ELEMENT
PARAMETER
CONSTANT
USER_INPUT
Scope: #ELEMENT
Type: String
Scope: #ELEMENT
Scope: #ELEMENT
This is custom documentation. For more information, please visit the SAP Help Portal 34
9/8/2024
Annotation Meaning
Scope: #ELEMENT
ENUM
BELOW
ABOVE
Scope: #ELEMENT
Type: Boolean
Scope: #ELEMENT
Type: Boolean
Scope: #ELEMENT
This is custom documentation. For more information, please visit the SAP Help Portal 35
9/8/2024
Annotation Meaning
Scope: #ELEMENT
Type: Boolean
ENUM
QUERY
DIMENSION
ENUM
CUBE
DIMENSION
Type: Boolean
This is custom documentation. For more information, please visit the SAP Help Portal 36
9/8/2024
Annotation Meaning
Scope: #ELEMENT
Scope: #ELEMENT
ENUM
ASC
DESC
Scope: #ELEMENT
ENUM
HIDE
SHOW
This is custom documentation. For more information, please visit the SAP Help Portal 37
9/8/2024
Annotation Meaning
Scope: #PARAMETER
Type: String
Scope: #PARAMETER
Type: String
Scope: #PARAMETER
Type: String
Scope: #PARAMETER
Type: String
Scope: #PARAMETER
Type: String
This is custom documentation. For more information, please visit the SAP Help Portal 38
9/8/2024
Annotation Meaning
Scope: #PARAMETER
ENUM
EQ
BT
CP
LE
GE
NE
NB
NP
GT
LT
Scope: #PARAMETER
ENUM
Scope: #PARAMETER
Type: String
This is custom documentation. For more information, please visit the SAP Help Portal 39
9/8/2024
Annotation Meaning
Scope: #PARAMETER
Type: String
Scope: #PARAMETER
ENUM
PARAMETER
CONSTANT
SYSTEM_FIELD
Scope: # PARAMETER
Type: String
Note
This annotation is only relevant for t
Scope: # PARAMETER
Type: Integer
Note
If the annotation is not set, the varia
Scope: # PARAMETER
Type: Boolean
This is custom documentation. For more information, please visit the SAP Help Portal 40
9/8/2024
Annotation Meaning
Scope: # PARAMETER
Type: Boolean
Scope: #PARAMETER
Type: String
Scope: #PARAMETER
ENUM
SINGLE
INTERVAL
RANGE
HIERARCHY_NODE
Scope: #PARAMETER
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,
1 as relative_margin,
Example 2
Sample Code
@[Link] : true
with parameters
cost_center_hier_param : String
...
@[Link] : {
displayHierarchy: #ON,
hierarchyBinding :
costs,
This is custom documentation. For more information, please visit the SAP Help Portal 42
9/8/2024
...
Example 3
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 )
Sample Code
} where
DateTo >= $session.system_date and
DateFrom <= $session.system_date
Sample Code
_CostCenter[1: DateTo >= $session.system_date and DateFrom <= $session.system_date]._Text[1
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
Usually lter values are entered manually by the user on a UI. By using lter annotations query lters can be in uenced.
Scope: [ELEMENT]
nodeType Value:
elementRef
Value:
element
value
This is custom documentation. For more information, please visit the SAP Help Portal 44
9/8/2024
Annotation De nition
#CONSANT Constant.
[Link] Boolean (true, false) Speci es that the lter is hidden for
In combination with a derivation, this
without user interaction.
selectionType INTERVAL an
interval
selectionType INTERVAL an
intervals
[Link] Boolean (true, false) (default This annotation prevents elds from
false) the eld will not be exposed to UIs.
This is custom documentation. For more information, please visit the SAP Help Portal 45
9/8/2024
Annotation De nition
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.
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.
This is custom documentation. For more information, please visit the SAP Help Portal 46
9/8/2024
Annotation De nition
element Value:
elementRef
name Value:
entityRef
[Link] Value
[Link] Value
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
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
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:[#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”.
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
Scope: #VIEW
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
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.
Type: String
[Link] De nes how nodes without a parent (more precisely with a parent
occur as a child) are processed.
Scope: #VIEW
Type:
ENUM Description
[Link] De nes how nodes without a parent (more precisely with a parent
occur as a child) are processed.
Scope: #VIEW
Type:
ENUM Description
Scope: #VIEW
This is custom documentation. For more information, please visit the SAP Help Portal 51
9/8/2024
Annotation Meaning
Scope: #VIEW
Scope: #VIEW
[Link] Using this annotation, you can de ne dedicated metadata for how
node(s) in the hierarchy.
Scope: #VIEW
Type:
ENUM Description
Scope: #VIEW
Type: ElementRef
This is custom documentation. For more information, please visit the SAP Help Portal 52
9/8/2024
Annotation Meaning
[Link] d
order of values with the same parent is “ascending” or “descendin
Scope: #VIEW
Type:
ENUM Description
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]
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]
Value: BOOLEAN
[Link] De nes the associated view, which provides textual descriptions for the annotated
eld.
Scope: [ELEMENT]
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 }
Suppresses the text element of the text association to be visible on the UI.
Value: { NONE }
Scope: [ 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:
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
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:
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, ...
}
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.
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:
This is custom documentation. For more information, please visit the SAP Help Portal 57
9/8/2024
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).
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.
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 );
… }
Denotes the external name of CDS elements, parameters or associations for the
properties of an abstract entity.
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:[#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
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
Values:
Value Description
[Link] Speci es how relevant the values of an element are for ranking, if the freestyle search terms
match the element value.
Scope: #Element
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.
[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
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.
[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
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
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
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.
Evaluation Runtime (Engine): Interpreted by the RAP runtime engine (SADL): Translates CDS annotations into the corresponding OData
annotations.
Scope: [ELEMENT]
Values: String(10)
This is custom documentation. For more information, please visit the SAP Help Portal 64
9/8/2024
Annotation Meaning
Scope: [ELEMENT]
Values:
Evaluation Runtime (Engine):Interpreted by the RAP runtime engine (SADL). Translates CDS annotations into the corresponding OData
annotations.
Evaluation Runtime (Engine): SADL: Translates CDS annotations into the corresponding OData annotations
Example
1 - 31
Example
1 - 366
Example
1 or 2
This is custom documentation. For more information, please visit the SAP Help Portal 65
9/8/2024
Annotation Meaning
Example
The string matches the regex pattern
0[1-9]|1[0-2]
Example
The string matches the regex pattern
[1-4]
Example
The string matches the regex pattern
0[1-9]|[1-4][0-9]|5[2-3]
Example
The string matches the regex pattern
-?([1-9][0-9]{3,}|0[0-9]{3})
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]
Scope: [ELEMENT,PARAMETER]
Scope: [ELEMENT,PARAMETER]
Scope: [ELEMENT,PARAMETER]
Scope: [ELEMENT,PARAMETER]
Annotations belonging to [Link] are required for time-based calculations in analytical use cases.
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
Example
The string matches the regex pattern
[0-9]{3}
Example
The string matches the regex pattern
[1-4]
Example
The string matches the regex pattern
0[1-9]|[1-4][0-9]|5[2-3]
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
Example
The string matches the regex pattern
([1-9][0-9]{3})([0-9]{3})
Example
The string matches the regex pattern
([1-9][0-9]{3,}|0[0-9]{3})[1-4]
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])
Annotations belonging to [Link] tag elements that refer to details about an organization.
Evaluation Runtime (Engine):Interpreted by the RAP runtime engine (SADL). Translates CDS annotations into the corresponding OData
annotations.
This is custom documentation. For more information, please visit the SAP Help Portal 69
9/8/2024
Annotation Meaning
Example
ROLE:Project Leader
Values:
[Link] This annotation reverses the sign of the annotated view element
Annotations belonging to [Link] tag elements that specify the date/time that is recorded by the technical
infrastructure/database.
Evaluation Runtime (Engine): Interpreted by the RAP runtime engine (SADL). Translates CDS annotations into the corresponding OData
annotations.
This is custom documentation. For more information, please visit the SAP Help Portal 70
9/8/2024
Annotation Meaning
Annotations belonging to [Link] tag elements that de ne the ID of the user related to the data record.
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.
[Link] The value of the annotated eld speci es the user who changed
a data record at last.
[Link] The value of the annotated eld speci es the user who changed
a data record at last.
[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.”
This is custom documentation. For more information, please visit the SAP Help Portal 71
9/8/2024
Annotation Meaning
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.
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
[Link]
Note
This annota
@EndUser
This is custom documentation. For more information, please visit the SAP Help Portal 84
9/8/2024
[Link] title.
This is custom documentation. For more information, please visit the SAP Help Portal 85
9/8/2024
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
Neu
Nega
Crit
Posit
WITH
Default:
WITHOUT_IC
[Link] description
This is custom documentation. For more information, please visit the SAP Help Portal 87
9/8/2024
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
Neu
Nega
Crit
Posit
WITH
Default:
WITHOUT_IC
This is custom documentation. For more information, please visit the SAP Help Portal 89
9/8/2024
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
Neu
Nega
Crit
Posit
WITH
Default:
WITHOUT_IC
[Link] title.
This is custom documentation. For more information, please visit the SAP Help Portal 91
9/8/2024
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
Neu
Nega
Crit
Posit
WITH
Default:
WITHOUT_IC
This is custom documentation. For more information, please visit the SAP Help Portal 93
9/8/2024
[Link] mainInfo
This is custom documentation. For more information, please visit the SAP Help Portal 94
9/8/2024
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
Neu
Nega
Crit
Posit
WITH
Default:
WITHOUT_IC
This is custom documentation. For more information, please visit the SAP Help Portal 96
9/8/2024
[Link] secondaryInfo
This is custom documentation. For more information, please visit the SAP Help Portal 97
9/8/2024
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
Neu
Nega
Crit
Posit
WITH
Default:
WITHOUT_IC
This is custom documentation. For more information, please visit the SAP Help Portal 99
9/8/2024
Note
The elemen
@EndUser
Caut
If you use t
[Link]
This is custom documentation. For more information, please visit the SAP Help Portal 100
9/8/2024
BUL
bulle
DON
PRO
prog
RAT
com
Neu
Nega
Crit
Posit
This is custom documentation. For more information, please visit the SAP Help Portal 101
9/8/2024
Criti
Posit
WITH
WITH
Default:
WITHOUT_IC
[Link] criticalityCalculation
MAX
This is custom documentation. For more information, please visit the SAP Help Portal 102
9/8/2024
2 : Up
3 : Si
4: Do
5 : St
[Link] trendCalculation
Default: False
Caut
If you use t
[Link]
This is custom documentation. For more information, please visit the SAP Help Portal 103
9/8/2024
Caut
If you use t
[Link]
[Link]
[Link] id String(120)
[Link] dataPoint
[Link] (array of )
This is custom documentation. For more information, please visit the SAP Help Portal 104
9/8/2024
Default: true
Caut
Must not b
annotated,
value.
[Link] (array of )
2: Cr
3: Po
[Link] (array of )
2: Cr
3: Po
[Link]
This is custom documentation. For more information, please visit the SAP Help Portal 105
9/8/2024
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
SCATTER;
BUBBLE;
RADAR;
HEAT_MAP;
TREE_MAP;
WATERFALL;
BULLET;
VERTICAL_B
HORIZONTA
HORIZONTA
DONUT_100
SER
Line
SERI
with
value
role,
cons
assig
CATE
This is custom documentation. For more information, please visit the SAP Help Portal 107
9/8/2024
Exam
Bubb
is se
for w
the
AXIS
mak
AXIS
For a
AXIS
For a
Default : true
Default : false
[Link] actions
FOR_
Default: true
This is custom documentation. For more information, please visit the SAP Help Portal 108
9/8/2024
CHA
Desc
be ex
cann
insta
selec
Default: ISOL
UI.
selectionPresentationVariant
UI. id String(120)
selectionPresentationVariant
This is custom documentation. For more information, please visit the SAP Help Portal 109
9/8/2024
UI selectionVariant
[Link] id : String(120)
[Link] id : String(120)
This is custom documentation. For more information, please visit the SAP Help Portal 110
9/8/2024
Default: true
This is custom documentation. For more information, please visit the SAP Help Portal 111
9/8/2024
AS_C
chart
AS_D
visua
Default: AS_
[Link] Boolean
Default true
This is custom documentation. For more information, please visit the SAP Help Portal 112
9/8/2024
[Link] Boolean
Default true
[Link] Boolean
Default true
TEXT
text.
TEXT
code
TEXT
the c
[Link] id String(120)
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
Caut
You can onl
speci ed.
Default: true
Default: true
Default: true
Default: true
Default: true
MED
LOW
This is custom documentation. For more information, please visit the SAP Help Portal 114
9/8/2024
• 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
This is custom documentation. For more information, please visit the SAP Help Portal 115
9/8/2024
[Link]
Default: True
Default: True
HIGH
MED
LOW
This is custom documentation. For more information, please visit the SAP Help Portal 116
9/8/2024
AS_CONNEC
AS_CONTAC
AS_DATAPO
AS_FIELDGR
FOR_ACTION
FOR_INTENT
STANDARD;
WITH_INTEN
WITH_NAVIG
WITH_URL;
} default #ST
label
Neu
Nega
Crit
Posit
WITH
Default:
WITHOUT_IC
This is custom documentation. For more information, please visit the SAP Help Portal 117
9/8/2024
Default: True
ISOL
Desc
be ex
exec
whic
CHA
Desc
be ex
cann
insta
selec
Default: ISOL
Value
elem
@co
(or a
Value
asso
refer
direc
If yo
view
start
Value
anno
value
Value
anno
asso
This is custom documentation. For more information, please visit the SAP Help Portal 118
9/8/2024
[Link] cation
Default: True
Default: True
This is custom documentation. For more information, please visit the SAP Help Portal 119
9/8/2024
HIGH
MED
LOW
AS_CONNEC
AS_CONTAC
AS_DATAPO
AS_FIELDGR
FOR_ACTION
FOR_INTENT
STANDARD;
WITH_INTEN
WITH_NAVIG
WITH_URL;
} default #ST
label
Neu
Nega
Crit
Posit
This is custom documentation. For more information, please visit the SAP Help Portal 120
9/8/2024
WITH
Default:
WITHOUT_IC
Default: True
ISOL
Desc
be ex
exec
whic
CHA
Desc
be ex
cann
insta
selec
Default: ISOL
This is custom documentation. For more information, please visit the SAP Help Portal 121
9/8/2024
Value
elem
@co
(or a
Value
asso
refer
direc
If yo
view
start
Value
anno
value
Value
anno
asso
[Link]
This is custom documentation. For more information, please visit the SAP Help Portal 122
9/8/2024
Default: True
Default: True
HIGH
MED
LOW
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
Neu
Nega
Crit
Posit
WITH
Default:
WITHOUT_IC
Default: True
This is custom documentation. For more information, please visit the SAP Help Portal 124
9/8/2024
ISOL
Desc
be ex
exec
whic
CHA
Desc
be ex
cann
insta
selec
Default: ISOL
Value
elem
@co
(or a
Value
asso
refer
direc
If yo
view
start
Value
anno
value
Value
anno
asso
This is custom documentation. For more information, please visit the SAP Help Portal 125
9/8/2024
UI. eldGroup
Default: True
This is custom documentation. For more information, please visit the SAP Help Portal 126
9/8/2024
Default: True
HIGH
MED
LOW
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 127
9/8/2024
Neu
Nega
Crit
Posit
WITH
Default:
WITHOUT_IC
Default: True
ISOL
Desc
be ex
exec
whic
CHA
Desc
be ex
cann
insta
selec
Default: ISOL
This is custom documentation. For more information, please visit the SAP Help Portal 128
9/8/2024
Value
elem
@co
(or a
Value
asso
refer
direc
If yo
view
start
Value
anno
value
Value
anno
asso
[Link]
This is custom documentation. For more information, please visit the SAP Help Portal 129
9/8/2024
Default: True
Default: True
HIGH
MED
LOW
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
Neu
Nega
Crit
Posit
WITH
Default:
WITHOUT_IC
Default: True
This is custom documentation. For more information, please visit the SAP Help Portal 131
9/8/2024
ISOL
Desc
be ex
exec
whic
CHA
Desc
be ex
cann
insta
selec
Default: ISOL
Value
elem
@co
(or a
Value
asso
refer
direc
If yo
view
start
Value
anno
value
Value
anno
asso
This is custom documentation. For more information, please visit the SAP Help Portal 132
9/8/2024
Example
This is custom documentation. For more information, please visit the SAP Help Portal 133
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 .