cancel
Showing results for 
Search instead for 
Did you mean: 

SAPSCRIPT - printing layout twice

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi,

maybe the problem is a setting in your customizing.

I think LG03 has to be customizd with trx OPK8. Check there if there are possibilites of setting number of copies.

hope this helps.

Gr., Frank

Former Member
0 Kudos

I am facing the same problem i.e. getting two duplicate pages in print preview (actually should be just one). can anyone help.

Former Member
0 Kudos

did u mention form name in OPEN_FORM Function module?

if yes put break-points in write_form.

regards,

pravin

Former Member
0 Kudos

Hi ,

Check the program if u r passing any parameter to print two in the FM : open_form and also the main windows Height adjust it accordingly . Is the print preview(2 prints) showing on same single page ??

regards,

Kumar

Former Member
0 Kudos

No showing as it is in priview. means if it is in two page in preview it is printing two in two pages. and in my OPEN_FORM I am not passing any thing to print as 2.

alex_m
Active Contributor
0 Kudos

It's really strange,yours is std driver program or custom one?.. Put a break point in Write_Form and see whether executed single time or twice.

former_member555112
Active Contributor
0 Kudos

Hi,

Check whether your are calling the FMs within any loop.

Debug your driver program.

Regards,

Ankur Parab

Former Member
0 Kudos

No i am not calling in any loop