[SAP RAP] – BEGIN WITH RESTFUL APPLICATION PROGRAMMING

Hi guys, after exploring about CDS view, next I want to share my understand about RAP – Restful application programming.

First We need to setup something before exploring RAP – RESTFul Application Programming.

Active ABAP Environment on SAP BTP

Go to SAP BTP Cockpit

Instances and Subscriptions

Create

Create service key of ABAP Environment

Create ABAP Cloud Project on ADT

Go to ADT – Eclipse

Create new project

Exploring RAP model diagram

Before going to the details of each section of RAP, let us also take a look at how the ABAP programming models have evolved. These models may co-exist in some of the systems.

  • Classic ABAP Programming – ABAP with free style and screen Programming
  • ABAP For Fiori – Backend will publish ODATA service by SEWG and CDS View. Fiori will be comsume this ODATA and display data on Fiori UI
  • ABAP RESTFul Application Programming Model – Working with data model, behavior, business definition and CDS view.

OK, let take a look RAP Model by diagram

The RAP Model has 3 layers

Data Modelling and Behavior
  • The data model is collection of different entities involved in a business scenario, for example airlines, flight routes and flight schedules, and their relationships, for example the parent-child relationship between airline and the flight schedule.
  • RAP uses CDS to define and organize the data model.
  • The behavior describes what can be done with the data model, for example if the data can be created, updated, or deleted.
  • The behavior can be implemented using ABAP
Business Service
  • Service Definition is used to define what part of the CDS / Behavior definition will be exposed to next layer
  • Service Binding defines a specific communication protocol such as OData V2 / OData V4
Service Consumption
  • Service can be exposed as a UI Service – This is consumed by SAP Fiori Elements app.
  • An OData service that is exposed as a Web API comes without any UI specific information in the metadata. It is the public interface for any OData client to access the OData service. For example, you can consume a Web API from another OData service.

Scenario example

OK let understand clearly about RAP Model, we will create and configuration one scenarios Flight Booking by RAP Model. In this scenario, we will consider

Data Modelling and Behavior
  • Create a table
  • Create root and projection/consumption CDS Entities
  • Create Metadata Extension
  • Create Behavior Definition
Business Service
  • Create Service Definition
  • Create Service Binding

Service Consumption

  • Create FIORI Element app

Summary

In first article of RAP series, I shared how to setup and connect ADT to SAP BTP ABAP Environment and show model of RESTFul Application Programming (RAP). In next articles, We will create and configuration step by step example scenario Flight Booking. Thanks for your reading and any advises kindly leave your comment on this.

Thanks.

JOSEPH

2 comments

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

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