cancel
Showing results for 
Search instead for 
Did you mean: 

Doubt in Script

Former Member
0 Kudos

Hi Gurus,

I want Ur help to resolve these problems.

1. I want to print 'Duplicate copy' While taking print of a form morethan once.

but it should be handled directly by coding.

2. i want to take 2 copies of print at a time automatically. we should not manually

change printer settings.

Its urgent.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Bhuvana,

Inthe open_form there is one exporting parametr called OPTIONS in that pass the number of copied to be printed .

OPTIONS-TDCOPIES = '1' or '2' or '3' etcc

Please reward points if useful

Regards,

Nageswar

Edited by: nageswar vattikuti on Jan 23, 2008 9:52 AM

Former Member
0 Kudos

Hi Gurus,

sorry not able to reply immediately.

I cant able to solve this problem based on ur tips.

juat i do the following :

CALL FUNCTION 'OPEN_FORM'

EXPORTING

DEVICE = 'PRINTER'

DIALOG = 'X'

FORM = 'ZSAP'

LANGUAGE = SY-LANGU

OPTIONS = '2'.

but i get dump error.

plz give me the solution in detail.

Regards,

Bhuvana.

Edited by: bhuvaneswari janarthanan on Jan 28, 2008 8:05 AM

Former Member
0 Kudos

Hi ,

In the optins dont give value 2 directly . there are lots of parametres include in that.

thats why you are getting dump.

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.

Hopes it will resolve your issue.

Regards,

Nageswar

Former Member
0 Kudos

Hi Guru,

thank u very much.

i tried in this way, error will be corrected.

options-TDCOPIES = 2.

append options.

CALL FUNCTION 'OPEN_FORM'

EXPORTING

DEVICE = 'PRINTER'

DIALOG = 'X'

FORM = 'ZSAP'

LANGUAGE = SY-LANGU

OPTIONS = options.

what abt my 1st question? did u know that.

the question is

i have to print 'duplicate copy' in the print copy, if i take print a paticular page more that once.

i did this using program, but i want to know is there anyway to print this automatically in the print out.

Former Member
0 Kudos

what do you mean by duplicate copy.

Should appearance change?

Regards,

Nageswar

Former Member
0 Kudos

no, just i want to print text 'DUPLICATE COPY ' IN THE PAGE. thats it.

Former Member
0 Kudos

For this you need to set the flag or count variable in your program and based on this flag/counter you can print the text in your script.

To explain you deeply I need your development because I dont have such requirment and cant change the code for you in my developments.

But definately you have solution.

Regards,

Nageswar

Former Member
0 Kudos

Hi Guru,

what u told is correct, i did the same thing.

But i want to control this using script functions not using report program.

Is there anyway to do this, if means plz inform to me.

Regards.

Bhuvana.

Former Member
0 Kudos

Hi,

use &SAPSCRIPT-JOBPAGES& in your script .

&SAPSCRIPT-JOBPAGES& > 1 .

I dont remember exactly what it holds . But I think It holds the number of copies to print.

Regards,

Nageswar

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Whats your update? Resolved

Regards,

Nageswar

Former Member
0 Kudos

hi

u can maintain it in OUT-PUT type u assign for printing , there u can give No. of COPY required.

reward if helpful.