Ansicht
Dokumentation

ABENCORRESPONDING_DEEP_MAPP_ABEXA - CORRESPONDING DEEP MAPP ABEXA

ABENCORRESPONDING_DEEP_MAPP_ABEXA - CORRESPONDING DEEP MAPP ABEXA

RFUMSV00 - Advance Return for Tax on Sales/Purchases   General Material Data  
This documentation is copyright by SAP AG.
SAP E-Book

Component Operator, Nested Mapping Rule

This example demonstrates the component operator with a nested mapping rule.

Source Code

Execute

Description

The example assigns the basic form of the result of a constructor expression with the component operator CORRESPONDING with the parameter struct1 to a compatible structure struct2. Various mapping rules are demonstrated. The structures contain a substructure and a tabular component.

  • If there is not mapping rule, the identically named components a2 and istruct are assigned at the top level. The substructure istruct is resolved and the component a2 is assigned here. The tabular components are not identically named and are not assigned.
  • The mapping rule MAPPING jtab = itab is also used to assign the tabular component, whereby only the identically named column a2 is considered.
  • The nested mapping rule
MAPPING ( istruct = istruct MAPPING b1 = a1 EXCEPT a2 )
        ( jtab = itab MAPPING b1 = a1 )
is used to
  • specify a mapping relationship for the components of the substructure istruct. Here, istruct = istruct must be specified at the top level.

  • define a mapping for the tabular components. Here, a mapping is also nested for their columns.

In the result, all components are filled except the component a2 of the substructure that was excluded using EXCEPT.





CL_GUI_FRONTEND_SERVICES - Frontend Services   CL_GUI_FRONTEND_SERVICES - Frontend Services  
This documentation is copyright by SAP AG.

Length: 2148 Date: 20240508 Time: 233918     sap01-206 ( 32 ms )