SAP NetWeaver AS ABAP Release 740, ©Copyright 2014 SAP AG. All rights reserved.
ABAP Keyword Documentation → ABAP − Reference → Processing Internal Data → Assignments → Special Assignments → MOVE-CORRESPONDING →
MOVE-CORRESPONDING - itab
This variant is not yet released and cannot be used.
Syntax
MOVE-CORRESPONDING [EXACT] itab1 TO itab2.
[EXPANDING NESTED TABLES] [KEEPING TARGET LINES].
Extras:
1. ... EXPANDING NESTED TABLES
2. ... KEEPING TARGET LINES
Effect
This variant of the statement MOVE-CORRESPONDING requires internal tables to be specified for itab1 and itab2. It searches for all similarly named components in the row types of itab1 and itab2 and assigns them from itab1 to itab2 in accordance with the rules below.
If there are components with the same name, the target table itab2 is deleted without the addition KEEPING TARGET LINES and the same number of initial rows are inserted as exist in the source table itab1. The rows of the source table are then extracted sequentially (in the same order as in the statement LOOP) and the content of each row is assigned to the corresponding row in the target table in accordance with the rules for MOVE-CORRESPONDING [EXACT] for structures. Finally, the table keys and associated table indexes are updated (if necessary) in the target table in accordance with the rules insertions in internal tables. The relevant exceptions are raised if uniqueness is violated.
If there are no components with the same name, no assignment is made and the target table is left unchanged.
Notes
... EXPANDING NESTED TABLES
Effect
If this addition is specified, the individual rows are assigned in accordance with the rules for MOVE-CORRESPONDING [EXACT] with EXPANDING NESTED TABLES specified, and tabular components are resolved at every hierarchy level.
If the addition is not specified, the individual rows are assigned in accordance with the rules for
MOVE-CORRESPONDING [EXACT]
without EXPANDING NESTED TABLES specified, and tabular components are assigned in accordance with the
rules for
assignments or lossless assignments.
... KEEPING TARGET LINES
Effect
This addition stops the target table itab2 from being deleted. Instead, it appends the same number of initial rows as exist in the source table itab1. The rows of the source tables are then mapped to these rows. The table keys and indexes are then updated across all rows. If no identically named components are found, the target table remains unchanged.
Note
The addition KEEPING TARGET LINES is only effective on the rows of itab2. It cannot be effective on nested tables, even when specified with the addition EXPANDING NESTED TABLES. This is because nested tables are always resolved in new initial rows.
Example
See MOVE-CORRESPONDING for internal tables.