SAP EML SET NAMES ABEXA



Get Example source ABAP code based on a different SAP table
  



ABAP_EML - Variants of SET NAMES
This example demonstrates the variants of the SET NAMES statement.
Data model
The CDS data model consists of the root entity DEMO_MANAGED_ROOT_MAP and its child entity DEMO_MANAGED_CHILD_MAP.
Root entity:
DDLS DEMO_MANAGED_ROOT_MAP
Child entity:
DDLS DEMO_MANAGED_CHILD_MAP
Behavior definition
The RAP behavior definition DEMO_MANAGED_ROOT_MAP is defined in RAP BDL as follows:
BDEF DEMO_MANAGED_ROOT_MAP
Behavior implementation
For the above RAP behavior definition, one ABP ( BP_DEMO_MANAGED_ROOT_MAP) is created. It is not relevant for the example.

ABAP_SOURCE_CODE
DEMO CL_DEMO_RAP_EML_SET_NAMES

ABAP_DESCRIPTION
Access with ABAP using EML
The above source code uses EML to access the RAP business object from an ABAP class.
For all variants of the SET NAMES statement, variables are declared for the field list typed with ABP_FIELD_NAME_TAB and for the source that is typed with a BDEF derived type which includes the %control structure. The components of the %control structure include a value that is initial and, thus, not contained in the field list.
The field lists for all variants are displayed in an output window. The first variant comprises examples for both %control and %element for the source.