MULTIPLY-CORRESPONDING struc1 BY struc2.
This statement is not allowed in an ABAP Objects context. See Cannot Perform Arithmetic Operations on Identically-Named Structure Components
Interprets struc1 and struc2
as field strings. If, for example,
struc1 and struc2
are tables, executes the statement for their header lines.
Searches for all sub-fields which occur
both in struc1 and struc2
and then generates, for all field pairs corresponding to the sub-fields ni, statements of the form
MULTIPLY struc1-ni BY struc2-ni.
The other fields remain unchanged.
With complex structures, the full names of the corresponding field pairs must be identical.
DATA: BEGIN OF MONEY,
VALUE_IN(20) VALUE 'German
marks'.
USA TYPE I VALUE 100,
FRG
TYPE I VALUE 200,
AUT TYPE I VALUE 300,
END
OF MONEY,
BEGIN OF CHANGE,
DESCRIPTION(30)
VALUE 'DM to national currency'.
USA TYPE F VALUE '0.6667',
FRG
TYPE F VALUE '1.0',
AUT TYPE F VALUE '7.0',
END
OF CHANGE.
MULTIPLY-CORRESPONDING MONEY BY CHANGE.
MONEY-VALUE_IN = 'National currency'.
The above MULTIPLY-CORRESPONDING statement is equivalent to the following three statements:
MULTIPLY MONEY-USA BY CHANGE-USA.
MULTIPLY MONEY-FRG BY CHANGE-FRG.
MULTIPLY MONEY-AUT BY CHANGE-AUT.
All fields with identical names are multiplied, whether numeric or not. The conversions performed are similar to those for MULTIPLY.
Catchable Exceptions
CX_SY_ARITHMETIC_OVERFLOW
CX_SY_CONVERSION_OVERFLOW
MULTIPLY, MOVE-CORRESPONDING,
ADD-CORRESPONDING,
SUBTRACT-CORRESPONDING,
DIVIDE-CORRESPONDING
Arithmetic Calculations