Ansicht
Dokumentation

ABENOO_OBS_SUMMING_1 - OO OBS SUMMING 1

ABENOO_OBS_SUMMING_1 - OO OBS SUMMING 1

General Material Data   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
This documentation is copyright by SAP AG.
SAP E-Book

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 < 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.






rdisp/max_wprun_time - Maximum work process run time   General Material Data  
This documentation is copyright by SAP AG.

Length: 1456 Date: 20240329 Time: 164532     sap01-206 ( 19 ms )