SAP has grouped annotations according to its function. Below is a small list of most relevant groups of association for Fiori Elements.
Domain | Usage |
UI Annotations | Most important domain for Fiori Elements. Nearly one-to-one relationship between CDS annotation and OData annotation term. |
Consumption Annotations | Control visibility of a data field or the whole entity. Useful when defining value help for a field. |
Object Model Annotations | Provides definitions of structural as well as transactional related aspects of the business data model |
Semantics Annotations | Enrichment of semantic information for data field |
Refer the SAP documentation for complete list. ABAP CDS – SAP Annotations – ABAP Keyword Documentation
Object style
@UI.headerInfo.typeName: 'Sales Order'
@UI.headerInfo.typeNamePlural: 'Sales Orders'
@UI.headerInfo.title.value: 'SalesOrderID'
JSON style
@UI.headerInfo.typeName: {
typeName: 'Sales Order',
typeNamePlural: 'Sales Orders',
title: {
value: 'SalesOrderID'
}
}
Annotation syntax for Array Type – only JSON style is possible
@UI.lineItem: [{
qualifier: 'qualifier1',
position: 10,
label: 'label1'
},
{
qualifier: 'qualifier2',
position: 20,
label: 'label2'
}]
Annotation Syntax: Single Line Array type
@UI.lineItem: [{
position: 10,
label: 'label1',
importance: #HIGH
}]
Annotation on CDS View association
define view ...
association to zassoc_view as _valuehelp_assoc
on ...
...
@Consumption.valueHelp: '_valuehelp_assoc'
_Cusomer.CompanyName as CustomerName,
_valuehelp_assoc,
...