SAP ASSIGN COMPONENT ABEXA



Get Example source ABAP code based on a different SAP table
  



Field Symbols, Dynamic Structure Components
This example demonstrates dynamic assignments of structure components using ASSIGN.

ABAP_SOURCE_CODE
DEMO CL_DEMO_ASSIGN_COMPONENT
DEMO_V5 CL_DEMO_ASSIGN_COMPONENT_V5

ABAP_DESCRIPTION
A structure is assigned to a generically typed field symbol. Using the field symbol the individual components of the structure can be addressed dynamically only. This example shows different ways of doing so and measures their runtime. Using the position is better for performance than using the name.
BEGIN_SECTION VERSION 5 OUT Using a ABAP Alternative 1@1@>fully dynamic name (name) with the content <(>-COMP1<)> is most time consuming. This variant should not be used any more.
END_SECTION VERSION 5 OUT