Ansicht
Dokumentation

ABENCORRESPONDING_USING_ABEXA - CORRESPONDING USING ABEXA

ABENCORRESPONDING_USING_ABEXA - CORRESPONDING USING ABEXA

General Material Data   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.
SAP E-Book

Component Operator, Lookup Table

This example demonstrates the component operator with FROM ... USING.

Source Code

Execute

Description

This example joins two internal tables itab and itab2 in a constructor expression with the component operator CORRESPONDING in the variant with lookup table.

  • The first assignment specifies the conditionb1 = a1 b2 = a2 without a mapping rule after USING. In the lookup_tab, a line is found for the first and third line of itab and its identically named components are assigned to the corresponding line of itab, where b1 and b2 from lookup_tab and a1 and a2 from itab are ignored. The only identically named component remaining is c1. All other components keep their previous value from itab. The second line is transferred unchanged from itab1.
  • In the second assignment, the default handling is overridden by specifying a mapping rule a1 = a1 a2 = a2 b1 = b1 b2 = b2 c2 = d2, where a mapping relationship for all components that were ignored until now is listed. Accordingly, the content of all components in the first and third line of itab are modified.
  • Finally, the third assignment demonstrates the assignment of the expression to an internal table jtab that does not have the type of itab but is compatible with it. The result of the expression is completely assigned to jtab. The pragma ##operator hides the syntax check warning stating that a temporary copy of itab needs to be created.





General Data in Customer Master   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.

Length: 2024 Date: 20240329 Time: 142200     sap01-206 ( 55 ms )