Get Example source ABAP code based on a different SAP table
ABAP_EML - Variants of SET FLAGS> This example demonstrates the variants of the SET FLAGS> 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_FLAGS
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 FLAGS> statement, variables are declared for the field list typed with ABP_FIELD_NAME_TAB>> and for the flags typed with a BDEF derived type> that includes the %control> structure. The field list gets filled, purposely excluding certain field names. Thus, for all fields contained in the field list, the value for the respective component in the %control > structure is 01>. The value for the ones that are not contained in the field list is 00>. As a result of all the SET NAMES> statement variants, the %control> structures are displayed in an output window. The first variant comprises examples for both %control> and %element>.