ERPClimb logoERPClimb
CDS Annotations for UI
Fiori & SAPUI5intermediate 5 min read

CDS Annotations for UI Part 2: The Essential @UI Annotations Cheat Sheet

Lessons are open to try during our launch period. Some advanced content may move to Pro later. AI practice limits apply separately.

Key takeaway

Learn the annotations you use in every Fiori elements app — headerInfo, lineItem, selectionField, identification, facet, fieldGroup, dataPoint, hidden and chart — with what each controls and common pitfalls.

In this lessonShow sections

Visual overview

CDS Annotations for UI Part 2: The Essential @UI Annotations Cheat Sheet — learning sheetFlow: headerInfo → lineItem / selectionField → identification / facet → fieldGroup with qualifiers → dataPoint / chart. Key ideas: LIST REPORT ANNOTATIONS; OBJECT PAGE ANNOTATIONS; DATA POINTS AND CHARTS; VISIBILITY AND BEHAVIOUR. Watch out: Qualifiers are needed when the same annotation is used more than once on one entity.ERPClimb.com / FIORI / LESSON 10/14 / LEARNING SHEETCDS Annotations for UI Part 2: The Essential @UIAnnotations Cheat Sheet1 · HOW IT FLOWS1headerInfo2lineItem /selectionField3identification/ facet4fieldGroupwithqualifiers5dataPoint /chart2 · KEY IDEAS EXPLAINEDList Report Annotations@UI.selectionField with position adds filters;@UI.lineItem with position, label and importancedefines columns; line items of type for-action add…Object Page Annotations@UI.headerInfo sets typeName, typeNamePlural andtitle; @UI.identification lists key fields andactions; @UI.facet defines sections referencing…Data Points And Charts@UI.dataPoint presents a value with criticality,target or trend, used in headers and tables.@UI.chart defines microcharts and charts for…Visibility And Behaviour@UI.hidden hides fields technically needed but notfor users. @UI.multiLineText renders long texts.Field control and side effects come from behaviour…3 · REMEMBER · WATCH OUTRemember@UI.headerInfo: title and type of the object; @UI.lineItem: tablecolumns and actions.@UI.selectionField: filter bar; @UI.identification: key fields andheader actions on the object page.@UI.facet and @UI.fieldGroup: object page structure and forms.!Watch outQualifiers are needed when the sameannotation is used more than once onone entity.4 · IN A REAL PROJECTTwo forms on an object page kept showing the same fields. Both field groups had been defined withoutqualifiers, so the second overwrote the first. Adding qualifiers 'General' and 'Pricing' and referencing themin the facets fixed the page.Original ERPClimb learning sheet • Verify against your SAP release and edition

The situation: a real project scenario

Two forms on an object page kept showing the same fields. Both field groups had been defined without qualifiers, so the second overwrote the first. Adding qualifiers 'General' and 'Pricing' and referencing them in the facets fixed the page.

Explanation

Part 1 explained where annotations live; Part 2 is the practical reference for the core @UI annotations themselves.

On the list report side, @UI.selectionField with a position adds filters to the filter bar, while @UI.lineItem with position, label and importance defines table columns, and line items of type for-action add toolbar buttons. @UI.presentationVariant can also define default sorting and grouping for the table.

On the object page side, @UI.headerInfo sets the typeName, typeNamePlural and title — the object's title and type. @UI.identification lists key fields and header actions on the object page. @UI.facet defines the page's sections, each referencing a target, with facet types including identification references, field group references, and line item references. @UI.fieldGroup, used with qualifiers, creates the forms within those sections.

@UI.dataPoint presents a value with criticality, target or trend, and is used both in headers and in tables. @UI.chart defines microcharts and charts for analytical floorplans and overview cards. Both need their measures and dimensions defined correctly to render properly.

For visibility and behavior, @UI.hidden hides fields that are technically needed but shouldn't be shown to users, and @UI.multiLineText renders long texts appropriately. Field control and side effects, meanwhile, come from behavior definitions or their own dedicated annotations rather than from these UI annotations.

Qualifiers come into play whenever the same annotation is used more than once on one entity — for example, two field groups or two charts — and facets then reference them by qualifier. Missing a qualifier in that situation causes annotations to overwrite each other silently, which is a common source of confusing bugs.

In practice, this means annotating an entity with headerInfo, lineItem and selectionField, adding two field groups with qualifiers and referencing them in facets, adding a dataPoint with criticality to the header, and hiding a technical key with @UI.hidden — building toward being able to write the core annotations for a list report and object page from memory.

How the SAP process fits together

SAP PROCESS EXPLORER · Fiori: from service to user

ERPClimb.com

CDS Annotations for UI — process breakdown

Topic-specific conceptual flow: how key objects and decisions fit together. SAP configurations and exceptional cases can follow different paths.

1/4

Selected process stage

Choose

Annotations live in CDS, metadata extensions or local files

Representative SAP learning flow, not a guarantee of system runtime sequence in every scenario.

Watch out

Common mistakes

Defining two field groups (or other repeated annotations like data points) without qualifiers is the exact bug in this lesson's example: without a qualifier, the second definition silently overwrites the first instead of coexisting as two distinct groups, so a page that's supposed to show two separate forms shows the same fields twice — and there's no error, just confusing duplicate content.

Showing technical keys (internal GUIDs, raw status codes) directly to end users, rather than using @UI.hidden on them or exposing a text/description association instead, forces users to memorize or look up meaningless codes to do their job.

Not setting importance on LineItem columns removes the responsive table's ability to intelligently hide lower-priority columns on smaller screens, leaving it to either cram everything in or hide the wrong things.

Building charts without properly modeled measures and dimensions (treating a dimension as a measure, or vice versa, or omitting the aggregation behavior CDS expects) produces charts that render but show misleading or nonsensical aggregated values.

Do this

Best practices

Use qualifiers consistently on any annotation that can legitimately repeat for the same entity (multiple field groups, multiple data points) — this is what lets you have, say, a 'General' and a 'Pricing' field group on the same object page without one silently overwriting the other.

Hide technical fields (internal keys, raw codes) from the UI with @UI.hidden, or better, expose the associated text/description field instead, so users interact with meaningful values rather than internal identifiers. Set importance and a deliberate position on LineItem columns so the responsive table can make sensible decisions about what to show at narrower widths.

Model chart-relevant fields with correct measure/dimension semantics and aggregation behavior in the CDS view itself, so the chart annotation can rely on the underlying data already being shaped correctly for aggregation.

In the interview

Interview angle

Interviewers frequently probe this exact scenario: 'Two sections on an object page show the same fields instead of two different forms — what's the likely cause?' The correct, specific answer is a missing qualifier on a repeated annotation (most often @UI.fieldGroup) — without it, the second definition overwrites the first rather than creating a distinct group, and the fix is adding qualifiers like #General and #Pricing and referencing them explicitly from the relevant facets.

Being able to name this specific pitfall, rather than giving a generic 'check your annotations' answer, is a strong signal of hands-on CDS/UI annotation experience.

Practice this lesson

Original educational case studies for SAP consultants, not official SAP certification exam questions. Verify product edition and implementation details against the current SAP documentation.

Quick check

0 of 3 questions attempted

Question 1 of 3

Which annotation sets the object page title and type name?

Practise this in an interview

Answer in your own words and get instant feedback, the way an interviewer would judge it.

1Which UI annotations do you need for a basic list report and object page, and what pitfalls do you watch for?

Frequently asked questions

Which annotations build a Fiori list report?

@UI.selectionField with position adds filters, @UI.lineItem with position, label and importance defines columns, line items of type for-action add toolbar buttons, and @UI.presentationVariant can set default sorting and grouping.

Which annotations build a Fiori object page?

@UI.headerInfo sets the type names and title, @UI.identification lists key fields and actions, @UI.facet defines sections, and @UI.fieldGroup with qualifiers creates forms.

Why do Fiori annotations sometimes overwrite each other?

When two field groups or charts exist on one entity without qualifiers, they collide silently. Qualifiers distinguish them, and facets reference them by qualifier.

Was this lesson helpful?

Keep exploring

Check before use: lesson examples are educational, not a guarantee of correctness for your SAP edition or release. Sample code has not been executed on your SAP system. Confirm API availability, syntax, authorizations and business impact in an approved development or test environment.