Mentor SAP

RAP Architecture

Architectural Overview

 

Applications that are developed with the ABAP RESTful Application Programming Model consist of the following building-blocks:

Business Objects

Business Objects represent the data model and define the data related logic, called behavior, independent of specific consumption. RAP business objects are defined through CDS data modeling views, CDS behavior definitions, and Behavior implementations in ABAP classes.

 

Business Object Projections

The Business Object Projection is an approach to project and alias a subset of the business object for a specific business service. The projection enables flexible service consumption as well as role-based service designs. In RAP, a BO Projection consists of CDS projection views, CDS Behavior projections, and, if needed, additional or consumption specific implementations.

 

Service Definition

A service definition defines the scope of a business service, in particular, the business object projection to be exposed via this service.

 

Service Binding

A service binding defines the communication protocol such as OData V2 or OData V4 and the kind of service to be offered for a consumer, such as UI services or a Web service.

 

SAP Fiori UI

SAP Fiori UI provides a designated UI for commonly used application patterns based on OData Services.

 

Web API

A Web API provides a public interface to access the OData service by any OData client.

 

What is a Business Object?

 

A business object (BO) represents an entity of the data model. A RAP BO can either consist of a single node (Simple BO) or of a hierarchy of nodes (Composite BO). An example for a Composite BO is a document that consists of a header (root node) and items (child node).

 

The behavior of a BO defines operations that can be executed on the data, for example the standard operations Create, Update, Delete (CRUD), but also specific actions and functions.

 

It also provides feature control (for example, the definition which data is mandatory and which is read-only), concurrency control (for example, the handling of locks), and authorization control.

 

What is a Business Service?

 

In the context of the ABAP RESTful application programming model, a business service is a RESTful service that can be called by a consumer. It is defined by exposing its data model together with the associated behavior. It consists of a service definition and a service binding.

 

The service definition is a projection of the data model and the related behavior to be exposed, whereas the service binding defines a specific communication protocol, such as OData V2 or OData V4, and the kind of service to be offered for a consumer. This separation allows the data models and service definitions to be integrated into various communication protocols without the need for reimplementation.

 

Development Flow

 

Developing a RAP application consists of the following main steps:

  1. Provide the Database Tables.
    Developing a RAP application starts with providing the database tables. Depending on the development scenario, these can be existing tables, legacy tables, or tables created specifically for this application.

     

  2. Define the Data Model.
    The data model of the Business Object is defined with CDS Views. Depending on whether it is a simple or a composite BO, one or more CDS Views are required. In case of a composite BO, this is also the place where you define the entity hierarchy.