ADD-CORRESPONDING (ABAP Keyword) introduction & Details
ADD-CORRESPONDING
Basic form
ADD-CORRESPONDING rec1 TO
rec2.
Effect
Interprets rec1 and rec2 as field strings. If, for
example, rec1 and rec2 are tables, executes the statement for their header
lines.
Searches for all sub-fields which occur both in rec1 and rec2 and
then, for all relevant field pairs corresponding to the sub-fields ni ,
generates statements of the form
ADD rec1-ni TO rec2-ni.
The other
fields remain unchanged.
With complex structures, the complete names of
the corresponding field
pairs must be textually
identical.
Example
DATA: BEGIN OF VECTOR,
X TYPE I,
Y TYPE
I,
LENGTH TYPE I,
END OF VECTOR,
BEGIN OF CIRCLE,
VOLUME TYPE P
Y
TYPE P,
RADIUS TYPE I,
X TYPE I,
END OF
CIRCLE.
...
ADD-CORRESPONDING VECTOR TO CIRCLE.
The sub-fields
X and Y occur in both the field strings VECTOR and CIRCLE . Therefore, the
ADD-CORRESPONDING statement is equivalent to both the following
statements:
ADD VECTOR-X TO CIRCLE-X.
ADD VECTOR-Y TO
CIRCLE-Y.
Note
All fields with the same name are added,
whether numeric or not. The same conversions are performed as with ADD and
similar runtime errors to those possible with ADD can also occur.
Related 10 ABAP Syntax Tutorials
Most readed SAP Tutorials
- WRITE - Output to a list ( SAP ABAP Keyword)
WRITE ( Output to a list ) is a keyword used in SAP ABAP programming.This tutorial covers its introduction & syntax details. - List of SAP HR TABLES and Infotypes tables
Detailed full list of tables and infotypes used in SAP HR module. - List of SAP MM Transaction codes
This documentation covers the details of SAP MM Transaction codes - SELECT-OPTIONS ( SAP ABAP Keyword)
SELECT-OPTIONS is a keyword used in SAP ABAP programming.This tutorial covers its introduction & syntax details. - FI Accounts Receivable and Accounts Payable | SAP FI PDF manual
The following topics are an introduction to the Accounts Receivable and Accounts Payable application components. - SAP MM Process Flow
The typical procurement cycle for a service or material consists of the following phases: - SELECT clause ( SAP ABAP Keyword)
SELECT clause is a keyword used in SAP ABAP programming.This tutorial covers its introduction & syntax details.
Latest Added SAP documents
- 9KE9 Transaction code
Details about SAP transaction code 9KE9 - 9KE8 Transaction code
Details about SAP transaction code 9KE8 - 9KE7 Transaction code
Details about SAP transaction code 9KE7 - 9KE6 Transaction code
Details about SAP transaction code 9KE6 - 9KE5 Transaction code
Details about SAP transaction code 9KE5 - 9KE4 Transaction code
Details about SAP transaction code 9KE4 - 9KE3 Transaction code
Details about SAP transaction code 9KE3 - 9KE2 Transaction code
Details about SAP transaction code 9KE2 - 9KE1 Transaction code
Details about SAP transaction code 9KE1 - 9KE0 Transaction code
Details about SAP transaction code 9KE0