Ansicht
Dokumentation

ABENBDL_LOCK - BDL LOCK

ABENBDL_LOCK - BDL LOCK

CPI1466 during Backup   General Material Data  
This documentation is copyright by SAP AG.
SAP E-Book

- DEFINE BEHAVIOR, lock


* Work in progress *

... lock master$|dependent ( LocalField = MasterField )

Effect

A behavior definition can specify the following for an entity:

  • The entity supports direct locks (by specifying the entity property lock master)

    or
  • the entity is dependent on the lock status of a parent entity or root entity (by specifying the entity property lock dependent).

A foreign key relationship must be defined for any lock dependencies. This relationship describes which field in the child entity references which field in the parent entity, expressed using LocalField = MasterField in BDL syntax.

Remarks ABAP RAP supports lock master for root nodes of the business object only.

  • The lock property is only relevant for those entities that provide change operations (such as update).

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 process 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 CDS 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;
  action set_status_booked result [1] $self;
}





BAL_S_LOG - Application Log: Log header data   Vendor Master (General Section)  
This documentation is copyright by SAP AG.

Length: 2799 Date: 20240426 Time: 232020     sap01-206 ( 50 ms )