ADD-CORRESPONDING (ABAP Keyword) introduction & Details
ADD-CORRESPONDING rec1 TO
Interprets rec1 and rec2 as field strings. If, for
example, rec1 and rec2 are tables, executes the statement for their header
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.
fields remain unchanged.
With complex structures, the complete names of
the corresponding field
pairs must be textually
DATA: BEGIN OF VECTOR,
X TYPE I,
LENGTH TYPE I,
END OF VECTOR,
BEGIN OF CIRCLE,
VOLUME TYPE P
RADIUS TYPE I,
X TYPE I,
ADD-CORRESPONDING VECTOR TO CIRCLE.
X and Y occur in both the field strings VECTOR and CIRCLE . Therefore, the
ADD-CORRESPONDING statement is equivalent to both the following
ADD VECTOR-X TO CIRCLE-X.
ADD VECTOR-Y TO
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.
[ FREE ] SUBSCRIBE
RECEIVE UPDATES & SAP ARTICLES RIGHT IN YOUR INBOX.