Table of Contents

Print Documents Automatically with Notification Listener

It is possible to automatize document printing with the help of the SBO Notification Listener.

1. List of documents

List of documents that can be printed automatically with the standard solution

Document type Object type code Default report Supported transactions PMX_NOTQ Column
pick list PMX_PLHE DefaultPickList.rpt A U D L DocEntry
sales order 17 A C U L DocEntry
purchase order 22 DefaultPurchaseOrder.rpt A C U L*
**See: section 4
DocEntry

2. Set the report

2.1. Customize the report

For reports, the Notification Listener will use the Column and Key values from the PMX_NOTQ table as the Crystal Report parameters. In order to print with the Notification Listener, change the input parameter of the report to the Column value.

PMX_NOTQ

Open the default report in Crystal Reports. Go to Field Explorer and expand the Parameter Fields. Rename the parameter to ‘DocEntry’ (Column value).

Rename

In the example we set the Notification Listener to print newly created pick lists automatically. The Column value in the PMX_NOTQ table is ‘DocEntry’ therefore in Crystal Reports we rename the standard ‘@pickListDocEntry’ to ‘DocEntry’.

Save it as a new report. Make sure that you save it to the folder that is defined for the reports on the ‘Reports’ tab of the organizational structure.

In the example we save the report as ‘DefaultPickListForSBONotification.rpt’.

2.2. Define the report in the organizational structure

In order to use the pick list in other flows properly, create a separate entry for this report on the ‘Reports’ tab of the organizational structure.

Reports tab

3. Configure the Notification Listener

Open the config file of the Notification Listener. Uncomment the following transaction line:

<action senderType="SboToPmx" objectType="PMX_PLHE" transactionType="A" logic="Produmex.Sbo.Logex.SboNotification.Actions.PrintReport, Produmex.Sbo.Logex.SboNotification.Actions">
<parameter name="ReportPath" value="DefaultPickListForSboNotification.rpt"/>
<parameter name="PrinterDevice" value="Printer02"/>
</action> 

Adjust the following values in the transaction line:

In our example we set the Notification Listener to automatically print newly generated pick lists.
Therefore the object type is “PMX_PLHE’ and the transaction type is ‘A’. The code of the printer is ‘Printer02’ and the report name is ‘DefaultPickListForSboNotification.rpt’.
Please note that when a pick list is created, its status is ‘Not Ready’. When creating a similar setting than in the example, be aware that the Notification Listener will print the pick list in the non-ready state.

When the Notification Listener is running the report is automatically printed after the transaction.

4. Automatically print report for closed purchase orders on goods receipt

There is a special transaction line in the config file of the Notification Listener to print the purchase orders after a goods receipt.
Create a new report as described above.

In the configuration file of the Notification Listener, find and uncomment the following transaction line:

<action senderType="SboToPmx" objectType="20" transactionType="*" logic="Produmex.Sbo.Logex.SboNotification.Actions.PrintReportForClosedPOOnGR, Produmex.Sbo.Logex.SboNotification.Actions">
<parameter name="ReportPath" value="DefaultGoodsReceiptLabel.rpt"/>
<parameter name="PrinterDevice" value="RPT"/>
</action>

Adjust the printer and the report path as described above.