Ansicht
Dokumentation

ABENCDS_BEHAVIOR_DEFINITIONS - CDS BEHAVIOR DEFINITIONS

ABENCDS_BEHAVIOR_DEFINITIONS - CDS BEHAVIOR DEFINITIONS

BAL Application Log Documentation   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.
SAP E-Book

- Behavior Definitions


* Work in progress *

A CDS behavior definition is created using CDS BDL in BDL source code.

A business object behavior definition (behavior definition for short) is an ABAP repository object (a source text artifact) that represents the behavior of the business object in the context of ABAP RAP.

A behavior definition always references a CDS data model. The matching name of the CDS entity ensures that a behavior definition has a reference to the data model. This also means that the data model must always exist before the behavior definition, as shown in the following example:

The CDS definition define root view /DMO/I_Travel ... must exist before a behavior definition /DMO/I_Travel can be created. The CDS view /DMO/I_Travel is the root entity in the data structure.

Once the behavior definition is created, the root entity becomes a transactional entity and can, in principle, be used in modifying REST operations. All operations in the specific business object that have transactional support must be specified in this behavior definition.

The transactional behavior of a CDS entity is modeled using Behavior Definition Language (BDL).

Rules

  • A root entity can have at most one behavior definition, in which the behavior of the child entities may need to be specified too. Conversely, a behavior definition has precisely one root entity.
  • The implementation of a behavior definition can be made in both a single ABAP class (a behavior pool) or spread across any number of ABAP classes (behavior pools). This means that any number of behavior pools can be assigned to a behavior definition (a 1:n relation).





Addresses (Business Address Services)   General Data in Customer Master  
This documentation is copyright by SAP AG.

Length: 2946 Date: 20240419 Time: 001712     sap01-206 ( 45 ms )