Implementing NiceWatch Enterprise Business Connector...

13
Implementing NiceWatch Enterprise Business Connector in a SAP environment Technical implementation guide Version 20090519-01 © 2009 Euro Plus & Niceware International. All rights reserved. http://www.nicelabel.com www.nicelabel.com [email protected]

Transcript of Implementing NiceWatch Enterprise Business Connector...

Implementing NiceWatch Enterprise Business Connector

in a SAP environment

Technical implementation guide

Version 20090519-01

© 2009 Euro Plus & Niceware International. All rights reserved. http://www.nicelabel.com

www.nicelabel.com [email protected]

Table of Contents Table of Contents ................................................................................................................... 2

Introduction ............................................................................................................................. 3

The 3-step guide to SAP label printing ................................................................................ 4

The printing scenario ................................................................................................... 4

Setup scenario ..................................................................................................... 4

Considerations ..................................................................................................... 4

SAP configuration ........................................................................................................ 5

Define the data source (XML or csv) structure that will hold the data ................. 5

Setup a RFC destination (transaction SM59), connection type G ...................... 5

NiceWatch Enterprise configuration ............................................................................ 7

Establish communication with SAP ..................................................................... 7

Design a label template with variable fields from the data source structure ....... 8

Import or manually define the data source structure ........................................... 8

Returning printing process data to SAP .............................................................. 9

Conclusion ............................................................................................................................ 11

Appendix ............................................................................................................................... 12

Introduction This white paper is a basic guide on implementing a rugged and structured label printing solution in SAP ERP with the help of the NiceLabel Enterprise for SAP device controller. As we all know, SAP ERP is a mind-bogglingly powerful platform, Titan among enterprise software solutions, meaning that any claim to a »basic guide« is somewhat of a compromise. In order to contextualise this claim, it should be pointed out that this guide should prove relevant and beneficial to a broad majority of SAP ERP systems, while a select few will still require some custom work to adapt the solution to the current infrastructure. As NiceLabel Enterprise products are not an off-the-shelf item, and are deployed by the best-trained, certified, and dedicated NiceLabel partners, this guide should be a sufficient first-contact resource for both SAP users and implementers. This white paper is a technical look at the process of SAP label printing integration, see the Printing labels from SAP ERP white paper for additional business-focused information on the topic.

The 3-step guide to SAP label printing

The printing scenario The printing scenario is the practical aspect of the SAP label printing integration project. Once a need for label printing has been identified, and a SAP Certified device controller has been selected, the questions of What and Why have been answered. This leaves us with the How. A most basic workflow could be defined as:

1. Data that needs to be printed 2. Collected in a structured file (XML) 3. The file is sent using RFC to the device controller 4. Device controller puts the data in a label template and sends it to the

printer In order to facilitate this process, a basic plan should be assembled to define the above process in terms of actions needed both on the SAP side, as well as on the device controller side (steps 2 and 3).

Setup scenario

SAP side NiceLabel side

NiceWatch Server NiceLabel Pro

Connectivity Setup RFC destination

Setup RFC trigger

Data Define data source (XML or csv) structure that will hold the data

Import or manually define the data source structure

Design label template with variable fields from the data source structure

Considerations

Before implementation, consider: o How many different label templates are needed o To which printers will the labels be printed o How is the printer going to be selected o Which data is going to be printed

SAP configuration

Define the data source (XML or csv) structure that will hold the data

Refer to SAP documentation

Setup a RFC destination (transaction SM59), connection type G On the Technical settings tab, make the following entries:

o In the Target host field, enter the IP of the NiceWatch Server.1 o In the Service No.field, enter the port where NiceWatch Server will be

waiting for incoming messages from SAP. You will need to setup the same port in NiceWatch configuration.

1 If the server where NiceWatch Server is installed has multiple IP addresses, refer to Appendix.

Under Logon/Security, setup the connection type. The NiceWatch device controller supports the following:

o No logon o Basic Authentication

For more information, see SAP Netweaver documentation: http://help.sap.com/saphelp_nw70/helpdata/EN/da/11df3a9b10355ae10000000a11405a/frameset.htm

NiceWatch Enterprise configuration

Establish communication with SAP

The NiceWatch Enterprise device controller supports several methods for data collection, therefore a SAP RFC trigger must be created to scan the defined port for incoming printing data from SAP ERP. This trigger (effectively the data capture activity) must then be set up to faultlessly interact with SAP ERP. Set the trigger to receive data from SAP

1. In the Edit menu, select Add trigger and then select SAP RFC (or click on the SAP RFC trigger icon in the Triggers toolbar.

2. In the Trigger Properties window, make the following configuration: a. Trigger Name: select the name of your trigger b. Port: select the port where SAP is going to send the messages.

This port needs to correspond to the Service No. field in the Technical settings of the RFC destination in SAP (see RFC destination settings).

c. Press the OK button to save the settings and start the trigger. Note: If you wish to secure the data exchange with a password, check the Basic authentication checkbox and enter the username and password. This username and password must match the one set in SAP RFC destination settings. To test the communication, go to SAP RFC destination settings and press the Test connection button. If all settings are configured correctly:

SAP will display a “Status http response 200”

NiceWatch will display the “Trigger was executed” message. SAP and NiceWatch can now exchange data.

Design a label template with variable fields from the data source structure

To make the process as straightforward as possible, we suggest the following order:

1. Create a new label and set its size (or stock) and select your printer in the label creation wizard.

2. Create all variables that will be needed on the label (in the Data menu, select Variables). To avoid confusion, variable names should be the same as the ones in the XML file.

3. Place the label objects on the label template and connect them to the corresponding variables. If you defined the variables already as suggested in the first step, you can save time by clicking the arrow next to the object in the toolbar and selecting Use existing variable.

4. Save the label template file. For more information, see the NiceLabel Pro User Guide.

Import or manually define the data source structure

NiceWatch enables you to send data in various structured types. The most commonly used formats are .csv and XML. Other types of data sources are also available, but are not recommended as they require more complex setup. This guide will focus on the vital basics, for a complete guide and instructions see the NiceWatch Enterprise User Guide. If you already have a sample data source (csv or XML file) that will be sent by SAP, you can very easily import the structure into NiceWatch. Note: you can send the data from SAP to the NiceWatch RFC destination. NiceWatch will save the data to your hard disk or network destination if you select the Save incoming data to the file checkbox on the SAP RFC trigger properties tab.

1. Save the data source file saved on the file system. 2. When you have access to the data, select the Filter tab in the RFC

Trigger properties window. 3. Check the Use filter checkbox. 4. From the Filter type dropdown, select the type of your data source.

If your data source is a .csv file

o select the Text Database analysis o Press the Get fields button and point to your sample csv file to import the

structure.

If your data source is an XML file o Select the XML database analysis o Press the Get the structure button and point to your sample XML file to

import the structure. After importing the structure, connect the structure to the variable fields in the label template. If the variable field names in the .lbl file match with the ones in your data source, NiceWatch will connect them automatically.

Returning printing process data to SAP

This procedure is primarily used for error reporting, which is achieved by 2 steps:

o Exporting error data from the trigger o Capturing this data and sending it to SAP

Exporting error data In order to detect errors, error event logging must be enabled:

o In trigger properties, select the Preferences tab and check the Enable Error Event checkbox.

o Set the name of the file where trigger data will be dumped in case of errors.

Note: The dumped data will not include the error message itself, but will provide the XML data captured by the trigger and data identifying the trigger and time. The Error Event data can be:

o appended to a file o overwritten in an existing file o saved in a new file every time (variable filename value) o cross-referenced with the trigger log for additional information

Capturing error data and sending it to SAP As the data arrives in a file format, it can easily be picked up by a NiceWatch file trigger. A new File Tigger must be created and set up to gather error event data:

o In the Edit menu, select Add Trigger, then File o Refer to the File trigger documentation to see how to set up a trigger that

gathers data from newly created files in a certain folder or updated files. o Add the action “Send XML to SAP” for the trigger o Define the XML structure to reflect the structure expected by SAP

Note: There are countless ways to receive and parse data to be sent to SAP. The File Trigger structure allows the user to parse the XML data dump and include variable data into the return data or even use VBScript to customize the process. For more information, see the File Trigger section of the NiceWatch User Guide. Because the system of sending error data to SAP is based on NiceWatch errors, it is limited to errors which occur before the data is sent to the printer. This includes errors in received data or sending errors. It is not possible to report errors which occur in the spooler or on the printer.

Detailed error diagnostics

In order to receive detailed error diagnostics in SAP, see our NiceWatch Enterprise Business Connector sending information to SAP checklist.

Conclusion The above workflow is valid and appropriate for most SAP environments. With the exception of defining the label information data structure (XML or CSV), the full installation and setup can be completed in minutes. The system provides a rugged and basic frame which is implemented quickly and efficiently into any existing SAP implementation, yet provides numerous valuable components which can be used to enhance its performance.

Appendix

Additional Resources Additional documentation is available, detailing individual NiceLabel products and industry solutions. As any detailed documentation of these processes also depends on the individual solution, the examples and workflows in specific documentation are based on NiceLabel products and the NiceLabel methodology of enterprise-level label printing performance and automation. The documents are available at http://www.nicelabel.com/Learning-center.

White Papers: White Paper: Managing the Hidden Costs of Enterprise Printing

White Paper: Understanding the Essentials of Label Printing Performance

White Paper: The Concerns and Benefits of Label Printing Integration

General NiceLabel resources NiceLabel Web site Learning Center

NiceLabel Tutorials

NiceLabel Technical FAQ

NiceLabel Technical Support site

NiceLabel forums

Technical Contacts

Head Office Euro Plus d.o.o. Ulica Lojzeta Hrovata 4c SI-4000 Kranj, Slovenia +386 4 280 50 00 Tel +386 4 233 11 48 Fax

North American Office Niceware International, LLC 10437 Innovation Drive, Suite 147 Milwaukee, WI 53226 +1 414 476 6423 Tel +1 414 476 7955 Fax

www.europlus.si [email protected]

www.nicewareintl.com [email protected] [email protected]

NiceLabel France Cobarsoft SARL 6 rue Salengro ZI hippodrome 32000 Auch France +33 (0) 562 709 201 Tel +33 (0) 562 708 004 Fax

German Office NiceLabel Germany GmbH Liebknechtstr. 29 63179 Obertshausen Germany +49 (0)6104 405 400 Tel +49 (0)6104 405 4020 Fax

[email protected] www.nicelabel.fr

[email protected] www.nicelabel.de