Ansicht
Dokumentation
ABENBDL_DRAFT_ACTION1_ABEXA - BDL DRAFT ACTION1 ABEXA
BAL_S_LOG - Application Log: Log header data PERFORM Short ReferenceThis documentation is copyright by SAP AG.
- Draft Action Activate
This example demonstrates how the draft action Activate is defined, implemented, and consumed in a managed RAP BO.
Data model
The CDS data model consists of the root entity DEMO_RAP_MANAGED_DRAFT_1.
Root entity:
Behavior definition
The CDS behavior definition DEMO_RAP_MANAGED_DRAFT_1 is defined in CDS BDL as shown below. It has all mandatory syntax elements required for a draft scenario:
- with draft; is defined in the CDS behavior definition header.
- The draft table DEMO_DBTAB_DRAFT is defined.
- The total ETag field Time stamp is defined in the correct position, namely directly after the lock master
- The draft action Edit is defined explicitly
- If the draft action Edit is enabled implicitly, then it automatically comes with instance feature control and an implementation in the ABAP behavior pool is required. In this example, it is enabled explicitly without feature control, so that it can be handled by the managed RAP BO provider.
The draft is completely handled by the RAP framework; no implementation in the ABAP behavior pool is required.
Source Code
Description
Access with ABAP using EML
The above source code uses EML to access the RAP business object from an ABAP program:
- Two draft instances are created with the statement MODIFY ENTITY.
- The draft action Activate is executed on both instances with the statement EXECUTE.
- Using the SELECT statement, the content of the draft and persistent table before and after activation is displayed. Before the activation, the draft table contains the two new draft instances. After the activation, the instances are copied to the persistent table and the content from the draft table is cleared.
RFUMSV00 - Advance Return for Tax on Sales/Purchases CL_GUI_FRONTEND_SERVICES - Frontend Services
This documentation is copyright by SAP AG.
Length: 3417 Date: 20240419 Time: 023717 sap01-206 ( 41 ms )