Get Example source ABAP code based on a different SAP table
SET ENTITIES> This example demonstrates the SET ENTITIES> statements with a managed RAP BO. Note that this example produces a short dump. Data model> The CDS data model consists of the root entity DEMO_ROOT_M>>: DDLS DEMO_ROOT_M Behavior definition> The RAP behavior definition> DEMO_ROOT_M>> is defined in RAP BDL> as follows: BDEF DEMO_ROOT_M Behavior implementation> For the above BDEF, one behavior pool> is created. The global class of the behavior pool is BP_DEMO_ROOT_M>>. The actual behavior implementation takes place in local classes that are defined and implemented in the BP_DEMO_ROOT_M================CCIMP>> of the behavior pool. The handler methods> for the two actions are implemented in a way to demonstrate the effect of the statement SET ENTITIES>.
ABAP_DESCRIPTION Access with ABAP using EML> The above source code uses EML> to access the RAP business object from an ABAP class:
Two RAP BO instances are created in a RAP modify operation> and persisted to the database.
Depending on the selection, either the first or the second action is executed. Both actions include another modify operation to update instances. One action includes SET ENTITIES> statements. If this action is executed, a short dump is produced. In the short dump message, you will also see value for the counter.