Walk me through the layers of a RAP application, from the database table to the running Fiori app.
Say your answer out loud first.
Practise another way
Bottom up: a database table, a CDS root view entity with child entities linked by compositions, then a behavior definition and a behavior pool for the logic. On top sits an optional projection layer: a CDS projection view and a projection behavior definition, shaped for one consumer.
Then a service definition lists what is exposed, and a service binding fixes the protocol, for example OData V4 UI. Fiori elements renders the result from annotations.
A RAP business object (BO) is a stack of repository objects. Know each layer and what question it answers.
1. Data modeling
- A database table (or CDS table entity) for persistence.
- A CDS view entity per BO node. The top node is declared
define root view entity. Child nodes are linked by compositions.
2. Behavior
- The behavior definition (BDEF), named like the root entity, declares operations (
create,update,delete), actions, validations, determinations and characteristics such as locking and draft. - The behavior pool (class
ZBP_...) holds the code, in the local types include (CCIMP).
3. Projection (optional but standard)
- A CDS projection view and a projection BDEF adapt the BO to one consumer or service. More in the projection card.
4. Business service
- The service definition says which projection entities are exposed. It is protocol-agnostic.
- The service binding chooses the protocol and type, for example OData V4 - UI, and publishes it.
5. Consumer
- A Fiori elements app (driven by UI annotations, often in metadata extensions), a Web API client, or ABAP code using EML.
define root view entity ZR_Travel
as select from ztravel
composition [0..*] of ZR_Booking as _Booking
{
key travel_uuid as TravelUUID,
agency_id as AgencyId,
_Booking
}
Two more pieces to mention
- CDS access control (DCL) governs read authorization. Modify authorization is done in the behavior implementation.
- At runtime the RAP runtime engine takes the OData request, runs the transactional behavior, and calls your handler and saver methods.
A good answer names the artifact, its purpose and the ADT wizard that generates the skeleton (right-click the root entity, New Behavior Definition).
Names every artifact in order with its job, and mentions access control and the runtime engine.
Lists 'CDS, BDEF, service' without saying what each decides or where authorization sits.
Mixing up the layers, for example saying the service binding defines which entities are exposed. That is the service definition's job.
- Where do UI annotations live?
- What is the difference between the service definition and the service binding?
- Which layer is optional?
- Where is read authorization defined?
4 official pages, 2 prep guides and 1 technical reference. Confidence: high. Checked 21 Nov 2026.
- Official page Backs the answer.
- Official page Backs the answer.
- Official page Backs the answer.
- Official page Backs the answer.
- Technical reference Backs the answer.
- Prep guide Gives the question.
- Prep guide Gives the question.