ABAP Keyword Documentation →  ABAP − Reference → 

ABAP RESTful Programming Model


The ABAP RESTful Programming Model is based on data modeling using ABAP CDS views. The full RESTful programming model is the product of adding behavior modeling and behavior implementation concepts to the ABAP language.

The use of database read artifacts generated by ABAP CDS is unaffected by this model and only service definitions are added for external publications. Writes implemented in ABAP have been given a new formal order, since the many conditions incurred by transactional consistency requirements mean they cannot simply be delegated to SQL commands.

In ABAP CDS, several behavior modeling elements are included in the annotation syntax ObjectModel. For example, the annotation @ObjectModel.createEnabled:true in a CDS view indicates that ObjectModel supports the creation of new instances. These annotations have the following characteristics however:

Behavior Definition and Behavior Implementation of the Business Object

A business object (BO) in the ABAP RESTful Programming Model provides the following functions:

ABAP RESTful Programming Model uses ABAP CDS to define the data model for business objects. Each business object contains a top node (the leading entity) known as the root entity. The formal structure of a business object consists of a tree of entities joined by associations.

The ABAP RESTful Programming Model defines the behavior of the data model in a behavior definition and implements it in an accompanying behavior implementation:

Prerequisite for Behavior Modeling of the Business Object

In ABAP CDS, the root entity is indicated using define root view RootEntity as ...

This replaces the annotation @ObjectModel.compositionRoot:true.

An association that represents a composition relation is indicated using composition ... of ChildEntity as ...

This replaces the annotation @ObjectModel.association.type:[#TO_COMPOSITION_CHILD] ab.

This syntax is a prerequisite for the specification of behaviors as behavior definitions in the ABAP RESTful Programming Model.


Behavior Definitions
Derived Types
Behavior Implementations