SAP CALC EXPRESSSION - Guide
Get Example source ABAP code based on a different SAP table
GUIDELINE 4.20
Calculations
ABAP_BACKGROUND
In ABAP, the
ABAP_RULE
For calculations, use the operator format with the equals sign (=) instead of the ABAP keyword format.
ABAP_DETAILS
Calculations with the statements
Exception
The command format allows the use of
sum_total.
If arithmetic operations are in the form
It is immediately clear to the observer that the value of the specified variables is reduced by one. This may not be the case for the operator format, if it is not straightaway obvious that the target variable and one of the operands are identical. In such cases you can and should ignore the above rule. The primary concern is the readability of the source code.
Bad example
The following source code shows a multiplication using the statement
Good example
The following source code shows the same example as above, but in the more compact operator format.