cancel
Showing results for 
Search instead for 
Did you mean: 

Final total cannot appear when the last line item reached the page end

Former Member
0 Kudos

Hi All,

My report included 2 pages. Problem is the final total cannot appear when the last line item reached the page end. (page 2)

    • final total will appear on the middle of last page (page 3) when i comment (type = 'BOTTOM').

Below is the program.

CALL FUNCTION 'OPEN_FORM'

EXPORTING

device = 'PRINTER'

dialog = 'X'

form = 'ZBOTM_VOUCHER'

language = sy-langu.

sort itab by vblnr.

LOOP AT itab INTO wa_itab.

move wa_itab-vblnr to reguh-vblnr.

move wa_itab-lifnr to reguh-lifnr.

move wa_itab-rbetr to reguh-rbetr.

reguh-rbetr = reguh-rbetr * -1.

CALL FUNCTION 'WRITE_FORM'

EXPORTING

window = 'MAIN'

element = 'DETAIL'.

t_rbetr = reguh-rbetr + t_rbetr.

AT LAST.

CALL FUNCTION 'WRITE_FORM'

EXPORTING

window = 'LINE'.

CALL FUNCTION 'WRITE_FORM'

EXPORTING

element = 'TOTAL'.

type = 'BOTTOM'

WINDOW = 'MAIN'.

ENDAT.

Thanks.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

You can use

/: BOTTOM

/: ENDBOTTOM

it will print at the bottom of your window

Former Member
0 Kudos

Hi,

Where should I include the code for bottom?

How to open text editor?

Thanks.

Edited by: Alice8 on Feb 7, 2011 9:09 AM