Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

summing in sap script

Former Member
0 Likes
774

all,

i am trying to sum the totals by page.. i cannot store the sum in a global variable..coz that only gives me net total(not by page)..tried using summing command..it's not working...any thoughts...appreciate ur help..

Regrads..

mob.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
586

Try displaying ur total in the footer rather than the main window . By doing this youe cumulative total will be shown in every page .

3 REPLIES 3
Read only

Former Member
0 Likes
587

Try displaying ur total in the footer rather than the main window . By doing this youe cumulative total will be shown in every page .

Read only

0 Likes
586

i'm not displaying totals in main-window, i have a total window.. how do you cumulate by page??

Read only

0 Likes
586

Hi

I think you have two possibility:

- To use command SUMMING:

/: SUMMING PROGRAM_SYMBOL INTO TOTAL_SYMBOL

The PROGRAM_SYMBOL is the global variable you want to sum, TOTAL_SYMBOL is a variable defined in the sapscript:

/: DEFINE TOTAL_SYMBOL = '0'.

You should try to define TOTAL_SYMBOL just once (for example in a window you use only once).

- To use a routine to sum:

/: PERFORM DO_SUM IN ZMYPROGRAM USING PROGRAM_SYMBOL

CHANGING TOTAL_SYMBOL.

Max