Introduction to SAP RAP: ABAP RESTful Application Programming Model

Introduction

SAP has introduced various programming models helping the organizations via development of efficient applications that meets their business needs. Over time, with changing requirements and technologies, these programming models have evolved from DYNPRO and list programming models for SAP GUI based applications to WEB DYNPRO model for web-based applications and thereafter to SAP ABAP programming model for SAP Fiori.

While SAP ABAP programming model for SAP Fiori is a key advantage in terms of evolving landscape, flexibility and efficient modelling for SAP Fiori, SAP HANA; lacks certain criteria like simplicity and typed access to business entities which seems to be the basic need for application development. Here RAP, a new programming model by SAP, fills the gap.

SAP ABAP RAP provides the intrinsic approach to build SAP Fiori based applications that are optimized for S/4 HANA and can run over on-premise as well as on the cloud.

Evolution of ABAP programming model

Let’s take a look at how programming models are changed over the years:

Evolution of ABAP programming modelFigure 1: The evolution of the ABAP Programming model

Traditional ABAP programming model

The traditional ABAP programming models include Classical ABAP Programming- such as DYNPRO and list programming for SAP GUI based applications and business servers and WEB DYNPRO for web-based applications. This model was designed for a traditional on-prem environment.

ABAP Programming model for SAP Fiori

The model is based on CDS, BOPF and SAP Gateway. It reduces the complexity with advanced SEGW option reference data source (RDS) to expose the scope of the CDS model to an OData service.

Additionally, it supports service to transactional applications. To enable transactional services we need to provide the special annotation that links the CDS model to the corresponding BOPF framework model which supports transactional oriented behaviour via artifacts:  validations, determinations and actions.

Both CDS and BOPF are different in nature and as they both are modelling frameworks; you must need to maintain both in parallel. CDS is a typed framework that is embedded in ABAP design time and runtime where type checking is done at design time, in contract BOPF is very generic and most of the errors happen at runtime which is difficult to debug. Also, while developing a typical standard application, many artifacts are created which adds to the complexity while implementation or changing model parts. To overcome this limitation of the ABAP Programming model for SAP Fiori, SAP ABAP RAP model was introduced.

SAP ABAP RESTful Application Programming model

SAP ABAP RESTful Application Programming Model (RAP) was introduced by SAP Cloud Platform ABAP environment and is available with 1808 release and higher.

The RESTful Application Programming model is built on the top of the semantic data model (CDS) and the transactional services are exposed in behaviour definition and implementation in implementing behaviour class. It also allows adapting the existing applications to be modelled which is intended to be used over a long time.  You can start from scratch (greenfield implementation) or you can reuse existing business logic (brownfield implementation).

One can develop the following end-to-end scenarios:

  • SAP Fiori service
  • Service consumption
  • Web APIs

What is SAP RAP?

In simple words, SAP RAP is a new way to develop Fiori Applications based upon HANA features. This programming model uses ABAP programming methodology.
It uses the following:
1. ADT (ABAP Development Tools in eclipse or HANA Studio): This is used to develop tasks

2. CDS (Core Data Services in eclipse or HANA Studio): This is used for the implementation of business object layer

3. A New Framework: This is used to handle business logics. It generates web APIs that can be consumed by Fiori or any other applications.

The rough diagram of SAP RAP is shown below:

What is SAP RAP

This programming model looks very similar to the classical ABAP OData and CDS based UI5 Development. This programming model will replace the old way of developing apps via OData SEGW and BOPF.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.