Dear community, in many processes, message control plays an important role in the output of document data. Printing is often used as the output. In some companies, printing takes place on central printers.
You might want to save yourself the way to this central printer at the moment due to the coronavirus pandemic. In logistics, for example, it is important these days that employees work in teams that should not be in contact with each other.
Here are a few ideas and considerations. What do you think? Please comment.
Switch print to other technology
One consideration might be whether printing is really necessary. Message control offers many options for outputting document data. Alternatively, e-mails or IDocs can be sent so that the output is completely electronic. The printing and thus the way to the printer is eliminated.
Avoiding printing is perhaps also good for our environment. Unfortunately, I don’t have any studies or figures on this. Maybe another community member knows a good study?
The setup is a bit of work depending on the transmission media, but it pays in the long term. The advantage of IDocs in particular is that the recipient can easily process the sent document data. Especially if it’s also an SAP ERP system.
If you still have to print, the message control with its message determination offers several options for finding the right printer. Assuming you have several printers, so that a spatial separation is possible.
If the settings via Customizing are not sufficient, the Customer-Exit VN000001 (transaction SMOD) is ideal to implement complex printer selection requirements. Check function module EXIT_SAPLV61B_002 (set print parameters).
These are the parameters of the function module:
*" IMPORTING *" VALUE(PI_KAPPL) LIKE T681A-KAPPL *" VALUE(PI_KSCHL) LIKE T685-KSCHL *" VALUE(PI_HD_NAME) LIKE T681Z-KOPTB *" VALUE(PI_HD_DATA) *" VALUE(PI_POS_NAME) LIKE T681Z-POSTB OPTIONAL *" VALUE(PI_POS_DATA) OPTIONAL *" REFERENCE(PI_SPOOL) LIKE WFMC_SPOOL STRUCTURE WFMC_SPOOL *" OPTIONAL *" EXPORTING *" VALUE(PE_SPOOL) LIKE WFMC_SPOOL STRUCTURE WFMC_SPOOL
And some tips to implement your own logic:
- Check note 494033. It contains the documentation of Customer-Exit VN000001.
- Don’t write your complete logic in Include ZXWM1U02. Instead, one or more classes (including interfaces) should contain the logic for determining the suitable printer. Call them from Include ZXWM1U02.
- Your own logic should depend on the message application in parameter PI_KAPPL and the message type in PI_KSCHL.
- Check PI_HD_DATA (condition data on header level) and PI_POS_DATA (condition data on item/position level). Map both to structures of the type in PI_HD_NAME and PI_POS_NAME.
- Check this link for an example by Enno Wulff (a big thank you at this point).
- The function module EXIT_SAPLV61B_002 is called from Include LV61BF0P. If you are interested, set a breakpoint in form PRINTER_PARAMETER_LESEN to see how it’s called.
- Activate the Customer-Exit in message type settings (printer parameters, value “E” (User-Exit)).
- If you are interested if some message types are already using the exit, check database table T685B, field PRKEY = “E” (User-Exit).
- As far as I know the exit will only be triggered in message determination. Your condition to print must not include a predefined printer.
Best regards, thanks for reading and please stay healthy