CDS Annotations
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.
Overview
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.
Lessons in this topic
- CDS Annotations Part 1: What Annotations Are and Where They ApplyUnderstand what CDS annotations are, where they can be placed, which families exist (ABAP, semantics, UI, consumption, search, analytics), how they propagate through view layers and where they end up in OData.
- CDS Annotations Part 2: Semantic Annotations for Currency, Units and TextsMake data self-describing with semantic annotations: amounts with currencies, quantities with units, text elements and text associations, languages, and admin fields that RAP maintains automatically.
- CDS Annotations Part 3: Fiori UI Annotations — Line Items, Facets and Selection FieldsBuild a complete Fiori Elements list report and object page with UI annotations: header info, line items, selection fields, identification, facets, field groups, actions and value helps.
- CDS Annotations Part 4: Metadata Extensions — Separating UI from the Data ModelSeparate UI from the data model with metadata extensions: syntax, allowed annotations, layers and precedence, and how to organize extensions for several apps on the same business object.
- CDS Annotations Part 5: Troubleshooting Precedence, Metadata and UI BehaviorFind out why an annotation seems to be ignored: check the effective value, layer precedence, the exposed element, the OData metadata and caches — in a fixed order.
Interview questions covered
- What are CDS annotations, which scopes and families exist, and how do they propagate?
- Three apps reuse one interface view that contains all UI annotations. Changing one app breaks the others. How do you reorganize?
- How do you connect amounts, quantities and texts to their semantics in CDS, and what goes wrong without it?
- Build a Fiori Elements list report and object page for purchase requests with annotations only. Which annotations do you use?
- An object page lost its 'Financial Details' section after a refactor. What do you check?
- What is a metadata extension, how are layers resolved, and which annotations can it not contain?
- A developer's new column annotation does not appear in the Fiori app. Give your troubleshooting order.
- Where should each kind of annotation live in a RAP stack (R_, C_, metadata extension), and why?
- After transport to QAS, list columns and filters look different from DEV. What could cause it?
- You inherit CDS views full of annotations. What do you review first?
How to study CDS Annotations
CDS Annotations has 5 lessons (1 beginner, 4 intermediate) with about 46 minutes of reading in total. Start with the lesson that matches your level, then read the real project scenario and common mistakes in each one before moving on. After the lessons, say the 10 interview questions out loud in your own words, then check yourself against the model answer in each question (shown once you open it). Use the 15 mock questions to check recall.
Mock test questions covered
Try answering each one before you open the mock test; the answer options and scoring are in the Mock Questions tab.
- Which statement about CDS annotation propagation is correct?
- An order-value dashboard sums NetAmount across EUR, USD and JPY into one total. Which fix addresses the root cause?
- An object page shows 45 fields in one section. Which annotations structure it into sections?
- Three Fiori apps need different layouts for the same RAP business object. What is the best structure?
- How is the root entity of a RAP business object declared in CDS?
- A CDS view exposes an amount field together with a separate currency key field. Which annotation must be added to the amount field so that Fiori Elements and OData correctly format and display it as a currency amount?
- A developer wants end users to be able to use the free-text search box in a Fiori Elements list report to find records based on a description field. What must be done at the CDS annotation level to support this?
- After a refactor, an object page section disappeared although the facet still exists. What is the most likely cause?
- You need a custom F4 value help for a field whose values come from a separate CDS view rather than the automatically derived association-based help. Which annotation should you use?
- You want to force OData consumers to always supply a value for a specific field when filtering a list, otherwise the request should be rejected. Which annotation setting achieves this?
- Which annotation, when applied to a CDS view used as a RAP projection, can be set to indicate that authorization checks are already handled elsewhere and should not be performed again by the framework for that entity?
- A CDS view has a status code field along with an associated status description text field. Which annotation setting controls whether the UI displays the code, the text, both, or the text followed by the code in parentheses?
- Which annotation is used to expose a CDS view field as an entry in the filter bar of a Fiori Elements list report, independent of whether it also appears as a table column?
- A RAP-managed business object has a field that is always calculated by the application logic and must never be sent by the client in a create or update request. Which annotation combination is most appropriate on that CDS field?
- In a Fiori Elements list report, which CDS annotation is used to specify that a field should appear as a column in the results table?