cancel
Showing results for 
Search instead for 
Did you mean: 

Hide Number of copies in Print Dialog box

ashwani_karn
Explorer
0 Kudos

Hi All,

I have a requirement in smartform wherein i have to disable the area where we enter number of copies in the Print dialog box, which comes when we execute the program.

In the print dialog box we usually enter the output device and can choose various options in Spool Control, Number of Copies, etc.

So here my requirement is that even if user enters more than 1 in Number of copies, in the output it should take only as 1.

Kindly let me know how to do this..

Thanks,

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member193724
Active Participant
0 Kudos

Hi Ashwani,

You need to do an implicit enhancement for this requirement.

Program : SAPLSTXBC

Include : LSTXBCFOP

Form : PBO_FRONTEND

Code  :

LOOP AT SCREEN.

  IF SCREEN-NAME = 'SSFPP-TDCOPIES'.

   SCREEN-INPUT = '0'.

   MODIFY SCREEN.

  ENDIF.

ENDLOOP.

Regards,

Lohit

Former Member
0 Kudos

This is simple : Use Structure SSFCOMPOP

  • p_out-tdnoprev = 'X'.

p_out-tdnoprint = 'X'.

p_out-tdnoarch = 'X'.

p_out-tddelete = 'X'.

p_out-tddest = p_dest.

p_out-tdnewid = ''.

p_out-tdimmed = ' '.

p_out-tdcopies = 1.

p_out-tddataset = sy-repid.

p_out-tddelete = ' '.

ashwani_karn
Explorer
0 Kudos

Hi Seshu,

Thanks for the reply.

But if i do by the way u told Number of copies will be 1 but if the user changes it to 2 in the Print dialog box, then it will change to 2 and it won't remain as 1.

I want to override user's value. Whatever user enters in number of copies, my program should take it as 1 only.

Plz let me know on this.

Thanks,

Former Member
0 Kudos

Yes ,i understand ( it is not possible )

but there is alternate solution -

maintain printer name in selection-screen and do not give print preview to user ,

if he want to print on diffrenent printer ,he can choose from selection-screen.

Reward Points if it is helpful

Thanks

Seshu

ashwani_karn
Explorer
0 Kudos

Hi,

Message was edited by:

ashwani karn

ashwani_karn
Explorer
0 Kudos

Hi,

Actually my program will be triggered by a standard transaction. So i cant give printer name in the selection screen.

Thanks

Former Member
0 Kudos

if ur print program is a z* program then u can override the value selected by the user before making a call to the generated function module. set the value of the parameter <b>outoptions-tdcopies</b> to 1