05-22-2006 6:21 PM
Hello Friends,
I like to display the total in the Main window of last page of the form.
I tried Nextpage = 0 N SAPSCRIPT-FORMPAGES, but these variables are getting the right value only when the form reaches footer of the last page.
Could any one please help out in this regard.
Thank you,
Senthil
05-22-2006 6:25 PM
Just have a separated element for your total. You are probably looping a table in the print program and writing some detail lines. After that loop just write the Totals element. Doing this will put the totals on the last page of the sapscript.
Loop at itab.
call function 'WRITE_FORM'
EXPORTING
element = 'ITEMS'
window = 'MAIN'
EXCEPTIONS
others = 1.
endloop.
* Now write the totals.
call function 'WRITE_FORM'
EXPORTING
element = 'TOTALS'
window = 'MAIN'
EXCEPTIONS
others = 1.
Regards,
Rich Heilman