CDS Views
CDS Views Part 1: What a CDS View Entity Is and Why It Matters
Understand what a CDS view entity is, how it differs from a classic DDIC-based CDS view, which layers (VDM) it lives in, and how ABAP, RAP, OData and analytics all consume the same model.
A finance team had five custom ABAP reports that each selected sales orders from tables, joined customers and calculated the order age and status text in ABAP loops. The logic differed slightly between reports, so the numbers never matched, and one report took 12 minutes because it read all orders into ABAP before filtering. The team built one interface view ZI_SalesOrder with the status text, age calculation and customer association, and a consumption view per report. The reports became simple SELECTs with WHERE clauses that run on HANA. Runtime of the slowest report dropped to seconds, all reports showed identical figures, and the same view was later reused for a Fiori app without rewriting the logic.
CDS Views Part 2: Create Your First CDS View Entity in ADT
Create a real ABAP CDS view entity in ADT with keys, aliases, currency semantics and a simple association, then activate and preview the result.
CDS Views Part 3: Performance — Joins, Associations, Filters and Aggregation
Make CDS views fast: understand how associations and path expressions turn into joins, why to-many paths multiply rows, how to push filters and aggregation to the database, and how to analyze a slow view.
CDS Views Part 4: Authorization with DCL and Clean-Core Data Access
Control which rows each user may see with CDS access control (DCL): authorizationCheck values, pfcg_auth conditions, inheriting roles in projections, privileged access — and read SAP data the clean-core way through released CDS views.
RAP Custom Entities with IF_RAP_QUERY_PROVIDER: Paging, Filtering and Authorization
Implement a controlled read-only query over an external or computed data source using the RAP query provider contract. A RAP custom entity has no managed database persistence by itself; a query provider supplies result rows on demand. It is useful for a computed or remote read model when a normal CDS view entity does not fit. Pagina
Interview questions covered
- What is a CDS view entity, and how does it differ from a classic CDS view defined with @AbapCatalog.sqlViewName?
- Explain the virtual data model layers (interface, composite, consumption, and RAP R_ views). Why not put everything into one CDS view?
- A Fiori list based on a CDS consumption view is slow and shows some orders several times. What is the likely cause and how do you fix it?
- What is the difference between a join and an association in CDS, and why does it matter for performance?
- Regional managers can see sales orders of all regions in a CDS-based app although @AccessControl.authorizationCheck: #CHECK is set. What went wrong and how do you fix it?
- Walk through creating your first CDS view entity in ADT and verifying it.
- What is the difference between a CDS view entity and a classic DDIC-based CDS view?
- How do you design CDS access control (DCL) for a sales order view and its projection?
- A project team asks you to implement this requirement: Implement a controlled read-only query over an external or computed data source using the RAP query provider contract. Explain setup, version boundaries, validation, production failure handling and release controls.
How to study CDS Views
CDS Views has 5 lessons (2 beginner, 2 intermediate, 1 advanced) with about 52 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 9 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 16 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.
- Why is a custom entity query provider not equivalent to a managed RAP BO?
- A list based on a CDS view returns each sales order once per item. What most likely causes this?
- A view has @AccessControl.authorizationCheck: #CHECK but no DCL role exists. What happens?
- Five reports calculate the same order status text and order age in ABAP loops and show different results. What is the best CDS-based fix?
- A view has @AccessControl.authorizationCheck: #CHECK, but users see all company codes. What is the most likely reason?
- What is a key structural difference between a CDS view entity (defined with 'define view entity') and a classic DDIC database view when used in RAP-based development?
- A developer wants to filter results based on whether at least one related record exists in an associated CDS entity, without returning duplicate rows from the association. Which CDS language construct is most appropriate?
- A CDS view needs a field whose value is not stored in the database but calculated dynamically at runtime by an ABAP class implementing a specific interface. How should this field be declared in the CDS view definition?
- In a CDS view definition, which annotation is used to expose the view directly as an OData service in the classical (non-RAP) approach, without creating a separate service definition and service binding?
- Which UI annotation is primarily used on CDS view fields to determine which columns appear as line items in the table of a Fiori Elements List Report application?
- When defining an association in a CDS view using 'association [1..*] to' another CDS entity, what does the cardinality '[1..*]' express about the relationship?
- Which statement correctly describes a CDS view entity compared to a classic CDS view?
- In the modern RAP-based OData exposure model, what is the correct relationship between a service definition and a service binding?
- In the @AccessControl.authorizationCheck annotation on a CDS view, what does setting the value to #NOT_REQUIRED indicate?
- What is the primary purpose of using an 'extend view' statement on an existing CDS view in a customer or partner enhancement scenario?