Which UI annotations build a list report and an object page, and how do you write them for a RAP service?
Say your answer out loud first.
Practise another way
For the list report, @UI.lineItem makes columns, @UI.selectionField makes filter fields, @UI.headerInfo names the entity, and @UI.presentationVariant sets default sorting.
For the object page, @UI.facet defines sections, @UI.fieldGroup groups fields with a qualifier, @UI.identification fills the general form, and @UI.dataPoint feeds header facets. In RAP I put them in a metadata extension on the projection view, so the data model stays clean.
The UI is generated from annotations. CDS annotations become OData annotations, and Fiori elements renders them.
List report
@UI.lineItem: [{ position: 10 }]puts a field into the table.importance: #HIGHkeeps a column visible on narrow screens.@UI.selectionField: [{ position: 10 }]puts a field into the filter bar.@UI.headerInfogives type name and plural; the plural is used for the table title with the record count.@UI.presentationVariantwithsortOrdersets the default sorting.@ObjectModel.semanticKeymarks the key shown prominently and drives the draft indicator.
Object page
@UI.facetis an array of sections. Types include#COLLECTION(a section),#IDENTIFICATION_REFERENCE,#FIELDGROUP_REFERENCE,#LINEITEM_REFERENCE(a table of child entries) and#DATAPOINT_REFERENCEwithpurpose: #HEADERfor header key data.@UI.identificationadds fields to the general form.@UI.fieldGroup: [{ qualifier: 'Dates', position: 10 }]collects fields; the facet points at it withtargetQualifier: 'Dates'.@UI.headerInfo.titleanddescriptionfill the header.
Example (metadata extension)
@Metadata.layer: #CORE
@UI: { headerInfo: { typeName: 'Travel', typeNamePlural: 'Travels',
title: { type: #STANDARD, value: 'Description' } } }
annotate view ZC_Travel with
{
@UI.facet: [ { id: 'General', type: #COLLECTION, label: 'General', position: 10 },
{ id: 'Dates', parentId: 'General', type: #FIELDGROUP_REFERENCE,
targetQualifier: 'Dates', label: 'Dates', position: 10 } ]
@UI.lineItem: [{ position: 10 }]
@UI.selectionField: [{ position: 10 }]
TravelID;
@UI.fieldGroup: [{ qualifier: 'Dates', position: 10 }]
BeginDate;
}
Things that bite
- Annotations only appear if the field is exposed by the projection view; fields from other entities need an association and an alias.
- Without a facet on the object page, the page shows a header and no body.
- The reference vocabulary is the OData UI vocabulary; the CDS annotation names map to its terms.
Interview point: say that you annotate the projection layer so the same data model can serve several UIs.
Names the annotation for each UI element, explains qualifier-to-targetQualifier linking, and says they go into a metadata extension on the projection view.
Says 'you add @UI annotations in the CDS view' without naming which ones build which part of the screen.
Forgetting that a facet is needed for the object page body, or mismatching the qualifier on the field group and the facet so the section renders empty.
- How do you show a field only on the object page, not the list?
- How do you make a column visible on a phone?
- How do you show an action button on the list report toolbar?
2 official pages and 4 prep guides. Confidence: high. Checked 21 Nov 2026.
- Official page Backs the answer.
- Official page Backs the answer.
- Prep guide Gives the question.
- Prep guide Gives the question.
- Prep guide Gives the question.
- Prep guide Gives the question.