SAP BASIS Forum
What should be the general procedure for troubleshooting if problems occur when you print using SAPSprint?
Thanks in advance.
Make a trace file and a file containing the print data stream in almost all cases. This helps in conducting further analysis, especially on the part of SAP Support. In order to do this, you can call SAPSprint with specific parameters from the command line. Pay close attention to upper and lowercase when entering the commands.
In order to set the trace level, follow the below given commands:
.Command : 'sapsprint -oi LogLevel 5': This log level is suitable for most error situations..Command : 'sapsprint -oi LogLevel 9': This is the highest log level, and writes a great deal of information. It is required only in rare cases..Command : 'sapsprint -oi LogLevel 1': Logs only send print requests..Command : 'sapsprint -oi LogLevel 0': Resets the log level. No further logs are written.
This setting writes the following files:
• General SAPSprint log: sapsprint.dbg• Request-specific log (for access method S):• sapwin__.log, for example, sapwin_ABC0000012345_1.log• Request-specific log (for access method U):• sapwin_dfA.log, for example, sapwin_dfA001lambik01.log
Generating a file containing the print datastream (this is only required if a problem occurs with the output itself - for example, the font is improper):
.Command : 'sapsprint -oi KeepFile 1': This tells the system to retain a file with the print datastream..Command : 'sapsprint -oi KeepFile 0': This tells the system not to retain a file with the print datastream.
_, for example, ABC0000012345_1 (access method S)dfA, for example, dfA001lambik01 (access method U)Set the Ni trace level: .Command : 'sapsprint -oi NiTrace 1': Activate the NI trace:.Command : 'sapsprint -oi NiTrace 0': Deactivate the NI trace:
The commands explained above can save
a general trace filea further trace file for each requesta file with the print datastream in the directory that has been specified when SAPSprint was installed
To set these options, it is not required to restart the SAPSprint service. Attach the trace files and the file(s) with the print datastream to the customer message as a ZIP file.
Setting the trace files' path:
.Command : 'sapsprint -os LogPath '
The path must exist, and the SAPSprint service should be restarted.
Set the restart condition
.Command : 'sapsprint -oi AbortAfterErrors n'
n is the number of detected error post which SAPSprint is restarted automatically. n = 0 means a restart is not performed, that means, the service continues to run independent of the number of detected errors. Depending on the type of errors, this may result in the processes to crash or stop.
Checking the version
.Command : 'sapsprint -v'
Install the newest version of SAPSprint continuously. SAPSprint is available as a complete installation on the SAPGUI CD, which can be downloaded from the SAP Service Marketplace. After installing it, all required files are located in the specified directory.
Moreover, along with the full installation, the newest patch is available as a ZIP file attached to 927074 (SAPSprint). These ZIP files do not have a full installation, and can therefore be unpacked in the relevant installation directory after intalling SAPSprint.
Ensure that SAPSprint and SAPGUI use the same SAPWIN.DLL, if both of them have been installed on the same computer. SAPWIN.DLL is located in the SAPGUI and SAPSprint installation directory, as SAPWIN is used by both SAPSprint and SAPFprint, as explained above. If you have applied a SAPSprint patch and the SAPWIN.DLL version in the SAPSprint directory which is newer than the one in the SAPGUI directory, then you should download the newest SAPFprint patch from 841175 and unpack it into the SAPGUI directory.
The SAPSprint version number can be found in Windows Explorer in the SAPSprint directory. Choose the file 'sapsprint.exe', right-click the file, and select 'Properties'. The version number is displayed on the 'Version' tab under the point 'File version', for instance, File version: 1,0,0,5: Patch version 1005. The number increases usually.
The file sapsprint.dbg also displays the version, in the form, for instance "Version 6, 4, 0, 0.1, 0, 0, 5".
Size of the trace files
When printing problems occur, trace files can be created as explained above. If the 'KeepFile' option is set to '0', then the job-specific trace file is retained only in the event of an error.
The job specific trace file reports errors that are seen during the ongoing job. The general trace file sapsprint.dbg logs errors in the communication between SAP systems and SAPSprint for all print jobs. This file is retained up to a maximum size (default 1MB) that is always user-defined. Thereafter, the system generates a new trace file and the old one is saved as sapspsrint.dbg.. (as of SAPSprint Version 1013) The log files must be deleted from time to time if the need to archive them in this fashion does not exist.
You can use the command 'sapsprint oi MaxLogFileSize n' to set the size of the trace file to any size that suits you. Here, 'n' represents the size in bytes - this means that 'sapsprint -oi MaxLogFileSize 1000000' sets the value to 1MB. By using the command 'sapsprint -oi MaxLogFileSize 0', one can set the size infinitely large which means that it will not be overwritten.
Communication problems are exhibited by messages in sapsprint.dbg. For calls of NiWrite, NiRead or similar Ni modules, different messages may be written. In this case, set the SAPSprint log level to 5 and the NiTrace to 1. Simultaneously, call transaction SM50 in the SAP system and activate trace level 2 for the components 'taskhandler' and 'print' for the relevant spool work process. This ensures that both sides of the communication are logged. As the trace files can become extremely large, the files should be reset before starting the trace. The problem should be reproduced, and all the created trace files attached to the customer message as a ZIP file.
General notes about communication problems
Check the network communication. If there are general connection problems, proceed as explained in 10758. If the connection functions typically (using ping or telnet), this means that the network cannot guarantee stable data transfer. If a connection terminates during data transfer, there may be many causes that have their source in the local network. Therefore, SAP Support can only offer limited help.
In the past, instances have been seen where, locally installed firewall software would trap TCP/IP packages larger than a particular size, while letting smaller ones through. This implies that small print requests can be executed quite smoothly, while larger ones fail. The size in this case is totally dependant on the settings of the firewall software.
Another known problem is inadequate network bandwidth. This is not exclusively identifiable. One symptom that has been identified is: Sometimes, when there is a great deal of print traffic, more requests than usual are known to fail.
SAPSprint runs on TCP/IP port 515 by default which is also the default port for the Windows TCP/IP print service. Only one program may run on the port which may cause erratic results. Either stop the Windows service, or change the port for SAPSprint. Call the command.'sapsprint -oi LPDPort n'
In this case, n is the number of an unused port. This number must be set for each printer in the SAP system that is to print on SAPSprint.
Problems when processing jobs
If the KeepFile setting is '0' (see above), these problems can be recognized by the fact that job-specific log files remain. Set KeepFile to 1, LogLevel to 5, reproduce the error, and attach sapsprint.dbg, the job-specific trace file, and the generated print datastream to the customer message.
General notes about problems when processing jobs
It is important to keep in mind that SAPSprint is not an output management product. This can be explained as, if, for instance, a printer at any time unreachable for any reason, then the execution of this job will fail. The print cannot be repeated, nor is there any other type of service apart from the trace files. SAPSprint can be restricted by the quality of the basic infrastructure - that is, the operating system, network, and printer hardware. SAPSprint cannot guarantee 100% output, and never will be able to make such a guarantee. Enhancements in this area are presently unplanned.
Try to recognize the exact problem. Is this error usually seen only for particular printers, particular documents, or for given settings in the SAP system, in Windows, or in the Windows print driver? Errors whose point of initiation cannot be identified are mostly due to a local problem. In such scenarios, SAP Support can only offer limited help.
When describing an error, it is essential to be specific and precise to the maximum possible extent. This note should help till here. The more precise is the specifications and error description, the faster the error can be identified.
Sign up for STechies
Ask Question From Our Experts