cancel
Showing results for 
Search instead for 
Did you mean: 

Grand Total in SAP Script

Former Member
0 Kudos

Hi,

I am printing grand total at the end of in Main window in SAP Script.

In each page 10 items are getting printed (as per the size of main window).

Now, the problem is that when there are 20 items, 10 items are printed in 1st page,

10 items in the second page. In this case, the grand total is getting overlapped by the 20th item, instead of printing grand total in 3rd page.

Please let me know, how can I move the Grand total to last (3rd page in this case).

Thanks & Regards,

Priyanka

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

hi,

you can use /: BOTTOM and /: ENDBOTTOM

then it will print at the bottom of your main window.

because totals are printed only once at the end of the main window you can use this.

see syntax below:

BOTTOM: Define footer text in a window

For MAIN, determine the lines, also known as footer texts, which are always automatically output at the bottom of that window.

Syntax:

/: BOTTOM

:

/: ENDBOTTOM

The text lines between the two commands are output at the bottom of MAIN.

To switch a footer text off, enter the command pair BOTTOM .. ENDBOTTOM with no text lines in between:

/: BOTTOM

/: ENDBOTTOM

let Us know if you still have any issues..

Surya

Former Member
0 Kudos

Hi,

Total is getting printed correctly, when the main window is not completely filled.

For example:

The main window can hold 10 items in it. If there are less than 10 items, then totals is getting printed correctly at the bottom of the first page. If there are more than 10 items, then 10 items are printed on 1st page, remaining items and Totals is getting printed correctly on second page.

The problem exists only when there are exactly 10 items. In this case, since 10 items are getting printed on the first page itself, there is no space for the Totals row to be printed in first page. This totals is not getting printed on the second page. How to move the Totals to next page in this case.

Thanks & Regards,

Priyanka

Edited by: priyanka jatla on Nov 26, 2009 9:39 AM

Edited by: priyanka jatla on Nov 26, 2009 9:39 AM

Former Member
0 Kudos

hi

Then USE

/: Bottom

/: IF &PAGE& = &SAPSCRIPT-FORMPAGES&

P1 &Total&

/: ENDIF

/:endbottom

and check

surya

former_member156446
Active Contributor
0 Kudos

create a window or a text for grand total and have a condition "after main window" that will solve your problem.

Former Member
0 Kudos

Hi,

Better to create a window at the bottom for displaying the grand total.