INCLUDE
ARTICLE
Cannot Perform Automatic Calculations While Using the WRITE
Statement
In ABAP Objects, you cannot use MAXIMUM , MINIMUM , or
SUMMING to calculate values automatically when creating basic
lists using the WRITE statement. .
In ABAP Objects, the following statements cause an error message:
MAXIMUM f.
MINIMUM f.
SUMMING f.
...
WRITE f.
...
WRITE: / max_f, min_f, sum_f.
Correct syntax:
DATA: max_f like f,
min_f like f,
sum_f like f.
...
WRITE f.
IF max_f
max_f = f.
ENDIF.
IF min_f f.
min_f = f.
ENDIF.
sum_f = sum_f + f.
...
WRITE: / max_f, min_f, sum_f.
Cause:
These statements create the internal global variables max_f ,
min_f and sum_f . To make programs more readable, you
should stopy using these statements and write explicit code instead.
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved