ABAP Keyword Documentation →  ABAP - Reference →  Processing Internal Data →  Assignments →  Assigning Components →  CORRESPONDING - Component Operator → 



... [ MAPPING {t1 = s1}|( t1 = s1 mapping )
              {t2 = s2}|( t2 = s2 mapping )
              ...  ]
    [ EXCEPT {ti tj ...}|* ] ...


1. ... MAPPING  t1 = s1 t2 = s2 ...

2. ... EXCEPT  {t1 t2 ...}|*


Mapping rule for the component operator CORRESPONDING. The optional mapping rule overrides the default assignment of identically named components only. The additions MAPPING and EXCEPT can be used individually or together. EXCEPT must always be specified after MAPPING.


Addition 1

... MAPPING  t1 = s1 t2 = s2 ...


After MAPPING, t1, t2, ... are used to assign the components s1, s2,... of a source structure or source table in mapping relationships to the components of a target structure or target table. A component of a target object cannot appear more than once in the list after MAPPING and the structure component selector cannot be used to access subcomponents. Neither of these rules apply for components of the source object. If MAPPING is used, the table types involved must also have structured row types when the components of an argument are used and the addition DEEP is set implicitly.

The content of the component specified on the right side of an equals sign in a mapping relationship is assigned to each component specified on the left side. If there is an identically named component in the target structure for a component specified on the right side, it is also assigned content (unless it is specified on the left side of a mapping relationship itself). In elementary components the assignment is made in accordance with the associated assignment rules. In structured and tabular components, the assignment is made in accordance with the rules of MOVE-CORRESPONDING with the addition EXPANDING NESTED TABLES.

Identically named components can also be specified on the right and left side of the equals sign. This is a good idea in the following cases:

If the components specified on the left and right of an equals sign of a mapping relationship are themselves structured or tabular with a structured row type, a separate mapping rule can be nested for these components. Here, the mapping relationship is set in parentheses ( ... ) and a mapping rule is specified after the mapping relationship in accordance with the same rules as on the top level. The parentheses are not allowed if a nested mapping rule is not used.

Addition 2

... EXCEPT  {t1 t2 ...}|*


After EXCEPT, components t1, t2, ... of the target structure or target table that are not specified in a preceding mapping relationship or an asterisk, *, can be specified:

Access to subcomponents of components of the target object using the structure component selector is not allowed in the list after EXCEPT either.