ERPClimb logoERPClimb

SAP RAP / CDS / OData CDS Annotations Interview Questions

Interviewers use cds annotations to test depth rather than coverage: the follow-up question is almost always "why does the system behave that way?", and that is where prepared answers usually run out.

Master CDS annotations for semantics, authorization, analytics, UI metadata and service consumption. Learn where annotations belong, how to avoid polluting reusable interface views and how metadata extensions and projection layers keep consumer-specific behavior maintainable.

This page carries 10 reviewed SAP RAP / CDS / OData cds annotations interview questions, each with a complete written answer and no sign-in required. The set breaks down into 1 foundational, 7 mid-level and 2 advanced questions, so you can start at the top for a first interview or skip ahead to the scenario-based items for a senior round.

If you can handle every question here without hesitating, cds annotations is unlikely to be what costs you an SAP RAP / CDS / OData interview — and the same reasoning pattern transfers to the neighbouring topics linked at the bottom of this page.

10 CDS Annotations questions with answers

easyCDS Annotations

1. What are CDS annotations, which scopes and families exist, and how do they propagate?

Annotations are metadata for frameworks; they do not change the SELECT result. Scopes: entity/header, element, parameter. Families: core (@EndUserText, @AccessControl, @Metadata), @Semantics, @ObjectModel, @UI, @Consumption, @Search, @Analytics. Element annotations propagate to views built on top for the same element unless overridden or stopped with @Metadata.ignorePropagatedAnnotations; header annotations do not propagate. In RAP services they are translated into OData vocabularies in $metadata. ADT's Active Annotations view shows effective values and origins.
mediumCDS Annotations

2. Three apps reuse one interface view that contains all UI annotations. Changing one app breaks the others. How do you reorganize?

Keep semantic annotations (currency, unit, texts, admin fields) in the interface view because they describe the data. Move UI, search and consumption annotations out: create one projection per app, set @Metadata.allowExtensions: true, and put each app's UI annotations into a metadata extension of its projection (layer #CUSTOMER). Each app then changes independently. Verify with Active Annotations and each app's preview.
mediumCDS Annotations

3. How do you connect amounts, quantities and texts to their semantics in CDS, and what goes wrong without it?

Amounts: @Semantics.amount.currencyCode: 'CurrencyCode' with the currency field in the same view. Quantities: @Semantics.quantity.unitOfMeasure: 'Unit'. Texts: @ObjectModel.text.element for a text field in the view, or @ObjectModel.text.association to a #TEXT view with @Semantics.language and @Semantics.text. Without semantics, Fiori shows unformatted numbers (wrong decimals for currencies like JPY), no text next to codes, and analytics may aggregate across currencies or units — producing meaningless totals.
mediumCDS Annotations

4. Build a Fiori Elements list report and object page for purchase requests with annotations only. Which annotations do you use?

List: @UI.headerInfo (typeName, typeNamePlural, title), @UI.lineItem with positions and importance for columns, @UI.selectionField for filters, @UI.hidden for UUIDs. Object page: @UI.facet with #IDENTIFICATION_REFERENCE (fields with @UI.identification), #FIELDGROUP_REFERENCE with qualifiers (@UI.fieldGroup), #LINEITEM_REFERENCE to _Item for the item table. Buttons: #FOR_ACTION entries with dataAction in lineItem/identification. Value helps: @Consumption.valueHelpDefinition. Texts: @UI.textArrangement. All in a metadata extension of the projection.
mediumCDS Annotations

5. An object page lost its 'Financial Details' section after a refactor. What do you check?

The section is a facet referencing a field group or identification. Check: the @UI.facet entry still exists with the correct type and targetQualifier; fields still carry @UI.fieldGroup with the same qualifier; those fields still exist in the projection element list; the metadata extension is still attached (allowExtensions, correct entity name) and not overridden by a higher layer; $metadata contains UI.Facets and UI.FieldGroup#<qualifier>. Then clear caches and reset variants.
mediumCDS Annotations

6. What is a metadata extension, how are layers resolved, and which annotations can it not contain?

A metadata extension ("annotate entity X with { … }") adds annotations to a CDS entity in a separate object; the entity needs @Metadata.allowExtensions: true. Each has @Metadata.layer; precedence: #CUSTOMER > #PARTNER > #INDUSTRY > #LOCALIZATION > #CORE, and MDE annotations override the view's own and propagated ones. Typical content: @UI, @EndUserText, @Consumption, @Search. Not allowed/sensible: data-model semantics such as @Semantics amount/currency references, @ObjectModel text associations, @AccessControl — these stay in the view. Customers use #CUSTOMER MDEs to adapt SAP apps without copying views.
mediumCDS Annotations

7. A developer's new column annotation does not appear in the Fiori app. Give your troubleshooting order.

1. Effective annotation via ADT Active Annotations — overridden by a higher MDE layer or a @UI.hidden in the view? 2. Annotated on the exposed projection (or its MDE), not the base view? allowExtensions set? 3. Field present in the projection element list and entity exposed? 4. $metadata contains UI.LineItem with the field? Missing → backend; present → client. 5. Clear browser/launchpad and gateway metadata caches; reset personalized variants. 6. If it is a read-only/disabled issue instead, check BDEF and feature control.
mediumCDS Annotations

8. After transport to QAS, list columns and filters look different from DEV. What could cause it?

Possibilities: the metadata extension was not transported or not activated in QAS; a different MDE layer exists in QAS (e.g. a partner/customer layer) that overrides values; the projection was transported without @Metadata.allowExtensions; cached metadata in the QAS launchpad or gateway; personalized variants saved by QAS users; different service version or binding. Check transport contents and activation logs, Active Annotations in QAS, $metadata of the QAS service, then caches and variants.
hardCDS Annotations

9. Where should each kind of annotation live in a RAP stack (R_, C_, metadata extension), and why?

Base R_ views: semantics (amounts, units, texts, admin fields), keys, associations, @AccessControl — they describe the business data and are shared by all consumers. Projection C_ views: consumer-specific model settings (@Metadata.allowExtensions, @Search on the entity, value help definitions if consumer-specific, provider contract). Metadata extensions of the projection: UI layout (@UI.*), labels, selection fields, facets. This keeps the data model stable, lets several apps share one BO with different UIs, and reduces re-activation of dependent views.
hardCDS Annotations

10. You inherit CDS views full of annotations. What do you review first?

Check: amounts/quantities have currency/unit semantics; texts via text elements/associations; admin fields annotated for RAP; @AccessControl set with a DCL role; UI annotations moved out of base views into projection MDEs; allowExtensions on projections; no duplicated or conflicting layers; facets and qualifiers consistent; value helps pointing to reachable entities; no obsolete annotations (e.g. classic @AbapCatalog.sqlViewName in view entities, BOPF-era @ObjectModel transactional annotations in RAP). Use Active Annotations and $metadata to confirm.

Related lesson

CDS Annotations Part 4: Metadata Extensions — Separating UI from the Data Model

Related topics

Next practice step

Go deeper on this topic