Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Restricting Multiple Printing in Smartforms

Former Member
0 Likes
1,501

Dear All,

We have a smartform to print barcode Labels. For a Sales Order - Line Item we need to allow printing of only one label. The duplicates can be printed with only due approval. So accordingly I have maintained a Z-Table of the Sales Order/ Line Item where we restrict or allow the printing as per the scenario and the logic is working fine.

However there still remains two bugs which I am unable to fix. In the Pop Up Window for print option there are two options. One is "Number of copies". User can still change the number and take out duplicate copies of the same line item. And the second is the check box with "Delete After Output". Though by default I have made it checked, he can uncheck this checkbox and generate a spool request and then from the spool he can take as many duplicate print outs as he wants.

Is there a way to grey out both these fields? And if greying out is not possible then is there a way that I get the spool request and delete it in the code itself. And also for the "Number of Copies", irrespective of what the user enters there only one print is allowed?

Please note that disabling the pop up box is not an option for us coz each plant has multiple thermal printers of different makes installed. The user needs this pop up for choosing the right printer.


5 REPLIES 5
Read only

VenkatRamesh_V
Active Contributor
0 Likes
1,033

Hi Ankur,

Hope it helps.

Use the  FM ' POPUP_TO_CONFIRM'  to display your customized button ( print preview, Print).

Hide the smart forms standard Dialog box.

Regards,

Venkat.

Read only

Former Member
0 Likes
1,033

Hi,

     You can suppress print Dialog Box  by passing control parameters

DATA:   ssfctrlopTYPE ssfctrlop.

ssfctrlop-no_dialog = 'X'.

CALL FUNCTION fm_name

EXPORTING
  control_parameters = ssfctrlop
TABLES
  it_final      
Read only

nabheetscn
SAP Champion
SAP Champion
0 Likes
1,033

Hi Ankur

Normally we either suppress the pop up and control these things via logic. In your case what you can do is make a small pop up screen to take input of printer name and other paramters and then in background pass it.

Nabheet

Read only

davis_raja
Active Participant
0 Likes
1,033

Dear Ankur,

As Nabheet said in the previous post, suppress the standard dialog box and create a custom popup screen to get the printer details and pass it to the program.

Read only

Private_Member_7726
Active Contributor
0 Likes
1,033

Hi,

No, greying out is not possible without a modification to SAP standard.

It's not as perfect solution as disabling input, but before messing with standard dialog or modifying the spool attributes, do consider disabling "classical" print options dialog and obtaining print options in application - using EFG_GET_PRINT_PARAMETERS, for example.

It's a SAP's standard Print Workbench (PWB) wrapper of print options dialog, which presents user with a reduced options popup (it's possible to reduce a PWB popup to only a printer and "More" button, which permits user to navigate to full "classical" print options dialog).

Then there is a BADI EFG_PRINT_PARAMS to EFG_GET_PRINT_PARAMETERS, which has a method CHANGE_IN_DIALOG_AFTER, where you could reset the copy counter and set the flag, informing user the application had done so. On the other hand, since the control would be in application anyway, you could bypass the badi and do all of it in application...

You could, of course, get the output of SF as OTF and write it to spool yourself (using FM SSFCOMP_OTF_OUTPUT) setting the necessary attributes, but since you'd still need to control options in application - what's the point..?

cheers

Janis