Printing from SAP on Windows - SAPSprint

  • SAP may generate one single file including multiple print jobs. The following issues may arise:

    • Such file might not be released properly via YSoft SafeQ in combination with some of the embedded terminals and it is necessary to avoid the situation by one of following steps:

      • configure SAP to include only one job in one file

      • make the modifications in the MFD settings to allow printing of jobs without authentication (where applicable), note that this workaround may lead to accounting issues

    • Some Rule Based Engine actions might not work.

Printing from SAP to SafeQ

Device types:

In SAP R/3 a generic type of device I2SWIN or ZSAPWIN4 is defined besides the types of devices for particular printers, that says something like this: „I do not know anything about on which specific printer will the output be, so I leave all the formatting completely on MS Windows driver". It is obvious that the device type is useful only for output via SAPlpd, thus the access methods F: or S:

For the device type can be in addition to character set (it is possible to create own character set) changed also page formats and control characters i.e. interpretation of commands by specific printer.

images/s/-3eliqb/8502/404359a7d2ab19c9c7c58d12013124a386b28257/_/images/icons/emoticons/lightbulb_on.svg Note: ZSAPWIN4 was supplied by SAP ČR for SAP R/3 release 3.1x, but it is fully usable also in higher versions, device type I2SWIN is a part of SAP standard from release 4.0x.

Access methods:

F: Print on the front-end computer

Probably the most widely used and most universal method of printing available form SAP R/3 release 3.1G.

In SAP an output devices LOCL, LOKA or LOCWIN is usually defined with this access method, instead of the queue a keyword __DEFAULT or %DEFAULT% is used.

When selecting output on this device, printing is sent to the user's PC who entered the request, there is SAPlpd program automatically started which take over print job and forward it to default Windows print queue, regardless of whether the printer is local (LPT, COM or USB) or if it's a network printer (Novell Netware, MS Windows, UNIX, JetDirect etc.)

In certain transactions it is possible to choose a non-default print queue, SAPlpd receive the print job not with the keyword __DEFAULT, but with the name of the specific queue. Beware, length of the name is limited to 40 characters I guess, the rest will be cut by SAPlpd and it will report unknown name queue, which can be, mainly for network printers, sometimes a problem.

This access method can not be used when printing is not initiated by user, but it is the result of a process (management reports) e.g. maintenance message, store documents, purchase orders etc. It is also not suitable for large prints in amount of hundreds or even thousands pages especially for economic reasons.

On the other hand an advantage of this method is its universality, it is available practically anytime, there is no need to configure anything, with functional printer available from Windows adjustment of most of the print outputs is not necessary.

S: Printing using SAP protocol

method of printing through a print server running Windows and permanently running SAPlpd (using MS resource kit it is according to note 42268 possible to run SAPlpd on WinNT-2000 as a service), combines the advantages of methods F: a L:, in principle it is possible to make print server from every end PC or contrary to these purposes dedicate one machine, hardware requirements are not particularly high, it is only need to allow access from SAP R/3 server on TCP port 515 or communicate via saprouter.

In SAP for definition of output device with this acces method a hotspool name has to be set (machine, where SAPlpd is runninng) and a name of print queue.

images/s/-3eliqb/8502/404359a7d2ab19c9c7c58d12013124a386b28257/_/images/icons/emoticons/lightbulb_on.svg a field for hostspool name is is named as router, previously it was necessary to give the name of either host table or DNS alias, because the field was too short for the IP address, it is now possible to specify both the name and IP address or state string THOST table (transaction SM55).

It is not absolutely necessary to use generic driver I2SWIN or ZSAPWIN4, it is possible to use SAP drive for pro particular printer type, then printing is essentially identical to the method L:, with one small but significant difference: printserver is in LAN and is much more accessible for maintenance and administration, it is not too good define print queue on SAP R/3 application server.

L: Local printing via LP / LPR

Print to a classic UNIX print queue, which must be defined in SAP R/3 application server respectively where the spool process is running, must be allowed to communicate on TCP port 515, saprouter can not be used.

U: Print using Berkeley protocol

Method is essentially identical to L method, the only difference is, that print queue (lpd demon) is running elsewhere than spool proces, direct printing on an intelligent network printer, which have their own service queue.

C: Direct call the operating system

Method available only for installation SAP R/3 on Windows NT respectively spool process can run on a separate application server based on Windows NT or Windows 2000 platform.

There are other methods of access for external output management systems, archiving programs, etc.

Printing with MS Windows driver is a graphical, in case of use dot matrix printers can be very slow, however, the output probably best fits the wysiwyg concept. It is not suitable for printing voluminous reports, among others for the size of the spool file.

Conversely printer-specific drivers should be substantially modify, in fact it is necessary for each group to create or edit page format. This method is particularly suitable for large or frequently repeated print jobs of a few kinds of reports.

Spool is one of the most patched matters, drivers and page formats can vary considerably depending on the level of support packages and output behavior may also be affected by kernel patch level or by SAPlpd versions on front-ends.

images/s/-3eliqb/8502/404359a7d2ab19c9c7c58d12013124a386b28257/_/images/icons/emoticons/lightbulb_on.svg Note: everywhere, where the Windows operating system is mentioned, any Win 32-bit OS is meant.

SAP Note Number 894444: Tool for server-based printing on Windows (SAPSprint)

Symptom

This note provides information about how to solve problems you may have when printing with SAPLPD as a print server.

Cause and Prerequisites

The previous implementation of SAPLPD as a print server is increasingly unstable since the introduction of Windows 2000. In particular for high print
output, the process may hang. For this reason, we have prepared an entirely new implementation of the print server as a Windows service in SAPSprint. It replaces SAPLPD. You can print using the access methods 'S' and 'U' from every SAP system, just as before. No changes are necessary in the SAP system itself. You must replace SAPLPD with SAPSprint on the print server, and configure it accordingly.
This is described below.

Installation

Before you install SAPSprint, delete SAPLPD manually. To do this, you normally need to completely delete the installation directory only. If you installed SAPLPD as a service using the srvany tool, you can remove the service by
calling 'Instsrv SAPLPD remove'. You can download SAPSprint as a self-extracting executable file from SAP Service Marketplace:

http://service.sap.com/~form/handler?_APP=00200682500000001943HEADER=NEVENT=TREE&TMPL=01200615320200006164&V=MAINT&TA=ACTUAL

Start the program. After you enter the installation path, the system asks for the TCP/IP port and another path for storing log files. Normally, the default setting of 515 is suitable for the port. You should only change this setting
if the Windows TCP/IP print service is also running on the computer. The SAPSprint Windows service starts as soon as the installation is over.

We recommend that you set up the following options for the service in the Windows Service Control Manager: Restart the service after the first error in the recovery actions, and set the wait time until the restart to zero.
This ensures that the service is restarted when errors are detected. This should minimize the number of incorrect print requests in the SAP system.

Furthermore, the service must run under a domain user that has the relevant authorizations for the required printers. After the installation, the service runs under "Local system account". This can access locally-defined printers
only. You can also set the user in the Windows Service Control Manager, in the options of the SAPSprint service.

If you want to delete SAPSprint, you can do so using the normal Windows uninstall tool.

Settings

You can display the call parameters available for SAPSprint by calling 'sapsprint -?' on the command line. The most important parameters are those that set options, especially log options for troubleshooting.

You can set the log level to 5 by specifying 'sapsprint -oi LogLevel 5'. Immediately after installation, no log level is set up, which means that no log file is created. By setting the log level to 1, 5, or 9, you can ensure
that more information is available in the directory that you specified during the installation. A file called sapsprint.dbg and a print job specific file with a variable name are generated. The second file is deleted after
successful printing. It is only retained if the printout is recognized as incorrect. If you set the option 'sapsprint -oi KeepFile 1', then both this file and the print file are retained. This is primarily intended for troubleshooting by SAP Support.

All options are case-sensitive. You can display the most important SAPSprint options by calling 'sapsprint -?'. All possible options are described in Note 85469. Normally, the options described there are not necessary - you should
use them only in exceptional circumstances.

Technical details

SAPSprint consists of the program 'sapsprint.exe', which contains the implementation of the Windows service and the receiver for print data from the SAP system. The SAPWIN data stream is processed in the DLL 'sapwin.dll'. This
DLL is also used by the new front-end printing, as described in Note 821519. SAPWIN processing errors therefore affect both print methods. Patches for SAPSprint and the new front-end print are available in Note 841175.

Solution

Install SAPSprint as described above. SAPSprint replaces the SAPLPD's server functions. Use the new method described in Note 821519 for front-end printing.
Do not install SAPSprint on every workstation.

SAPLPD is no longer developed.

Related Notes

947514 Printed output of Thai ABAP lists shifted after kernel patch
946209 Analyzing SAPSprint problems
927074 Patches for SAPSprint
821519 Front-end printing with control technology
213524 SAPsprint installation in an MSCS environment
85469 Options for the SAPSprint print server tool
42268 Operate SAPLPD as a service on Windows NT/2000/XP
16420 Problems with SAPLPD
12550 Problems with remotely connected printers (WAN)