Development with the ABAP RESTful Appli­cation Programming Model

Development with the ABAP RESTful Appli­cation Programming Model

The ABAP RESTful Appli­cation Programming Model (RAP) provides developers with a powerful environment for creating efficient, SAP HANA-optimized OData services. In this blog post we will take a closer look at the various development options and scenarios with RAP.

Managed scenario

In the so-called managed scenariocompletely new business objects (green­field) can be developed. The RAP framework takes over the procu­rement and management of the business object’s data from the database tables. This includes standard CRUD (Create, Read, Update, Delete) opera­tions. Developers don’t need to worry about imple­menting these basic features because the framework already provides them. Another advantage of the managed scenario is that the framework also takes care of locking the objects to be changed. This greatly simplifies the development process and allows developers to focus on business-specific logic.

Unmanaged scenario

In contrast to this is the unmanaged scenario (brown­field), which can be used to connect existing business objects. In this case, data handling for the business object must be ensured using your own coding. However, this procedure makes it possible to use existing legacy coding (e.g. SAP BAPIs) to access the business objects. The unmanaged scenario is parti­cu­larly useful when companies want to integrate their existing systems and appli­ca­tions into the new RAP environment. Instead of developing every­thing from scratch, developers can leverage their existing resources and skills and seamlessly integrate them into the RAP model.

More functions

In addition to the managed and unmanaged scenarios, the ABAP RESTful Appli­cation Programming Model offers other powerful functions: Draft handling: This function can be activated for the managed scenario and enables the temporary storage of created or changed objects. This is parti­cu­larly useful for Fiori apps, as object changes are not lost when the app is aborted and it is possible to change the device while editing. ABAP Environment Enhance­ments: The RAP model extends the ABAP environment with new keywords, annota­tions, and an Entity Manipu­lation Language (EML) for accessing business object data. Developers can customize the behavior of business objects through Behavior Defini­tions and Imple­men­ta­tions. With these powerful features, the ABAP RESTful Appli­cation Programming Model provides developers with a modern and efficient environment for building scalable, cloud-ready appli­ca­tions. Whether you want to develop new business objects or integrate existing systems, RAP offers the right tools for your needs.

How does the ABAP RESTful Appli­cation Programming Model differ from the previous ABAP Programming Model for SAP Fiori?

The ABAP RESTful Appli­cation Programming Model (RAP) completely replaces the older ABAP Programming Model for SAP Fiori. In contrast to the old model, the RAP model no longer uses some frame­works such as the Business Object Processing Framework (BOPF) directly. Instead, OData services are generated automa­ti­cally and can no longer be managed manually via transaction SEGW. RAP also offers new concepts such as the managed/unmanaged scenario, draft handling and exten­sions to the ABAP environment with new keywords, annota­tions and the Entity Manipu­lation Language (EML).

What will development with the ABAP RESTful Appli­cation Programming Model look like compared to before?

Development with RAP is mainly done using the ABAP Development Tools (ADT) in Eclipse. The classic Development Workbench (SE80) can only be used to edit individual sub-objects such as classes or database tables. The core concepts such as CDS Views, Behavior Defini­tions, Service Defini­tions and Service Bindings are all created and edited in ADT. Overall, development should become more efficient and standar­dized through integration in a development environment and the new language exten­sions.

What advan­tages does draft handling offer in the ABAP RESTful Appli­cation Programming Model?

Draft handling allows newly created or changed objects to be tempo­r­arily stored in separate draft tables. This has several advan­tages: First, changes to the object are not lost if the appli­cation is aborted. Secondly, the user can switch devices while editing without losing data. Thirdly, a different locking concept is used with exclusive locks via the lock server that are not tied to the dialog session. This increases flexi­bility and stability when editing objects.