Skip to content

ABAP Keyword Documentation →  ABAP − Reference →  ABAP RESTful Programming Model →  Behavior Definitions →  ABAP BDL →  ABAP BDL - DEFINE BEHAVIOR 

ABAP BDL - DEFINE BEHAVIOR, Standard Operations

Other versions: 7.31 | 7.40 | 7.54

Syntax


... [internal] create; 
    [internal] update;
    [internal] delete;

Effect

The standard operations create, update, and delete (known as the CUD operations) are the most important operations for the transactional behavior of a business object. The operations create, update, and delete must be declared appropriately in the behavior definition for an entity whenever an entity is created, updated, or deleted.

A standard operation can be given the addition internal. This makes it possible to implement the action without making it consumable from outside. Example: internal update;

CUD operations can be made available for an entity simply by declaring them in the body of the entity in question.

The behavior for the operations create, update, and delete is implemented in the method FOR MODIFY of the handler class.


Note

The FOR LOCK method of the handler class is called automatically before a change operation (such as update) is triggered. However, the corresponding entity must have the lock property in its behavior definition.


Example

In the following example, the data from the ABAP flight data reference scenario (or flight data scenario for short) is used. It represents a legacy business logic that can be used to create and edit flight bookings. The CDS view /DMO/I_Travel represents the root node of the business object for managing flight trips. The underlying business model is described in ABAP BDL - Example.

The following example shows the behavior definition for the root entity Travel.

implementation unmanaged;
define behavior for /DMO/I_Travel alias Travel
lock master
{
  create;
  update;
  delete;
}

The transactional behavior of the business object is defined by the standard operations create, update, and delete. These operations are implemented in the association behavior pools.