ABAP RESTful Application Programming Model (RAP) _ UDINA BTP
ABAP RESTful Application Programming Model (RAP) _ UDINA BTP
UDINA BTP
Developer Ressorces
A good starting point is the Getting Started blog, and the TechEd2020 DEV260 session
Build SAP Fiori Apps with the ABAP RESTful Application Programming Model, see also the
related DEV260.pdf overview.
Concepts
The ABAP RESTful Programming Model has unified the development of OData
services with ABAP. It is based on three pillars that facilitate your development:
https://btp.udina.de/development/model/rap.html 2/13
1/28/25, 10:56 PM ABAP RESTful Application Programming Model (RAP) | UDINA BTP
Pillar Description
The ABAP language has been aligned and extended to support the
development with the ABAP RESTful Programming Model, together with
Language CDS. The application developer uses typed APIs for standard
implementation tasks and benefits from auto-completion, element
information, and static code checks.
Runtime
The following diagram provides a runtime perspective of the ABAP RESTful
Programming Model. Runtime objects are necessary components to run an
application. This runtime stack is illustrated in a top-down approach. An OData client
sends a request, which is then passed to the generic runtime frameworks. These
frameworks prepare a consumable request for ABAP code and dispatch it to the
relevant business logic component. The request is executed by the business object
(BO) when data is modified or by the query if data is only read from the data source.
https://btp.udina.de/development/model/rap.html 3/13
1/28/25, 10:56 PM ABAP RESTful Application Programming Model (RAP) | UDINA BTP
RAP Runtime
https://btp.udina.de/development/model/rap.html 4/13
1/28/25, 10:56 PM ABAP RESTful Application Programming Model (RAP) | UDINA BTP
represented by one CDS entity. View building capabilities allow you to define
application-specific characteristics in the data model. That means, CDS entities are
the fundamental building blocks for your application. When using the CDS entity for a
data selection, the data access is executed by the SQL-view, which is defined in the
CDS entity.
Depending on the use case, data models support transactional access or query
access to the database. Thus, data models are used in business objects or queries
respectively.
The following diagram gives you an overview of the data model that is used in the
development guides of this documentation. Every block refers to one database table
view and the respective CDS entity. The blue boxes represent a Travel business
object, with its child entities Booking and Booking Supplement. The white boxes
represent the entities that are not part of the business object, but support with value
helps or text associations. For read-only access to the database, that is simple data
retrieval, the data model is used for the query.
PlantUML
https://btp.udina.de/development/model/rap.html 5/13
1/28/25, 10:56 PM ABAP RESTful Application Programming Model (RAP) | UDINA BTP
RESTful ABAP F l i g h t D e m o D a t a M o d e l
1N
Agency Travel
N 1
1 N N1
Flight Booking Customer
1 N
N1 1N
Connection Booking Supplement Supplement Supplement Text
N N
1 1
Airport Carrier
Customer
Booking Travel
Flight Agency
Behavior
The behavior describes what can be done with the data model, for example if the
data can be updated.
https://btp.udina.de/development/model/rap.html 6/13
1/28/25, 10:56 PM ABAP RESTful Application Programming Model (RAP) | UDINA BTP
Query
A query is the connecting interface for read-only access to the database in OData
services. It is used for list reports or analytical reports to process data.
Business Object
A business object (BO) is a common term to represent a real-world artifact in
enterprise application development such as the Product, the Travel, or the
SalesOrder. In general, a business object contains several nodes such as Items and
ScheduleLines and common transactional operations such as for creating, updating
and deleting business data. An additional application-specific operation in the
SalesOrder business object might be, for example, an Approve action allowing the
user to approve the sales order. All changing operations for all application-related
business objects form the transactional behavior in an application scenario.
Business Service
The ABAP development platform can act in the roles of a service provider and a
service consumer (such as SAP Fiori UI client).
https://btp.udina.de/development/model/rap.html 7/13
1/28/25, 10:56 PM ABAP RESTful Application Programming Model (RAP) | UDINA BTP
https://btp.udina.de/development/model/rap.html 8/13
1/28/25, 10:56 PM ABAP RESTful Application Programming Model (RAP) | UDINA BTP
RAP BO Projections
General Rules
Remember
https://btp.udina.de/development/model/rap.html 9/13
1/28/25, 10:56 PM ABAP RESTful Application Programming Model (RAP) | UDINA BTP
[<prefix>]_<object_name>_[<suffix>].
The following list provides an overview of the prefixing and suffixing guidelines on
naming specific development objects.
Database
D_ Draft database table /UDINA/D_TRAVEL_D
Table
CDS Objects
https://btp.udina.de/development/model/rap.html 10/13
1/28/25, 10:56 PM ABAP RESTful Application Programming Model (RAP) | UDINA BTP
Business Services
Service Definition
Since a service definition, as a part of a business service, does not have different
types or different specifications, there is (in general) no need for a prefix or suffix to
differentiate meaning.
Example: /UDINA/TRAVEL_U
However, in use cases where no reuse of the same service definition is planned for
UI and API services, the prefix may follow the rules of the service binding.
Example: /UDINA/UI_TRAVEL_U
Service Binding
Use the suffix _O2 or _O4 concerning the used OData protocol version.
https://btp.udina.de/development/model/rap.html 11/13
1/28/25, 10:56 PM ABAP RESTful Application Programming Model (RAP) | UDINA BTP
Handler
LHC_ Local handler class /UDINA/LHC_TRAVEL_CREATE
Classes
Saver
LSC_ Local saver class /UDINA/LSC_TRAVEL_CUD
Classes
Required skillset
It is also helpful to have knowledge of both SAP and open technologies when
designing the overall architecture.
Skill Description
Dev.
ABAP
Language
https://btp.udina.de/development/model/rap.html 12/13
1/28/25, 10:56 PM ABAP RESTful Application Programming Model (RAP) | UDINA BTP
Skill Description
Dev.
ABAP CDS, Exit, BAdI, Key User Extensibility
Framework
https://btp.udina.de/development/model/rap.html 13/13