Ansicht
Dokumentation

ABENCL_ABAP_CORR_STRUC_ABEXA - CL ABAP CORR STRUC ABEXA

ABENCL_ABAP_CORR_STRUC_ABEXA - CL ABAP CORR STRUC ABEXA

RFUMSV00 - Advance Return for Tax on Sales/Purchases   Fill RESBD Structure from EBP Component Structure  
This documentation is copyright by SAP AG.
SAP E-Book

CL_ABAP_CORRESPONDING for Nested Structures

This example demonstrates the system class CL_ABAP_CORRESPONDING for nested structures.

Source Code

Execute

Description

The components of the structure struct1 are assigned to the structure struct2 using the system class CL_ABAP_CORRESPONDING.

  • At the top level:
  • a1 is mapped to b3 and a3 is mapped to b1.

  • a2 to b2 are ignored, since their names do not match and b2 keeps their value.

  • The component a4 occurs in both structures and is assigned using identical names.

  • a5 also occurs in both structures but is excluded explicitly by the mapping type.

  • The substructure asub1 is mapped to the substructure bsub1.

  • At the level of the first substructure:
  • s1_a1 is mapped to s1_b3 and s1_a3 is mapped to s1_b1.

  • s1_a2 to s1_b2 are ignored, since their names are not identical and s1_b2 keeps their value.

  • The substructure asub2 is mapped to the substructure bsub2.

  • At the level of the second substructure:
  • s2_a1 is mapped to s2_b3 and s2_a3 is mapped to s2_b1.

  • s2_a2 to s2_b2 are ignored, since their names are not identical and s2_b2 keeps their value.






TXBHW - Original Tax Base Amount in Local Currency   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.

Length: 2339 Date: 20240419 Time: 135426     sap01-206 ( 27 ms )