Get Example source ABAP code based on a different SAP table
Component Operator for Structures This example demonstrates the component operator> for structures.
ABAP_SOURCE_CODE DEMO CL_DEMO_CRRSPNDNG_STRUCT
ABAP_DESCRIPTION This example uses the same structures as the executable example> for MOVE-CORRESPONDING>. Here, the source structure struct1> is used as a parameter of a constructor expression with the component operator CORRESPONDING> and the result is assigned to the target structure struct2>. The source structure struct1> is assigned to the result with the type of struct2> with and without the addition DEEP>. If the addition BASE> is used, the result is given the original value of struct2> as its start value and otherwise stays initial. The assignment is made exactly as described in the executable example> for MOVE-CORRESPONDING> with or without EXPANDING NESTED TABLES> . If DEEP> is used, the name comparison is made for the components of the substructure col3>, which means that fewer assignments are made than when omitting DEEP>. The uninvolved component col4> keeps its initial value without using the addition BASE>. If BASE> is used, it keeps the set value. The result is assigned to the target structure struct2>. The result of the component operator matches the result of MOVE-CORRESPONDING> only if the addition BASE> is used.