Understanding the ABAP RESTful Application Programming Model (RAP) and OData Services
Let' explore the ABAP RESTful Application Programming Model (RAP) and its role in developing SAP HANA-optimized OData services for SAP Fiori applications and Web APIs.
What is ABAP RAP?
ABAP RAP is a modern framework designed to build efficient and scalable applications on the SAP Cloud Platform (SAP BTP), SAP S/4 HANA Cloud, and the ABAP 7.56 application server. It leverages Core Data Services (CDS) for data modeling, custom ABAP logic for business behavior, and SAPUI5 for the user interface.
Evolution of ABAP Programming Models
The RAP model evolves from earlier ABAP programming paradigms, including classic ABAP code, screen programming, and the ABAP programming model for SAP Fiori (using tools like SEGW and OData.Publish).
How RAP Works
The RAP framework consists of three main layers:
1. Data Modeling and Behavior
The data model defines entities such as airlines, flight schedules, and their relationships. This is organized using CDS (Core Data Services) i.e. Create a table, CDS entities, and behaviour definitions.. The behavior layer outlines actions like create, read, update, and delete (CRUD) that can be performed on the data model using ABAP.
2. Business Service
Service Definition specifies which parts of the CDS and behavior definitions will be exposed to the next layer. Service Binding defines the communication protocol (e.g., OData V2/V4) to interact with the service.
3. Service Consumption
RAP allows services to be consumed via SAP Fiori / Fiori Elements apps or exposed as OData Web APIs. These services can be accessed by other OData clients for seamless integration.
Follow the links for tutorials on creating your first RAP application, where we will walk through each of these steps. A good starting point is the generate rap odata ui service from table. This shows you how to use a simple custom table and generate a full RAP application including all the required CDS objects and default Fiori elements UI.