cancel
Showing results for 
Search instead for 
Did you mean: 

Need Multiple copies of invoice Document

Former Member
0 Kudos

Hi all,

I need the multiple copies of billing document and in each copy need different header like for first copy i need 'ORIGINAL' and for second copy i need 'DUPLICATE'.

Please suggest me regrding this.

Points will be reward for helpfull answer...

Thanks and Regards,

Siva.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi ,

do as following.

Data: wa_options type ITCPO.

wa_optinos-TDCOPIES = '2'.

then call the function module.

CALL FUNCTION 'OPEN_FORM'

EXPORTING

DEVICE = 'PRINTER'

DIALOG = 'X'

FORM = 'ZSAP'

LANGUAGE = SY-LANGU

OPTIONS = wa_options.

I have given ypou for printing multiple copies

But I have to explore in order to print texts 'ORIGINAL' and 'COPY' .

You can do it by using some flags or counting variables.

or in the OPEN_FORM you have imporitng parameters just check it.

Regards,

Nageswar

Former Member
0 Kudos

Hi Nageswar,

Thanks for responding in short time...

Now i am getting multiple copies but please explain me in detail how we can get that description different for different copies

Regards,

Siva.

Former Member
0 Kudos

still exploring on it.

I dont have the form to do some R & D

Regards,

Nageswar

Former Member
0 Kudos

Hi ,

Try this way ,

dont pass the number of copies to open_form function module.

any way you will have parameter for number of copies right?

so make a do loop.

do p_ncopies times.

v_count = v_count + 1.

call open_form.

write_form.

enddo.

close_form.

see if this logic works

otherwise put close_form inside the enddo.

Now based on count variable you can printe corresponding text in the script.

if v_count eq 1.

ph ORIGINAL

else

PH copy

endif

Reward points if useful

Regards,

Nageswar

Former Member
0 Kudos

Hi Nageswar,

I done the logic and i am not getting how we can use symbols while we displaying it to the form.

What happend is i am getting 'ORIGINAL' on all the copies and when i click 'BACK' arrow those 'DUPLICATE' and 'TRIPLICATE' are triggered.

So waht i am thinking is i am getting the text in the respective variables but i am unable to display those in my form with conditions.

Please help me out...

Regards,

Siva.

Answers (1)

Answers (1)

Former Member
0 Kudos

Try following coding for count variable in your script it will work as we are using the same code for printing original, duplicate & triplicate on copies.

/: if &v_count& eq 1.

ORIGINAL

/:elseif &v_count& eq 2.

DUPLICATE

/:elseif &v_count& eq 3.

TRIPLICATE

/:endif

hope it helps. in case of problem revert back.

anya

Former Member
0 Kudos

Hi all,

I did the same but still i am not getting the descriptions in the header differently for different copies.

If u have any sample code will be a greathelpfull for me....

Regards,

Siva.