cancel
Showing results for 
Search instead for 
Did you mean: 

To print subtotal and total at the bottom of the last page in SAPScripts

Former Member
0 Kudos

Hi,

My requirement is to print subtotal and total one below the other at the bottom of last page(In main window). I have used BOTTOM ENDBOTTOM command to display it.

The subtotal is being printed at the bottom but the total is getting printed at the top of page.

Please tell me the command or procedure to display both total and subtotal one below the other at the bottom.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

HI,

Please use this..

/:IF &NEXTPAGE& EQ 0

  • TOTAL...............SUBTOTAL

/:ENDIF

Also pls use a seperate window for printing the sub total/total & place it in the bottom of Page 2 of the script.

Rdgs,

Arnab Sinha

Edited by: Arnab Sinha on Jul 15, 2009 1:57 PM

Former Member
0 Kudos

Hi,

Use 'At Last field' control break event in the LOOP & in the event call the FM 'WRITE_FORM' to print the total & subtotal.

LOOP AT itab.

at last kunnr.

call function 'WRITE_FORM'

element = 'TOTAL'

window = .

endat.

ENDLOOP.

In script u call the element 'TOTAL' and print the total & subtotal variables.

Hope it helps!!

Rgds,

Pavan

former_member585865
Contributor
0 Kudos

Hi Farhana,

use this to print everthing in the last page in scripts.

IF &PAGE& EQ &SAPSCRIPT-FORMPAGES(Z)&

code for subtotal and total.

endif.

Former Member
0 Kudos

hi

write this way

Bottom

Subtotal :####

total : $$$$$$

endbottom.

surya.