Ansicht
Dokumentation

ABENEML_MODIFY_OP_ABEXA - EML MODIFY OP ABEXA

ABENEML_MODIFY_OP_ABEXA - EML MODIFY OP ABEXA

ABAP Short Reference   Addresses (Business Address Services)  
This documentation is copyright by SAP AG.
SAP E-Book

- MODIFY, Standard Operations (Managed)

This example demonstrates various standard operations to manipulate a simple managed RAP BO. It also includes the use of READ statements.

Data model

The CDS data model consists of the root entity DEMO_MANAGED_ROOT and its child entity DEMO_MANAGED_CHILD. Furthermore, it contains an association to an entity (DEMO_MANAGED_ASSOC) that is not part of the composition tree.

Root entity:

Child entity:

Behavior definition

The CDS behavior definition DEMO_MANAGED_ROOT is defined in CDS BDL as follows:

Behavior implementation

For the above CDS behavior definition, there is no ABAP behavior pool (ABP) created and needed since only standard CRUD operations are used in the example.

Source Code

Execute

Description

Access with ABAP using EML

The above source code uses EML to access the RAP business object from an ABAP program:

  • Modify operations with CREATE and CREATE BY
Three MODIFY ENTITY operations are executed to create data sets for the root entity using the CREATE statement as well as data sets for associations defined in the BDEF using CREATE BY. One associated entity is part of the composition tree, the other is not (cross-BO entity).
  • Modify operation with UPDATE
Data sets of the root entity are updated.
  • Modify operation with DELETE
Data sets of the root entity are deleted.
  • Read operation with READ and READ BY
Data sets are read from the root, child and cross-BO entity.

For demonstration purposes, several internal tables with the required BDEF derived type are created to be used with the modify operations. They include demo values to be shown in the output. The RAP framework reads the data from the respective database tables into a managed transactional buffer in which the operations take place. The changes are saved with the statement COMMIT ENTITIES, and, thus, the changed data are persisted to the database tables.






ABAP Short Reference   Addresses (Business Address Services)  
This documentation is copyright by SAP AG.

Length: 3767 Date: 20240425 Time: 225358     sap01-206 ( 49 ms )