The ABAP RESTful Application Programming Model (SAP RAP) is the heart of modern SAP development. If you are working with SAP BTP, S/4HANA Cloud, or trying to keep your core "clean," RAP is the skill you need to master.
In this guide, we’ll break down the architecture, implementation types, and a real-world example to get you started.

Table of Contents
🏗️ The 3-Layer Architecture of RAP
RAP enforces a layered architecture to ensure a clean separation of concerns, built upon ABAP Core Data Services (CDS), the extended ABAP language, and modern tools like the ABAP Development Tools (ADT) in Eclipse.
1. Data Modeling & Persistence (The Foundation)
This is where your data lives and how it is structured.
- Database Tables: Where the raw data is stored (e.g.,
ZTRAVEL_TABLE). - CDS View Entities: The "brains" of your data. You define relationships (Compositions/Associations) here.
- Projection Views: A specific version of your data for the UI. This is where you add @UI annotations to tell Fiori how to display the data.
2. Business Logic Layer (The Brain)
This layer defines what your application does.
- Behavior Definition (BDEF): You define the rules here (e.g., "This field is read-only" or "This button triggers an approval").
- Behavior Implementation: This is a global ABAP class where you write the actual logic for validations and custom actions.
Managed vs. Unmanaged: Which one to choose?
One of the most common questions for beginners is choosing the implementation type. Here is a quick comparison:
| Feature | Managed RAP | Unmanaged RAP |
| Standard CRUD | Handled automatically by RAP | You must write the logic |
| Best For | New ("Greenfield") projects | Existing code/BAPIs ("Brownfield") |
| Effort | Low - focus on business logic | High - focus on technical handling |
| Flexibility | Standardized | Maximum control |
3. Service Exposure (The Door)
This layer lets the outside world (like a Fiori App) talk to your logic.
- Service Definition: You pick which pieces of your model to expose.
- Service Binding: You choose the protocol (OData V2 or V4) and publish the service.
📝 Example Scenario: Travel Booking App
A common use case for RAP is creating a transactional application to manage business data, such as a Travel Booking App, where an employee can create, update, and manage their travel requests.
| RAP Artifact | Description/Content |
| Database Table | ZTB_TRAVEL (Stores travel header data like Employee ID, Start/End Date, Status). |
| Root CDS View | ZI_TRAVEL_R (Selects data from ZTB_TRAVEL, defines a composition to ZI_BOOKING_R). |
| Projection CDS View | I_TRAVEL_R.bdef (Declares managed Implementation, includes Validation for checking valid dates, and an Action called set_status_approved). |
| Behavior Definition | I_TRAVEL_R.bdef (Declares managed Implementation includes Validation for checking valid dates, and an Action called set_status_approved). |
| Behavior Class | ZBP_I_TRAVEL_R (Implements the custom logic for the Validation and the set_status_approved Action). |
| Service Definition | ZSD_TRAVEL (Exposes the projection views ZC_TRAVEL_R and ZC_BOOKING_R). |
| Service Binding | ZSB_TRAVEL_V4_UI (Binds ZSD_TRAVEL to OData V4 UI). |
To make this real, let's look at how a Travel Booking app is structured in RAP:
- Database:
ZTRAVEL_HEADERstores the trip details. - CDS View:
ZI_Travelconnects the Trip to the Passenger details. - Behavior: We add a Validation to ensure the "End Date" isn't before the "Start Date."
- Action: We create a button called
Approve_Tripthat updates the status to "Accepted." - UI: Using Fiori Elements, we display this as a List Report.
Pro Tip: Always use the ABAP Development Tools (ADT) in Eclipse. The old SAP GUI (SE80) does not support RAP development!
🚀 Why Learn RAP in 2026?
- Clean Core: It allows you to build extensions without touching the SAP standard code.
- Cloud Ready: It is the standard for SAP BTP development.
- Efficiency: Fiori Elements + RAP can reduce UI development time by up to 70%.
This video provides an overview of the ABAP RESTful Application Programming Model (RAP) and its quality attributes for building future-ready SAP applications: What Is the ABAP RESTful Application Programming Model (ABAP RAP)?
Read More - Naming Conventions for SAP RAP Objects, Useful ABAP Cloud Syntax for SAP S/4Hana Cloud