Monitoring and Troubleshooting Printing Issues

Objectives

After completing this lesson, you will be able to:
  • Use monitoring transactions for printing
  • Perform housekeeping activities for spool
  • Analyze printing errors

Monitor Spool Requests and Output Requests

In this section you will learn about managing spool and output requests.

To maintain spool and output requests, call the Output Controller (transaction SP01 or choose SystemServicesOutput Control).

Note

If you only want to check the status of your own spool requests, choose SystemOwn Spool Requests (transaction SP02).

As the figure Selecting Spool or Output Requests shows, transaction SP01 provides many selection criteria for selecting particular spool or output requests. The Further selection criteria... function is simple to use and allows each user to define their own selection criteria.

You can select to display either spool requests or output requests (according to your selection criteria):

  • The list of spool requests is a list of the spool requests that match the selection criteria that you specified in the initial screen of transaction SP01 (Output Controller).

    Information, such as spool number, spool request type, creation date and time, creator, number of pages, and the processing status is displayed for each request. The data for a spool request is displayed in a row.

    Among others, the following functions are available to edit the displayed spool requests:

    • Print Request (not to be confused with the general print function): An output request is generated from the spool request. The print settings of the spool request are used.

    • Print with changed parameters: Change the print settings, such as the printer name, before you print the spool request.

    • Display and (to some extend also) change the request attributes (such as number of pages or output device).

    • Delete requests.

    • Display the contents of a request.

    • Display output requests for spool requests.

    • Forward the contents of a request (send using SAPOffice or export as text or PDF) – using the menu path Spool RequestForward.

  • The list of output requests is a list of output requests that were selected using certain criteria. Every time that the system prints a spool request, that is, that it sends an output request, a new entry for this output request is added to the list of output requests.

    The system displays information about the individual requests, such as creation time, output device, format, and processing status.

As an example, the list displayed in the figure Monitoring Spool and Output Requests shows all spool requests that match your selection criteria. The list is created using the SAP List Viewer (ALV). This allows you to change the appearance of the list as you desire. This means that you can show and hide columns, sort columns, or create variants.

The following indicators specify the status of a spool request (or an output request):

-

Not yet sent to the operating system (no output request exists).

+

Spool request is just being created (stored in spool system).

Waiting

The output request has not yet been processed by the spool system.

Waiting in host spooler

The output request is intended for the spool work process or formatting in the host spool system or is currently being processed there.

In Proc.

A spool work process is formatting the output request for printing.

Printing

The request has been passed to the host spooler or to an output device, and a final status has not yet been returned to the SAP spool system.

Compl.

The output request has been printed. If the query at the host spooler is not activated, the status changes to Compl. as soon as the output request is transferred to the host spooler.

<F5>

There are (at least two) output requests with various statuses. To display the status of the individual requests, choose Output requests or double-click the request status.

Problem

Indicates an error, not of a serious nature, such as incomplete character set. This request was still printed.

Error

Indicates a serious error, such as a network error.

Time

A particular time was specified for the output of the request by the request creator.

Archive

The spool request has been processed by the spool system and is waiting to be archived. The archive status applies to spool requests sent to an archiving device.

To display the output requests associated with a spool request, you double-click the status of the spool request. To select output requests from several spool requests, mark them and choose Output Requests (or F5).

For every unsuccessful output request, a log is written that you can use for error analysis.

Note

With SAP S/4HANA 2022, SAP ships an SAP Fiori app (Maintain Print Queues app) to set up print queues to manage the printing of documents and monitor the print jobs in each queue. This helps yo to identify and analyze errors and gives you a sense of direction for doing troubleshooting to solve them.

A print queue consists of a name, a description, a format (such as PDF or PCL 5c (Color)) and an output device.

For more information, see the online documentation for SAP S/4HANA 2022 (product assistance), area Enterprise TechnologyABAP PlatformAdministrating the ABAP PlatformAdministration Concepts and ToolsOutput ManagementMaintain Print Queues.

Monitor Printing

Print a list on an output device that is assigned to a logical spool server that allows load balancing and check which (physical) spool server was used.

Note

In this exercise, when an object name or value contains ##, replace ## by the number your trainer assigned to you.

Steps

  1. Output any list (for example, all profile parameters that begin with rspo*) with immediate printing on the Local## output device.

    1. If you have not yet already done, log on to your assigned SAP system using the credentials provided by your administrator. Start transaction RSPFPAR to create the proposed list.

    2. In Profile Parameters field, enter rspo*.

    3. Keep the other fields unchanged and choose Execute.

    4. On the Display Profile Parameters screen, choose Print (on the application toolbar).

    5. In the dialog box that appears, use the F4 value help to select output device Local##.

    6. In the Properties section, choose Immediately as Print Time. You may have to confirm a popup regarding the formatting.

    7. Choose Continue.

      Result

      You should get the result in the status list that the spool request has been sent to the SAP printer Local##.

  2. Use transaction SP01 (Output Controller) to check your output. Which real spool server was used?

    1. Following the previous step, in your assigned SAP system start transaction SP01 (Output Controller). Make sure that you are on tab Spool requests.

    2. On the Output Controller: Spool request selection screen screen, make sure that your user ID is entered in field Created by and that the actual date is entered in both the fields Created On and to. In addition, make sure that the entry in field Client corresponds to the client you are logged on.

    3. Choose Execute.

    4. On the Output Controller: List of Spool Requests screen, mark the line with your most recent spool request.

    5. Choose Output requests (F5) to display the output request that belongs to your recent spool request.

      Result

      The output request should have the status Compl..

      Note

      It may take some time (and you may need to refresh the screen) until the output request is displayed in status Completed.

    6. On the Output Controller: List of Output Requests screen, select the output request and display it by choosing Display contents. Then choose Back.

    7. Back in the Output Controller: List of Output Requests, mark the line for your most recent output request and select (More)Choose detail from the application toolbar.

      Result

      You can find the name of the application server (that is: the real spool server) used for the output at the bottom of the list (row Application Server Instance).

Housekeeping Activities for Spool

The system administrator is responsible for regularly deleting old spool requests and ensuring the consistency of the spool database.

As listed in the figure Maintaining the Spool Database, you delete old spool requests by scheduling the ABAP program RSPO1041 with an appropriate variant as a periodic job. For more information, see SAP Notes 130978RSPO1041 - alternative to RSPO0041 and 3042383Example settings for RSPO1041 run.

To check the consistency of the spool database, schedule the ABAP program RSPO1043 with an appropriate variant as a daily job. For more details of the program RSPO1043, see SAP Note 98065Spool consistency check with RSPO1043 as of 4.0A.

You can also start spool administration tools (in dialog) in transaction SPAD on the Admin. tab page. Note, however, that the functions for deletion and consistency checks in SPAD are limited, compared to the specified programs.

Additional Information

For more information on housekeeping for spool, see the online documentation for SAP S/4HANA (product assistance), area Enterprise TechnologyABAP PlatformAdministrating the ABAP PlatformAdministration Concepts and ToolsSolution Life Cycle ManagementSAP Printing Guide (BC-CCM-PRN)Maintaining the Spool Database.

When you have found an inconsistency in the spool database or in the database for temporary sequential objects (TemSe), SAP Note 48400Reorganization of TemSe and spool may be helpful. In addition, when the creation of new spool requests takes an extremely long amount of time, SAP Note 48284: System cannot generate any more spool requests may be helpful.

Perform Housekeeping for Spool

Business Example

As a system administrator, you want to analyze spool request and output requests and to delete spool requests that have already been already printed and that are outdated.

Note

In this exercise, when an object name or value contains ##, replace ## by the number your trainer assigned to you.

Steps

  1. In your SAP system, use transaction SP01 to display all the output requests as well as all spool requests that you have created in the previous exercises of this unit.

    1. If you have not yet already done, log on to your assigned SAP S/4HANA Server system using the credentials that your instructor has provided.

    2. Start transaction SP01 (Output controller).

    3. Switch to tab Output requests.

    4. Restrict the result list to output requests generated by your TRAIN-## user (by making sure that this user ID is entered in field Created by).

      Hint

      This (as well as the creation date and the client) is the default selection.

    5. Keep the other settings unchanged and choose Execute (F8).

      Result

      You get a list of all output requests that your user ID has created within the time frame entered on the selection screen.

    6. To get a list of all of your spool requests, choose Back. Then switch to tab Spool requests.

    7. Restrict the result list to spool requests generated by your TRAIN-## user (by making sure that this user ID is entered in field Created by.

      Hint

      This (as well as the creation date and the client) is the default selection.

    8. Keep the other settings unchanged and choose Execute (F8).

      Result

      You get a list of all spool requests that your user ID has created within the time frame entered on the selection screen. Note that there might also be spool requests of typeSmart Forms that are in status"–" meaning that they have not yet sent to the host system (that is: no output request exists).

    9. Keep this SAP GUI session open.

  2. Execute the report RSPO1041 (in dialog) to delete all of your spool requests that had successful output requests.

    Hint

    In practice, you will schedule the program RSPO1041 as a periodic background job with an appropriate variant.

    1. Following the previous step, in a separate SAP GUI session start transaction SA38.

    2. In the Program field, enter RSPO1041 and choose Execute (F8).

    3. In area Completed, select the checkbox Completed.

    4. Still in area Completed, in the older than ... days field, enter 0.

    5. In the Further conditions area, enter your course user TRAIN-## as Creator.

    6. Keep the other settings unchanged and choose Execute (F8).

    7. In the Delete Old Spool Requests log, observe which spool requests have been deleted.

    8. Switch to the other SAP GUI session from the previous task (screen Output Controller: List of Spool Requests).

    9. Choose Refresh and check which spool requests (according to your previous selection) still exist.

    10. Again, choose Back and then switch to tab Output requests. Make sure that your user ID is entered as Created by and that the entries in the Created On and to fields correspond to your "previous" selection. Then choose Execute.

      Result

      You get a list of still existing output requests (according to your entries on the selection screen) – if there are any.

Tables, Authorizations and Transactions for Spool

The following figure shows selected tables, authorization objects and selected transactions that are used in the spool environment:

Tables for Spool

TemSe is a storage for temporary sequential data; that is, objects that are not normally permanently held in the system are stored in the TemSe. Every TemSe object consists of a header entry in table TST01 and the actual object. With spool requests, you can decide whether the object is stored in the file system or in table TST03. By default, a spool request is stored in table TST03.

Spool requests also have entries in table TSP01 (Spool Requests) and possibly in table TSP02 (Output Requests).

Tables TSP03 and TSP0A finally contain information on output device and device types.

Authorization Objects

Authorization object S_SPO_DEV is used to control access to a specific printer or other output device. This authorization object contains field SPODEVICE (Spool: Long device names) in which you enter the SAP names of the output devices for which a user is to be authorized (for example A* for all output devices starting with A).

Using authorization object S_SPO_PAGE, (with fields SPODEVICE – device name for which the restriction is to apply and SPOPAGES – maximum number of pages allowed) you can restrict the maximum number of pages of a request that can be printed on a particular printer.

Note

This authorization check is only active if profile parameter rspo/auth/pagelimit is set to 1.

S_SPO_ACT is the authorization object for the output controller (transaction SP01) to define who is allowed to perform actions on spool requests that are protected with authorization character strings. Authorization for authorization object S_SPO_DEV are checked when users attempt to access the spool request of another user. The authorization is, therefore, mainly of interest for users who administer spool requests in the output controller. These users must access the spool requests of other users. This requires a S_SPO_ACT (spool: actions) authorization, in addition to the spool administration authorization (S_ADMI_FCD, system functions).

Note

The authorization is not checked if users access their own unprotected spool requests.

S_SPO_ACT consists of the fields

  • SPOACTION (specifying which operations are permitted on protected spool requests, for example DISP – display contents of a protected spool request, REPR – output protected spool request more than once, or DELE – manually delete request)

  • SPOAUTH (authorization value for with the user is authorized)

A user is permitted to perform a spool action if the value stored for this action in the user master matches the value in the authorization field in the spool request. If no value is specified in the authorization field of the spool request, all actions are permitted.

Hint

An authorization key can be entered at the time a spool request is created, for example when a user selects Print (using the Properties button, then switch to folder General PropertiesSpool request). If no value is specified, the spool system automatically uses the ID of the user creating the request as an implicit authorization value.

Finally, system administrators require one or more values for the authorization object S_ADMI_FCD (with field S_ADMI_FCD) to be able to administer the spool system in certain clients. For example, the authorization to administrate spool requests is controlled using the values SP01 (cross-user, cross-client) and SPOR (cross-user, client-specific) or the authorization for spool administration is controlled using the two groups of authorization values SPAD (cross-client) and SPAR (client-specific). In the same way, SPTD (cross-client) and SPTR (client-specific) are TemSe authorizations.

Selected Transactions

Transaction SPAD is used to create a device definition in the SAP system for every output device. and to create logical spool server.

Using transaction SP11, you have the option to display a list of TemSe objects (according to certain selection criteria).

Transaction SP12 (TemSe – Administration of Temporary Sequential Data) can be used for example to list all TemSe objects, to check the memory allocation for TemSe and to perform a consistency check of TemSe. This consistency check program RSTS0020) checks the header entries in table TST01 and the objects that are associated with the header entry (stored either on file system level or in database table TST03) – it neither checks entries in table TSP01 nor in table TSP02.

Note

To avoid timeouts when running in dialog, you can use program RSTS0020 to determine inconsistencies in the background (and delete them in dialog with report RSTS0030).

Transaction SPOOL finally provides an overview of important spool reports and transactions.

Transaction SPOOL

In the area of output management, many transactions and reports are available. As an alternative starting environment, you can use transaction SPOOL. This transaction displays a list of important transactions and reports (together with relevant SAP Notes) in the spool area. The transaction allows you to directly call the displayed transactions and reports by double-clicking them.

Procedure for Analyzing SAP Printing Problems

The following figure shows a procedure for analyzing a printer problem.

In addition to checking physically whether output has appeared, you can use the spool output controller (transaction SP01) with its selection options to check on the status of a job. With the help of this transaction you can check the status of both the spool request and the output request (if it exists) to determine how to proceed.

In case that the output request has been printed, but it contains errors, it is important to distinguish between minor problems and major problems with the appearance of output that has actually been printed.

  • A minor problem has occurred when the print out is legible and generally correct (option (1) in the figure above). Examples could be that some characters are missing or are represented by the # character (because they may not exist in the character set of the output device). For solutions of issues like this, see the SAP Notes database on SAP Support Portal (quick link /notes).

  • A major problem has occurred when an output request has been printed but is not readable (option (2) in the figure above). For example the output is in the incorrect character set, or lines breaks and formatting are severely incorrect. In this case, you need to check whether the correct device type specified was in the output device definition and / or whether the emulation specified at the printer match the emulation specified in the device definition.

In case that you neither find an output request nor a spool request (and you made sure that the spool request has not been deleted already for example due to the Delete after printing option), the spool system seemed to be unable to generate a spool request when the user has selected to print (option (3) in the figure above). In this case, the spool program logic terminates the program and records all the details about the abnormal termination in an ABAP short dump. You can use transaction ST22 to analyze the program termination or to obtain additional information before you create an SAP ticket. Maybe you can also find additional information in the application system log (transaction SLG1)

Note

For example you want to create more than 32,000 spool requests in the SAP system. In the SAP default, the number of print requests is restricted to 32000, however. If you reach this limit, no free number can be found and the short dump SPOOL_INTERNAL_ERROR appears where the message "Spool Full" or "Spool Overflow" appears in the dump itself or in the system log. You have two options for reacting to the message: Either you have your print requests deleted regularly in the background (with the help of program RSPO1041) or you extend the number assignment as described in SAP Note 48284System cannot generate any more spool requests.

When a spool request is sent to a printer, then the spool system formats the output data for the printer. This creates an output request. It then passes the resulting output request to a host spool system or print manager for output (which should be performed within a couple of seconds). In case that the spool request has been generated but is still in status Waiting (option (4) in the figure above), the spool request has been sent to a printer, but it has not yet been processed which means that the output request is still waiting in the SAP spool system and has not yet been passed on to a host spool system and output device. In this case, the root cause may be:

  • If you find a lot of spool requests with the status Waiting in the output controller, then there may be a problem with the communication pathways within the SAP system. You can eliminate this possibility by checking that the message server of your SAP system is functioning correctly.

  • Status Waiting may also indicate that there is a problem with the spool work process that is assigned to a printer. So you may also check the status of the spool work process. For this, you should first check the definition of the output device in question (transaction SPAD) to find the spool server involved. Then you can use transaction SM50 to check whether the spool work process(es) of that application server are active (and check the name of the active user).

    • An active user SAPSYS indicates that the spool work process is busy with internal spool activities or is requesting the status of a print request from a host spool system. For example, if the spool work process requests status and the target host system does not reply immediately, then the spool work process must wait for the query to time out. During this time, the spool work process cannot work on any other output requests. The time-out wait suggests that either the host system is not active or the network link to the host system is not working. If this problem occurs frequently, then you may think about turning off status querying for this output device.

    • An active "real user" indicates that the spool work process is processing an output request for a user. If this takes a long time, the spool work process either is processing a large output request and/or is sending the output to a slow communication partner (for example due to a slow WAN link). Or multiple output requests are queued up for processing in the spool work process.

Note

If you are having frequent problems with delayed processing of spool requests and/or spool work processes waiting for communications time-outs, then you may want to run your spool work processes with the developer trace activated (profile parameter rdisp/TRACE – for more specific trace options, see SAP Note 2420274How to set Level 2 Tracing for Spool).

If the status of a spool request has been set to Compl. or Problem but no output is printed (options (5) to (7) in the figure above), then the SAP spool system finished processing the spool request and is working normally but problem with the data in the spool request, with the printer definition in the SAP System, or with the host system spool or printer prevented any output from appearing. With the help of transaction SP01, you can then check the status of the assigned output request:

  • If the output request is in status Problem (option (5) in the figure above), check the error log, which may contain additional information from the spool work process, from the SAPlpd transfer program (for Windows) and from the host spool system or print manager. If you cannot isolate and resolve the printing problem on the basis of the output request log, repeat the print request after switching on the logging of output data – see SAP Note 2428307How to retain temporary print data file for more details.

  • If the output request is in status Completed and the output request is still in the host spool system (option (6) in the figure above), this may indicate an issue with the host system.

  • Finally, if the output request is in status Completed and the output request is not in the host spool system any more (option (7) in the figure above), you may check whether the host print command was correct and – if "yes" – repeat the output with activated output data logging according to SAP Note 2428307How to retain temporary print data file.

    Hint

    To check whether the host print command was correct, check the value of the rspo/host_spool/print profile parameter. You may try to execute this command at the host system command line. If you are not able to print successfully using this command, check your host system documentation to find out what is incorrect in the command.

Additional Information

For more information on troubleshooting, see the online documentation for SAP S/4HANA (product assistance), area Enterprise TechnologyABAP PlatformAdministrating the ABAP PlatformAdministration Concepts and ToolsSolution Life Cycle ManagementSAP Printing Guide (BC-CCM-PRN)Analyzing SAP Printing Problems.

In addition, the composite SAP Note 504952Composite SAP Note for spool and print lists many important notes that may be helpful when analyzing print problems.

SAP Note 118057Flexible Configuration of the Spool Service provides additional background information on the SAP spool architecture.

Log in to track your progress & complete quizzes