»  BASIS Administration
 Picture

Troubleshooting Procedure

By: William Prada
Date Added : January 4, 2010 Views : 435
Rate Author : Current : 2.86 /5
Rate this Article : Current : 3.16 /5



General Approach

It is part of their nature that errors always occur in places that they should not occur. It is, therefore, only possible to present a general approach. Front-end printing is used to represent possible errors, for example.

You will run through the steps identified in the next figure "Troubleshooting: Approach" when troubleshooting.

Isolate the problem area: First, attempt to isolate the error. Where does it occur, when does it occur, and in what context does it occur? " It doesn't print ", would be too imprecise here. " Front-end printing on front-end xyz does not work with any SAP system ", is more exact. If you also know that front-end printing works on other front ends, you have already isolated the problem.

Problem Analysis: Check the scenario to find out whether all required settings, and so on are correct. Check the application logs, the system log, and the traces (the developer traces will usually be helpful here), to see whether they provide any clues for correcting the error.

Gain additional knowledge: To interpret the results from the first problem analysis, it is, of course, necessary that you are familiar with the processes and functions of the area in which the error is occurring. If your experience and your previous knowledge are insufficient, you can start a search in the SAP Notes and on the SAP Service Marketplace with the keywords from the system log or the trace files. You may find a problem solution here, or additional information that helps you find and correct the error. If you have not found any suitable SAP Notes or suitable search terms, search for composite notes for the topic area. In this case, for example, with the terms Front-end printing and composite note. For additional background information for the topic area, see the online documentation and course materials. If you still cannot solve the problem with this information, use the comparison between the process with errors, and an error-free process.

Compare error-free and erroneous processes: You can use this to determine where there are differences between an erroneous and an error-free process. This information helps you to further isolate the problem area and may help you to solve the problem or to perform new, more targeted problem analyses. If it is not possible to perform another problem analysis, create a message for SAP on the SAP Service Marketplace. Enter the information from your troubleshooting (such as a trace and/or system log information) when doing so.

Troubleshooting Example

Troubleshooting Front-End Printing

General Conditions

Assume here that there are problems with front-end printing, and you have isolated them as follows: Problems are occurring with front-end printing for all SAP systems at some front ends. As an example, you will now analyze the problems between an SAP system and a front end and correct the error. The error correction can then be performed on the other SAP systems or front ends in the same way.

Search for Information about the Error:

• Checking the system log does not provide any relevant information about the error

• Checking the developer trace does not provide any relevant information about the error

• In transaction SP01, you find the information that SAPLPD cannot be started

Your search in the SAP Notes Database on the SAP Service Marketplace with the keywords frontend printing and SAPLPD provides, among other things, SAP Note " 379515: Troubleshooting frontend printing ". This SAP Note provides additional useful information about the process of front-end printing and troubleshooting front-end printing. The following sections " Process of a Front-End Print " and " Activating the Trace " contain information from this SAP Note that is useful for additional error analysis.

Process of a Front-End Print

The end user is logged on to an SAP system with SAP GUI. A list is to be printed using front-end printing (access method F) on the "default" front-end printer.

If the end user has selected the output device for front-end printing and the print time Print immediately, then the first step is processing by a dialog work process. It creates a spool request. In the second step, the spool work process is given the task of outputting the spool request. If a spool work process is running on the application server (on which the user is logged on), it processes the spool request. Otherwise, a spool work process on a different application server is used. The spool work process creates an output request and transfers this to the SAP GUI of the end user in the third step. In the fourth step, the SAP GUI uses lprintg.dll to start saplpd (if this is not already running), and the data is transferred to this program. saplpd receives the data and forwards it to the operating system spooler. In the fifth step, the data is transferred from the operating system spooler to the printer. See the figure Process of Front-End Printing 1.

During the error analysis, this route is reproduced step-by-step, and checked to find out whether or which errors occur during it. To do this, it is necessary to activate the trace options at various points. The following procedure has been successfully used in practice:

Activating the Trace:

• In transaction SPAD, copy the output device that has problems with front-end printing and use this new output device for your tests during troubleshooting. The new short name helps you to locate trace output.

• Activate the debugger for the front-end printer in transaction SPAD, by choosing Edit -> Test Tool. The system displays a new tab page where you should activate a level 2 trace. Trace data is now logged in the processing dialog work process. In addition, on the tab page, you can choose to log the first 10 KB or 100 KB. You can then use transaction SP01 to display this data.

• On the initial screen of transaction SPAD, choose Settings -> Spool System. On the Frontend Prnt. tab page, set the Trace level for frontend printing to 1. This means that additional trace data is logged for SAP GUI communication in the processing spool work process.

• Check whether you have the newest version of LPRINTG.DLL on the front end. To do this, choose the menu entry About SAP Logon in SAP Logon and then Loaded DLLs.

Caution: LPRINTG.DLL is only loaded once you have logged on to the SAP system.

If necessary, install the newest version of LPRINTG.DLL and the newest version of SAPLPD in the SAPgui directory. Use SAP Note 328252 on the SAP Service Marketplace to do this. You can download the dll directly from there, from the Attachments tab page (youmay have to display additional tab pages first by choosing the double arrow). After installing the dll, log off all SAP systems on the front end and log on to the SAP system in which you want to solve the front-end printing problems.

• Activate the trace for LPRINTG.DLL by setting the environment variable DPTRACE to 3. With Microsoft Windows 2000, you set environment variables under System in the Control Panel. On the Advanced tab page, choose Environment Variables.... The system then displays a window in which you can set the environment variables under System Variables.

Caution: After setting the environment variable, you must close and then restart SAP Logon.

The trace output is written to the file lprintg.log, which is usually in the SAPworkdir directory of your front end.

If all traces are activated, you can perform a test print with the front-end printer (that you copied for the test) (the figure Process of Front-End Printing 2 shows the process of the front-end printing and the places in which trace information is written). Since errors can, of course, also be user-dependent, the test should be performed under the user with which the problems have occurred.

The first approach describes an error-free print process, which can then be used as a guide for troubleshooting.

Error-Free Front-End Printing

Perform an error-free front-end print with the additional activated trace information. Use this trace information when analyzing errors for comparison purposes and to isolate the problem.

You obtain the first information in transaction SP01, for the output request. See the figure SP01 Output Request: 1. The status provides a first clue about where problems have occurred. You can view the complete status information by choosing the Output Request Status button. You obtain more information in the Status Description Request xxx dialog box by choosing Events.

Check Developer Traces

You now check the traces in the sequence in which the data is processed. The spool request is created by a dialog work process. Therefore, you check the developer trace of the dialog work process that processed the request. To do this, you can search all of the developer traces of the SAP application server where the user is logged on, or, in a Command Prompt (in the case of UNIX: in a shell), switch to the SAP application server's work directory. You can use the command qgrep from the Windows Resource Kit to search for the trace file here. If the front-end printer has the short name TFRP, the call is: qgrep -l -e TFRP dev_*. All trace files in which TFRP (case-sensitive) appears display. The name of the developer trace where the text was found displays at the start of each line (with UNIX: use the grep command to perform the equivalent function). You can check the trace files from the operating system or from transaction SM50 . The line S Send Message (P) to Spoolserver xxx appears in the Printer Trace in the trace file of the dialog work process. See also figure Dialog Work Process Trace: 1. A spool work process of the specified spool server takes over the creation of the output request. You also find information in the dialog work process trace about the spool number and output request number, which helps you assign the trace data to the spool request (or output request).

In the spool work process trace, search for the location with the TCP_OPEN entries. Highlighted section 1 in the figure Spool Work Process Trace: 1 shows the spool number and output request number, with which you can ensure that you are viewing the correct trace information. Highlighted section 2a shows the TCP_OPEN call to the front end. The retcode = 2 in highlighted section 2b is the return value and means that SAPLPD was not started. It is now started (TCP_START). The line in highlighted section 3 specifies (retcode = 0), that SAPLPD is running and that data can be transferred. The data transfer now takes place. This is the TCP_WRITE_BINARY and TCP_READ_BINARY blocks. The line S

Post Article Comments

Name : 
EmailAddress : 
URL : 
Comments :