Ansicht
Dokumentation

ABENMOVE_CORRESPONDING_ABEXA - MOVE CORRESPONDING ABEXA

ABENMOVE_CORRESPONDING_ABEXA - MOVE CORRESPONDING ABEXA

PERFORM Short Reference   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.
SAP E-Book

MOVE-CORRESPONDING for Internal Tables

This example demonstrates the statement MOVE-CORRESPONDING for internal tables.

Source Code

Execute

Description

Two structures, struct1 and struct2 are declared using the available additions and MOVE-CORRESPONDING assigns struct1 to struct2.

  • itab1 contains two elementary components, col1 and col2, and a tabular component col3 with the components col1 and col2.
  • itab2 contains two elementary components, col2 and col4, and a tabular component col3 with the components col2 and col3.

The internal tables are filled with values. For the output, the structured components are resolved to elementary components of an output table, output.

The statement MOVE-CORRESPONDING finds the identically named components col2 and col3 in itab1 and itab2 and the assignments work as follows:

  • MOVE-CORRESPONDING
The original content of itab2 is deleted. After the assignment, the columns col2 and col3 have the same content as in itab1, whereas col4 remains initial.
  • MOVE-CORRESPONDING KEEPING TARGET LINES
The original content of itab2 is preserved. Three new lines are added in which the columns col2 and col3 have the same content as in itab1, whereas col4 remains initial.
  • MOVE-CORRESPONDING EXPANDING NESTED TABLES
The original content of itab2 is deleted. After the assignment, the column col2 has the same content as in itab1 and col4 remains initial. The tabular component col3 is resolved and the identically named component col2 is found there. The original content of itab2-col3 is deleted. After the assignment, the column col2 has the same content as in itab1-col3, whereas the column col3 remains initial.
  • MOVE-CORRESPONDING EXPANDING NESTED TABLES KEEPING TARGET LINES
The original content of itab2 is preserved. Three new lines are added, to which the same applies as to the results of the previous assignment.





BAL_S_LOG - Application Log: Log header data   CL_GUI_FRONTEND_SERVICES - Frontend Services  
This documentation is copyright by SAP AG.

Length: 2810 Date: 20240420 Time: 112839     sap01-206 ( 41 ms )