Skip to Content
0
Former Member
Jul 17, 2009 at 03:02 PM

SAPSCRIPT - printing layout twice

232 Views

Hi,

I have created one ticket layout using sap script. I need to print it only once. I created one main window and printing all the fixed text in that. But it is calling that ticket two times. It is printing ticket twice and in preview also it is displaying ticket twice.

Please help me out. How I can resolve this even in print program also I gave one delete command to delete first ticket but still it is not deleteing..

IF print_co-lstid EQ 'LG03'.

IF lv_count IS INITIAL.

*--2.Write to Form

CALL FUNCTION 'WRITE_FORM'

EXPORTING

element = space

function = 'DELETE'

window = 'MAIN'.

*--2.Write to Form

CALL FUNCTION 'WRITE_FORM'

EXPORTING

element = space

function = 'SET'

window = 'MAIN'.

ENDIF.

ENDIF.

Thanks in advance.

Regards,

Garima