Get Example source ABAP code based on a different SAP table
Using %pid> This example demonstrates the use of %pid > with an unmanaged RAP BO> in a late numbering>> scenario. Data model> The CDS data model consists of the root entity DEMO_UMANAGED_ROOT_LATE_NUM >. Root entity: DDLS DEMO_UNMANAGED_ROOT_DRAFT Behavior definition> The RAP behavior definition> DEMO_UMANAGED_ROOT_LATE_NUM>> is defined in RAP BDL> as follows: BDEF DEMO_UMANAGED_ROOT_LATE_NUM Behavior implementation> For the above RAP behavior definition, one ABP> is created. The global class of the behavior pool is BP_DEMO_UMANAGED_ROOT_LATE_NUM>>. The actual behavior implementation takes place in local classes that are defined and implemented in the BP_DEMO_UMANAGED_ROOT_LATE_NUMCCIMP>> of the behavior pool. See more details on the implementation in the example COMMIT ENTITIES BEGIN, END > with CONVERT KEY OF>>.
ABAP_SOURCE_CODE DEMO CL_DEMO_RAP_DRVD_TYPES_PID
ABAP_DESCRIPTION Access with ABAP using EML> There is one ABAP_EML modify request that creates several RAP BO instances>. Here, the keys are left empty because a preliminary ID %pid> is assigned in the course of the create> method in the behavior pool. With a COMMIT ENTITIES BEGIN ... END>> statement, which includes a CONVERT KEY OF>> statement, the instances are saved to the database table. The adjust_numbers>> method assigns the final keys to the instances. Using the CONVERT KEY OF> statement, the key information for the instances is retrieved. The output shows two tables for the mapping information. The first one includes the MAPPED EARLY>> mapping information that shows initial values for the key. The second one shows the MAPPED LATE>> mapping information including the final keys. Note that %tmp> is not used and relevant in this scenario, hence, %tmp> shows initial values. Another table shows the database table entries after the create operation.