ABAP RESTful Application Programming Model RAP
ABAP RESTful Application Programming Model RAP
Introduction
( Evolution of the ABAP Programming Model )
SAP TECHNOMANIAC
Evolution of the ABAP Programming
Model
SAP TECHNOMANIAC
Classic ABAP Application
Programming
➢Most SAP customers are using
➢UI's Available :- Classic Dynpro, Web Dynpro ABAP,
Floorplan Manager
➢With the release 7.4 ABAP optimized for HANA
• CDS Introduced
• SAP Gateway became an integral part of the AS ABAP
• To enhance user experience UI5 + OData
• ADT Eclipse introduced
SAP TECHNOMANIAC
ABAP Programming Model for
SAP Fiori
➢We can build HANA optimized web-based
applications of all types, i.e., search, analytical
and transactional apps
SAP TECHNOMANIAC
Drawbacks
SAP TECHNOMANIAC
ABAP RESTful Application
Programming Model
➢ RAP stands for ABAP RESTful
Application Programming Model.
➢ It's a programming model that defines
the architecture for developing OData
services in SAP BTP ABAP Environment
or Application Server ABAP.
➢ RAP uses the SAP HANA database to
persist application data.
SAP TECHNOMANIAC
ABAP RESTful Application
Programming Model
➢Integrate the different concepts into the ABAP and
CDS languages
SAP TECHNOMANIAC
The key players in the ABAP
RESTful Application Programming
Model are:
SAP TECHNOMANIAC
Ram Niwas
ABAP RESTFUL APPLICATION
LinkedIn :-
PROGRAMMING
www.linkedin.com/in/ram-niwas-04
MODEL (RAP)
PART - 2
SAP TECHNOMANIAC
Big Picture-Architecture Overview
SAP TECHNOMANIAC
DATA MODELING & BEHAVIOR
➢It deals with data and the corresponding business logic.
➢The RAP uses CDS to define and organize the data model.
• CDS provides a framework for defining and consuming semantic data
models
• CDS entities are the fundamental building blocks for your application
➢Data models support access to database
• Transactional access ( Uses Business Object)
• Query access ( Uses Queries)
SAP TECHNOMANIAC
DATA Model
• 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.
SAP TECHNOMANIAC
Business Object
➢A business object (BO) is a common term to represent
a real-world artifact in enterprise application
development such as the Travel, Sales order
➢It have several nodes
• The Travel => Booking => Booking Supplements
• The Sales Order => Sales Item => Schedule Lines
➢It have Common Transactional operation
• Create
• Update
• Delete
• Actions
SAP TECHNOMANIAC
A Business Object is
characterized by
➢a structure,
➢a behavior and
➢the corresponding runtime implementation.
SAP TECHNOMANIAC
Business Object
BO is characterized by
➢A structure
➢A behavior and
➢The corresponding
runtime
implementation.
SAP TECHNOMANIAC
BO is characterized by A
structure
➢ BO consists of a
hierarchical tree of nodes
(Sales Order, Items,
Schedule Lines)
➢ Nodes are linked by special
kinds of associations,
namely by compositions.
SAP TECHNOMANIAC
Association vs Composition
➢Association and composition are two types of
relationships between entities in CDS.
• Association is a general relationship between two
entities. It can be one-to-one, one-to-many, or many-
to-many.
SAP TECHNOMANIAC
Association vs Composition
➢Association and composition are two types of relationships
between entities in CDS.
• Composition is a stronger type of relationship between two
entities. It represents a whole-part relationship, where the child
entity cannot exist without the parent entity.
SAP TECHNOMANIAC
Key differences
Feature Association Composition
Strength of
Weak Strong
relationship
Can the child
entity exist
Yes No
without the parent
entity?
Can be one-to-
Cardinality one, one-to-many, Typically one-to-many
or many-to-many
SAP TECHNOMANIAC
BO is characterized by A
structure
➢ Composition Tree.
➢ Root entity
➢ Child entity
SAP TECHNOMANIAC
Root Entity
SAP TECHNOMANIAC
Child and Leaf Entity
➢A to-parent association in ABAP CDS is a specialized
association which can be defined to model the child
parent relationship between two CDS entities.
SAP TECHNOMANIAC
Ram Niwas
ABAP RESTFUL APPLICATION
LinkedIn :-
PROGRAMMING
www.linkedin.com/in/ram-niwas-04
MODEL (RAP)
PART - 3
SAP TECHNOMANIAC
Big Picture-Architecture Overview
SAP TECHNOMANIAC
Business Object
BO is characterized by
➢A structure
➢A behavior and
➢The corresponding
runtime
implementation.
SAP TECHNOMANIAC
Behavior of a Business Object
➢ Behaviour definition is an ABAP
Repository object that describes the
behavior of a business object.
➢ A behavior definition is defined
CDS Model
using the Behavior Definition
Language (BDL).
➢ The implementation of a behavior
definition can be done in a single
ABAP class (behavior pool) or can
be split between an arbitrary set of
ABAP classes.
SAP TECHNOMANIAC
Business Object’s Behavior
Operations
➢ Modify operations :-
• CUD
• Action
➢ Read operations
• Read
• Read By Operation
• Function
SAP TECHNOMANIAC
Business Object’s Behavior
Behavior Characteristic
➢ ETag
➢ Draft handling
➢ Feature control
➢ Numbering
➢ Authorization Control
SAP TECHNOMANIAC
Business Object
BO is characterized by
➢A structure
➢A behavior and
➢The corresponding
runtime
implementation.
SAP TECHNOMANIAC
Behavior Defination
SAP TECHNOMANIAC
Business Object’s Runtime
➢The business object runtime
mainly consists of two parts:
• Interaction phase
• Save sequence
SAP TECHNOMANIAC
Business Object
BO is characterized by
➢A structure
➢A behavior and
➢The corresponding
runtime
implementation.
SAP TECHNOMANIAC
Big Picture-Architecture Overview
SAP TECHNOMANIAC
THANK YOU
CONTACT
Ram Niwas
LinkedIn :- https://www.linkedin.com/in/ram-niwas-04/
FB group :-
https://www.facebook.com/groups/586730659057346/
SLIDE /
SAP TECHNOMANIAC
External and Internal
Perspective of Business Objects
➢External perspective :- Focuses on the features and
functionality of the business object that are important
to customers, partners, and other external
stakeholders.
➢Internal perspective :- Focuses on the implementation
details of the business object, such as its data
structure, behavior, and relationships with other
business objects.
SAP TECHNOMANIAC
Flight Tables and Relationship
SAP TECHNOMANIAC
Data Model we want create with CDS
The blue boxes represent
a Travel business object,
with its child entities
Booking and Booking
Supplement.
SAP TECHNOMANIAC
Behavior
SAP TECHNOMANIAC