ABAP Keyword Documentation → ABAP - Reference → Processing Internal Data → Assignments → Assigning Components
CORRESPONDING - Component Operator
Other versions:
7.31 | 7.40 | 7.54
Syntax Forms
Components of an argument
1. ... { CORRESPONDING type( [DEEP] [BASE ( base )] struct|itab ) }
| { CORRESPONDING type( [BASE ( base )] struct|itab [mapping] ) } ...
Components of two arguments
2. ... CORRESPONDING type( itab1 FROM itab2 USING [KEY key_name]
s1 = t1 s2 = t2 ... mapping ) ...
Effect
A constructor expression with the component
operator CORRESPONDING
creates a result of a data type specified using type
. In the
first variant, the components of a structured or tabular result are constructed from the components of an argument; in the
second variant, the components of two tabular arguments are combined as a tabular result.
The following can be specified for type
:
- A structured type or a table type.
- The
#
character as a symbol for the operand type. Can be specified only if the data type required in an operand position is unique and fully identifiable. The operand type must be a structure type or a table type.
The operator creates structures or internal tables with the specified data type. The components or columns of the result are filled using assignments of components of the parameters specified in the parentheses. The assignments are made using matching names or mapping relationships in a mapping rule. The variant shown above is also available with different functions.
Examples
See Assigning Components: Examples.
Continue
CORRESPONDING - Components of an Argument