ADD dobj1 TO dobj2.
This statement has the same effect as the statement
COMPUTE dobj2 = dobj2 + dobj1.
The content of dobj1 is added to the content of dobj2 and the result is assigned to dobj2. The data objects dobj1 and dobj2 must be numeric. You cannot specify predefined functions or functional methods. The calculation type is determined in the same way as for an arithmetic expression.
Obsolete forms: ADD...THEN...UNTIL,
ADD-CORRESPONDING
After adding, the result contains the character string " 1.0000000000000E+00". The result shows that the calculation type is f. The content of the character-type field result is converted to f before the operation and back to c after the operation.
DATA: operand TYPE f VALUE 1,
result TYPE c LENGTH 20.
ADD operand TO result.
Catchable Exceptions
CX_SY_ARITHMETIC_OVERFLOW
CX_SY_CONVERSION_OVERFLOW
Non-Catchable Exceptions
Runtime Error: ADD_FIELDS_ILLEGAL_ACCESS