Ansicht
Dokumentation

ABENDERIVED_TYPES_CONTROL_ABEXA - DERIVED TYPES CONTROL ABEXA

ABENDERIVED_TYPES_CONTROL_ABEXA - DERIVED TYPES CONTROL ABEXA

BAL Application Log Documentation   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
This documentation is copyright by SAP AG.
SAP E-Book

Using %control

This example demonstrates the use of %control with a managed RAP BO.

Data model

The CDS data model consists of the root entity DEMO_MANAGED_ROOT_4 and its child entity DEMO_MANAGED_CHILD_4.

Root entity:

Child entity:

Behavior definition

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

Behavior implementation

For the above CDS behavior definition, one ABP is created. The global class of the behavior pool is BP_DEMO_MANAGED_ROOT_4. The actual behavior implementation takes place in local classes that are defined and implemented in the BP_DEMO_MANAGED_ROOT_4========CCIMP of the behavior pool. In this case, the behavior pool does not include any implementations that are relevant for the example.

Source Code

Execute

Description

Access with ABAP using EML

There are two modify requests that cover several RAP modify operations.

  1. The first modify request covers a RAP create and create-by-association operation. The RAP create operation is based on the construction of an internal table using the VALUE operator. In this case, %control is specified and enabled for all fields for all RAP BO instances after the first bracket. See the concept here. The create-by-association operation does not need to have %control specified. The addition FIELDS ( ... ) WITH is used which automatically enables %control. With a COMMIT ENTITIES statement, the instances are saved to the database.
  2. The second modify request covers a RAP create and update operation. In the create operation, %control is specified for each field of the RAP BO instances individually while purposely disabling %control for some of the fields. The same is true for the update operation. Here, %control is specified using the VALUE operator. With a COMMIT ENTITIES, the instances are saved to the database.

The output shows the database table entries of the root and child entity.






Fill RESBD Structure from EBP Component Structure   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.

Length: 3576 Date: 20240512 Time: 023436     sap01-206 ( 51 ms )