SAP CORRESPONDING VS FOR ABEXA



Get Example source ABAP code based on a different SAP table
  



Component Operator, Comparison with FOR Expression
This example compares the component operator with table comprehensions,

ABAP_SOURCE_CODE
DEMO CL_DEMO_CRRSPNDNG_VS_FOR

ABAP_DESCRIPTION
The columns of an internal table can be assigned to columns with different names in a different table in three different ways:
Constructor expression with component operator CORRESPONDING and mapping rule
Explicit assignment of the individual components behind a FOR expression of a table comprehension.
FOR expression with evaluation of a constructor expression with component operator for each line.
Each method provides the same results. The component operator is quicker than the table comprehension when there are more than approximately 10 iterations. Using the component operator for each line is always the slowest solution.