Summing a Program Symbol: SUMMING 

The SUMMING command is used for accumulating a total value for a program symbol. The command should be specified just once. Then, each time the specified program symbol is formatted, its current value is added into the total symbol. Several program symbols may all be added into a single total symbol.

Syntax:

/: SUMMING program_symbol INTO total_symbol

SAPscript cannot create the field for the total dynamically. The summing symbol used for totalling must be declared with TABLES in the ABAP program. Otherwise, only zero is added. Declaring the symbol with the DATA statement is not sufficient (global data).

For details on summing and carrying forward, see Summing and Carrying Forward is Incorrect.