P. 1
Training Material on Spool Management 1

Training Material on Spool Management 1

|Views: 53|Likes:
Published by Rajesh Guttavilli

More info:

Published by: Rajesh Guttavilli on Nov 09, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

11/06/2013

pdf

text

original

Sections

  • 1.From Print File to Printout
  • 2.Managing Spool Requests Using the Output Controller
  • 2.1. Output Controller: Overview
  • 2.2.Selecting Spool and Output Requests
  • 2.3.Different Status in Spool Request
  • 2.4.Different Status of Output Request
  • 2.5.Reading Error Logs
  • 2.6.Problem Analysis: Print-Out Missing or Incorrect
  • 2.6.1.Problem Analysis 1: Output Request Printed?
  • 2.6.2.Problem Analysis 2: Minor/Severe Output Problems?
  • 2.6.2.1.Correcting Minor Output Problems
  • 2.6.2.2.Correcting Severe Output Problems
  • 2.6.3.Problem Analysis 3: Spool Request Generated?
  • 2.6.3.1.Determining Why Output Request Was Not Processed
  • 2.6.3.2.No Spool Request Generated: Analyzing a Spool Dump
  • 2.6.4.Problem Analysis 4: Status of a Spool Request?
  • 2.6.4.1.Problem Analysis 4: Status of a Spool Request?
  • 2.6.4.2.Analyzing "Missing Output" Problems
  • 3.Frontend Printing on Local Printer
  • 3.1.How Frontend Printing Works
  • 3.2.Defining Devices for Frontend Printing
  • 3.3.Prerequisites – Microsoft Windows
  • 3.4.Prerequisites – UNIX
  • 3.5.Procedure
  • 4.Authorizations
  • 5.Supported GUI Platforms
  • 6.Optimal Configuration of Frontend Printing
  • 7.Frontend Printing Using SAP GUI for Windows
  • 7.1.Prerequisites
  • 7.1.1.Authorizations
  • 7.1.2.System Prerequisites
  • 7.1.3.Device Definition
  • 7.1.4.Activities
  • 7.1.5.Restrictions for Frontend Printing
  • 8.Setting Up Frontend Printing Using Windows
  • 8.1.Terminal Server
  • 8.2.Procedure
  • 8.4.Error Analysis
  • 9.Frontend Printing Using SAP GUI for HTML
  • 9.1.Prerequisites
  • 9.2.Activities
  • 9.3. Restrictions
  • 10.Configuration Parameters for Frontend Printing
  • 10.1.ITS Parameters
  • 10.2.SAP Profile Parameters
  • 10.3.Defining Output Devices for Frontend Printing
  • 10.4.Prerequisites
  • 10.5.Procedure
  • 10.7.Example
  • 11.Implementing PC Printing in the R/3 System
  • 12.Implementing Local Printing in the R/3 System
  • 13.Implementing R/3 Remote Printing (UNIX Printers)
  • 14.Connecting Output Devices to a Windows System
  • 14.1.Which Type of Connection?
  • 14.2.Creating Local Connections to Windows NT Printers
  • 15.Procedure for configuring of a new printer on SAP server
  • 15.1.Printer Installation on SAP

~ R/3 4.

6C SR2 BASIS Training

Prepared By Mahesh Soundalgekar

PRINTER AND SPOOL MANAGEMENT
1. FROM PRINT FILE TO PRINTOUT.......................................................................................3 2. MANAGING SPOOL REQUESTS USING THE OUTPUT CONTROLLER.......................4 2.1. OUTPUT CONTROLLER: OVERVIEW..................................................................................................4 2.2. SELECTING SPOOL AND OUTPUT REQUESTS.......................................................................................5 2.3. DIFFERENT STATUS IN SPOOL REQUEST............................................................................................5 2.4. DIFFERENT STATUS OF OUTPUT REQUEST.........................................................................................6 2.5. READING ERROR LOGS...................................................................................................................7 2.6. PROBLEM ANALYSIS: PRINT-OUT MISSING OR INCORRECT..................................................................8 2.6.1. Problem Analysis 1: Output Request Printed?.................................................................9 2.6.2. Problem Analysis 2: Minor/Severe Output Problems?...................................................10 2.6.2.1. Correcting Minor Output Problems.........................................................................10 2.6.2.2. Correcting Severe Output Problems........................................................................11 2.6.3. Problem Analysis 3: Spool Request Generated?............................................................14 2.6.3.1. Determining Why Output Request Was Not Processed...........................................15 2.6.3.2. No Spool Request Generated: Analyzing a Spool Dump.........................................15 2.6.4. Problem Analysis 4: Status of a Spool Request?............................................................16 2.6.4.1. Problem Analysis 4: Status of a Spool Request?.....................................................17 2.6.4.2. Analyzing "Missing Output" Problems....................................................................22 3. FRONTEND PRINTING ON LOCAL PRINTER..................................................................29 3.1. HOW FRONTEND PRINTING WORKS................................................................................................29 3.2. DEFINING DEVICES FOR FRONTEND PRINTING..................................................................................30 3.3. PREREQUISITES – MICROSOFT WINDOWS.........................................................................................30 3.4. PREREQUISITES – UNIX..............................................................................................................30 3.5. PROCEDURE................................................................................................................................31 4. AUTHORIZATIONS.................................................................................................................32 5. SUPPORTED GUI PLATFORMS...........................................................................................32 6. OPTIMAL CONFIGURATION OF FRONTEND PRINTING.............................................32 6.1. PURPOSE.....................................................................................................................................32 6.2. PROCESS.....................................................................................................................................33 7. FRONTEND PRINTING USING SAP GUI FOR WINDOWS..............................................33 7.1. PREREQUISITES............................................................................................................................34 7.1.1. Authorizations................................................................................................................34 7.1.2. System Prerequisites......................................................................................................34 7.1.3. Device Definition...........................................................................................................34 7.1.4. Activities........................................................................................................................35 7.1.5. Restrictions for Frontend Printing.................................................................................35 8. SETTING UP FRONTEND PRINTING USING WINDOWS...............................................36

1 of 61

~ R/3 4.6C SR2 BASIS Training

Prepared By Mahesh Soundalgekar

8.1. TERMINAL SERVER.......................................................................................................................36 8.2. PROCEDURE................................................................................................................................36 8.3. RESULT......................................................................................................................................37 8.4. ERROR ANALYSIS........................................................................................................................37 9. FRONTEND PRINTING USING SAP GUI FOR HTML......................................................37 9.1. PREREQUISITES............................................................................................................................38 9.2. ACTIVITIES.................................................................................................................................38 9.3. RESTRICTIONS.............................................................................................................................40 10. CONFIGURATION PARAMETERS FOR FRONTEND PRINTING................................40 10.1. ITS PARAMETERS......................................................................................................................40 10.2. SAP PROFILE PARAMETERS........................................................................................................41 10.3. DEFINING OUTPUT DEVICES FOR FRONTEND PRINTING....................................................................41 10.4. PREREQUISITES..........................................................................................................................41 10.5. PROCEDURE..............................................................................................................................41 10.6. RESULT....................................................................................................................................42 10.7. EXAMPLE..................................................................................................................................42 11. IMPLEMENTING PC PRINTING IN THE R/3 SYSTEM..................................................43 12. IMPLEMENTING LOCAL PRINTING IN THE R/3 SYSTEM.........................................46 13. IMPLEMENTING R/3 REMOTE PRINTING (UNIX PRINTERS)...................................48 14. CONNECTING OUTPUT DEVICES TO A WINDOWS SYSTEM...................................50 14.1. WHICH TYPE OF CONNECTION?...................................................................................................50 14.2. CREATING LOCAL CONNECTIONS TO WINDOWS NT PRINTERS.........................................................51 15. PROCEDURE FOR CONFIGURING OF A NEW PRINTER ON SAP SERVER............58 15.1. PRINTER INSTALLATION ON SAP.................................................................................................58

2 of 61

~ R/3 4.6C SR2 BASIS Training

Prepared By Mahesh Soundalgekar

This SAP Printing Guide describes the functions of the SAP spool system. This cross-platform component outputs forms and documents, which are formatted and passed to a host spool system. You can control all output from the SAP System and do not need to handle any processing in the host spool system. The main tasks of the SAP spool system are the processing and administration of print requests as well as the administration of output devices and their mapping in the SAP System.

1. From Print File to Printout
In the R/3 spool system, unlike most other spool systems, the print process has two parts: 1. In the first part, a print file is created (the spool request). The spool request contains device independent print data. 2. The output request is not created until the print file has been assigned to be printed on a specific device. To do this, the system converts the deviceindependent print data in the spool request into the appropriate printer language understood by the output device (for example, POSTSCRIPT, PCL-5). The following figure illustrates how print data is sent to the output device.

3 of 61

Output Controller: Overview To manage spool requests. Managing Spool Requests Using the Output Controller 2.1. Later. These two outputs request are printed on two different devices.~ R/3 4. You can also access the output controller by selecting System -> Services -> Output controller. Situation b: An output request is created for a spool request immediately after the spool request is created. choose System −> Own spool requests. choose Tools -> CCMS -> Spool -> Output controller. If you only want to view the status of your own spool requests. Situation c: Only a spool request is created. This means you can print a spool request at a later time without having to recreate the print data. as nothing is to be printed. This output request is then printed on a device. 2.6C SR2 BASIS Training Prepared By Mahesh Soundalgekar Situation a: Spool request and output request are created simultaneously (print immediately). a user creates two additional output requests for the same spool request. 4 of 61 .

Extended or All or select specific fields to add to your selection screen. Standard. Choose from Minimum. To select fields.1999 for the output device PRINTER1. On the Spool request selection screen. a user. You can specify which selection fields you want to display.~ R/3 4. Different Status in Spool Request The following statuses indicate the processing status of a spool request: 5 of 61 . fax device. Users with administration authorizations are offered more selection fields than users who are only authorized to change their own requests. and priority  Display the data to be printed and download the data to a pure ASCII file  Display output requests and track the status of a job being printed An output request is generated:  When a spool request is submitted with the attribute Print immediately  Each time a spool request is sent from the output controller to a printer. For example : If you want to display all spool requests created between 01.1999 and 01. for printing or output on other devices)  Display detailed information about a spool request and change certain attributes such as destination printer. you can :  Output spool requests (send them to the host spooler. If you leave a field blank.. or other output device  Delete spool requests.02. an output device.01. Selecting Spool and Output Requests To select spool and output requests. number of copies. In the output controller.3. Select requests by entering any combination of criteria (for example. Note that deletion does not affect requests that have already been passed by the R/3 spool system to the host spool system. the date of the requests and so on). you can delete individual spool requests. You can switch between the selection screens Spool requests and Output requests. 2.2. a spool request number. enter the date range in the Date created field and the name of the output device in the Output device field.. the system displays all possible values. 2. choose Further selection criteria. use the selection screen of the output controller (Tools −> CCMS −>Spool −> Output controller). Then choose Execute.6C SR2 BASIS Training Prepared By Mahesh Soundalgekar Using the output controller.

In systems in which the spool system cannot get information from the host spooler. (completed) or Error. (completed) as soon as the output request has been passed to the host spooler. The spool system retains such requests until you delete them or they exceed a set retention period and are deleted by a reorganization.~ R/3 4. The output request was printed. (printing) Not yet sent to the host system for printing (no output request exists). Some requests may not yet have a final processing status. such as a network problem. the status is set to Compl. this status appears for approximately one minute. but probably contains printing errors. The output request has been successfully printed. To display the status of individual requests. choose Output requests or double-click the request status. (for spool requests sent to an archiving device) The spool request was processed by the spool system and is waiting to be archived. If the R/3 spool system cannot get status information from the host spooler. The user who created the request specified a specific time when the request is to be output. Spool request is still being generated (stored in the spool system).4. such as characters missing from a character set. More than one output request has been generated and the requests have different statuses.6C SR2 BASIS Training Prepared By Mahesh Soundalgekar − + Waiting Proc. The output request is being printed by the host system spooler. The status is then set to Compl. Compl. The output request could not be printed. Indicates a "severe" problem. (processin g) Print. (complete d) <F5> Problem Error Archive Time 2. Different Status of Output Request You can display: 6 of 61 . The output request is awaiting processing by the spool system and has not yet been sent to the host system The spool work process is formatting the output request for printing. Problem indicates a "minor" problem.

as soon as the request has been passed to the host spooler. this means that the request has been successfully printed. The spool work process automatically reprints the output request affected by the problem. A minor error occurred while printing the request.6C SR2 BASIS Training Prepared By Mahesh Soundalgekar   Output requests for an individual spool request. then the spool work process that is responsible for the request may have terminated. These displays provide more details about the status of output requests than are available in the spool request display.5. you can display all output requests for a particular output device (Choose Output requests). Using the device definition of an output device (in Spool Administration). Choose a request from the display and then choose Output requests. 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 spool system. If this status is displayed for a request for an extended period of time (more than one minute). then the status of a output request is set to Compl. (printing) Compl. The output request could not be printed.~ R/3 4. or there may be a problem establishing a connection to a remote output device. Reading Error Logs Any errors that occur during the processing of an output request are reported in an error log. The system displays one of the following statuses for requests for which this information is available: Waiting The output request is waiting for or is being processed by a spool work process or spooler. 7 of 61 . The user who created the request has set a start time for printing the request Print. (complete d) Problem Error Schedule d (+ Start time) 2. If the spool system cannot obtain status information from the host system. A severe error occurred. as reported to the R/3 spool system by the host system or by the output device. In host systems which the R/3 spool system can query. Use the error log to determine the cause of the error.

if any. This includes:  The decisions that you must make at each step in the procedure  The actions that you should take to correct a problem. The log reports messages from the R/3 spool work process or formatting process and messages returned from the host spooler. which requests have a log. That a log exists. you can specify whether print data should always be logged (for test purposes. does not necessarily mean an error occurred. When defining a printer. Identifying the problem and finding the correct analysis procedure 8 of 61 .~ R/3 4. for example). You can also display more detailed log information by choosing All info. A log also summarizes the attributes of the output request. 2. The first screen of an error log presents summary information.6.6C SR2 BASIS Training Prepared By Mahesh Soundalgekar In the output request overview. To call the log. Problem Analysis: Print-Out Missing or Incorrect The following describes the procedure that we recommend for analyzing printing problems. choose . the icon displays.

6. Problem Analysis 1: Output Request Printed? Question 1: Has the output request been printed? In addition to physically checking whether output has appeared. Print it to see if it is output normally. then the job is still being formatted and/or transmitted to the host system spooler. Choose Tools −> CCMS −> Spool −> Output controller. If the spool request has the status: -. Process. then the spool request has not yet been sent to the printer. you can use the spool output controller to check on the status of a job. Do the following: 1. Enter all available information that you have on the spool request in the selection screen. 3. 2.(no status).6C SR2 BASIS Training Prepared By Mahesh Soundalgekar 2.~ R/3 4.1. You can wait to see if processing finishes normally. Or you can go to analysis procedure Determining Why Output 9 of 61 .

line breaks and formatting are incorrect. then this confirms that the output request has not been printed.6C SR2 BASIS Training Prepared By Mahesh Soundalgekar Request Was Not Processed to check whether processing is proceeding normally. and still has not appeared at the printer. Go to the analysis procedure Correcting Minor Output Problems. you can go directly to the analysis procedure Determining Why Output Request Was Not Processed. A minor problem has occurred when the print out is legible and generally correct. However. background shading.1. For solutions to many minor output problems. See Correcting Severe Output Problems .6. Correcting Minor Output Problems Minor output problems occur when a document generally has been correctly printed and is legible. Go to the error analysis procedure shown above. 2. Select the spool request and choose on the Output information tab page.  Graphic elements are missing.~ R/3 4. If the status is Compl. 2. see SAP Notes Database in SAPNet. and the like. However. also check the request information. but it contains errors. This screen shows the status of completed output requests. If Processed but not printed is marked.2. Examples: the output is in the incorrect character set (for example. and frames. 10 of 61 . with alignment of text and graphic elements. there are problems with individual characters. A severe problem has occurred when a print request has been printed but is not readable. Problem Analysis 2: Minor/Severe Output Problems? Question 2: The output request has been printed. R/3 graphic elements include color. symbols and lines.6. problems have occurred such as the following:  Characters are missing or are represented by the # character. have been incorrectly printed.. or are present but unwanted.2. Reason: The characters are not contained in the character set of the output device. Waiting or Compl. Dingbats) and is not readable. Are these minor or severe printing problems? It is important to distinguish between minor and major problems with the appearance of output that has actually been printed.

CCMS −> Spool −> Spool administration. If a severe problem occurs.6C SR2 BASIS Training 2. The device definition for a Kyocera printer incorrectly specifies device type HPLJIIID (which is for a Hewlett-Packard LaserJet printer). Do the following: 1. If the emulations do not match.6. Or the printer may print blank pages. enter the name of the output device in the Output devices field. page breaks. Correcting Severe Output Problems Prepared By Mahesh Soundalgekar A severe output problem means your output device printed something. Line breaks. these printers are able to understand multiple printer languages. check for the following settings:  Was the correct device type specified in the output device definition? Choose Tools -> CCMS −> Spool . Choose Tools . Spool administration. try to determine why. Once you have determined which emulation is active at the printer. Emulations are switched either by an incoming print job or by way of the printer control panel. The wrong character set may have been used (for example. check whether the emulation in the defined device type is the same. Dingbats was printed instead of alphanumeric characters). 2. or the text layout may be incorrect. On the Devices / servers tab page. Check the emulation at the printer as well as in the R/3 System. 3. On the Devices / servers tab page. Example: a correctly configured Hewlett-Packard LaserJet 4M printer can be switched between PostScript and PCL-5 emulations. Uninterrupted printer command language statements may have been printed.2. Is the default emulation at the printer set incorrectly? Can the printer default be changed without causing problems for other output requests? Did output requests from other users change the emulation at the printer? 11 of 61 .  Does the emulation specified at the printer match the emulation specified in the device definition? Many printers support multiple emulations. Then choose Device types.2. You may be able to use the printer control panel to determine the emulation that is active at the printer. enter the name of the output device in the Output devices field.~ R/3 4. but the result is illegible. Or you may need to print a test sheet to see what the emulation setting is.

see Editing Device Type Formats 2. Select Tools −> CCMS −> Spool administration and then Device types. Then.  Specify a compatible device type in the R/3 device definition. You specify that your Hewlett-Packard printer starts in PCL-4 emulation mode (Hewlett-Packard LaserJet printer command language). for example).  Edit the R/3 device type format so that the printer automatically switches to the correct emulation at the start of an R/3 print request.2. However. −> Spool administration . it should be set to 0.2.1.INI file. check the WIN. you can specify the character set and font to be used with SWIN (device type) printers.INI file or.  Is the correct character set specified in the WIN. The R/3 System automatically restores the default emulation at the end of a print request. This results in the following: The R/3 System sends PostScript code to a printer that is expecting commands in the PCL-4 language. Full 12 of 61 . if included. Look in your printer manual for the command to enter. the printer definition in the R/3 System specifies the device type POSTSCPT for the printer. the WinCharSet parameter should not be included in the WIN.6.6C SR2 BASIS Training Prepared By Mahesh Soundalgekar If the printer default cannot be changed. If all SWIN output requests are printed using the wrong character set (Dingbats. You can solve the problem in any of the following ways:  Change the default emulation setting at the printer so that it starts in the correct emulation mode. remove it from the file. Editing Device Type Formats To define a device format. To do this. If the parameter WinCharSet is included. For more information. enter the required print command to switch the emulation. Generally. can you change the R/3 output device definition to match the printer default? You can specify that the R/3 System sets the printer to the correct emulation at the start of each output request.INI file (WinCharSet parameter) for the Windows printer with device type SWIN (SAPWIN)? Using the WinCharSet parameter.~ R/3 4. do the following: 1. copy the R/3 device type. in the INIT (printer initialization) action.

enter the device type whose device formats you want to alter. You can include actions from other device formats with the \I command. Confirm your entry and choose Formats. do not select the field PostScript format type. You can also print icons. You can change the attributes of the formats that are passed onto the driver. Your source for the device-specific commands that you need to enter should of course be the technical guide or programming manual supplied with your printer or fax machine. From Release 4. KYOFS170 or POST2.5A. read important SAP notes . You see a list of the actions that may be defined in a device format. KYOFS170 or POST2). In the Device types field. you can edit the following attributes: Attributes: If you are working with any type of PostScript printer. Driver for List Formats 13 of 61 . With formats for ABAP lists. The new drivers can also interpret paper tray specifications in the printer definition and adapt the selected format to an existing paper format.~ R/3 4. When you do so. Those that are already defined are marked in color. 4. However you can also choose to assign the suitable list-printing driver only for specific device type formats (for device types HPLJ4000. make sure that PostScript format type is selected for formats for ABAP lists. Do this for every PostScript device format by choosing Attributes from this screen and selecting the appropriate field. Usually. you can specify in the device type definition that the list-printing driver should use all the list formats. such as margins and font sizes. On the next screen. You can find more information in the special characters note. choose the device format you want to edit. this will be a device type you have copied. Before you edit any actions. Editing actions: You can make changes to actions by double-clicking an action. special drivers in the R/3 kernel now control the format of lists (this is no longer handled by formatting actions). The drivers can now interpret page formats and paper tray information. 3. With PostScript formats that use the printer for list printing.6C SR2 BASIS Training Prepared By Mahesh Soundalgekar 2. symbols. lines and colors in lists using these drivers. you can edit the actions and the attributes of the format for your device type. If you copy one of the device types HPLJ4000. the system opens a programming editor in which you can make your changes. From this screen.

If you do not find an ABAP dump from the spool system.6. You should then have the user print again with the Delete after printing option not set.3. 4. 3. 14 of 61 . 5. Problem Analysis 3: Spool Request Generated? Question 3: If your output request has not yet been printed. 6. Choose Attributes.~ R/3 4. Do the following: 1.6C SR2 BASIS Training Prepared By Mahesh Soundalgekar To do this. Especially useful: enter the name of the user who generated the spool request and R/3 printer name (Output device). Choose Tools . choose the driver for list printing. On the subsequent screen. To do this. Output controller. then this situation has probably occurred. This reduces printer performance considerably. choose Explicit increment. Choose Enter and save your input. 2. 4 Let the system determine the font width and height automatically or enter the values yourself. If you do not find a spool request. 2. CCMS . then you must first find out whether a spool request was generated. proceed as follows: 1. Spool . 2. each character is set individually during print formatting. then go to the analysis procedure Determining Why an Output Request Has Not Been Processed . If you specify the values yourself. Choose a list format from the list of device type formats. 3. The spool request you are looking for may also have been deleted if it was processed to completion by the spool system and the user had the Delete after printing option set. Define the attributes of the font for the list format. You can find the information you need to do this in your printer manual. On the next screen. Enter all available information that you have on the spool request in the selection screen. If you find the spool request. then go to the analysis procedure No Spool Request Generated: Analyzing a Spool Dump . choose List driver attributes.

~ R/3 4. the time and date.3.The short dump includes the name of the affected user. then the spool program logic terminates the program. and a description of the error.6C SR2 BASIS Training Prepared By Mahesh Soundalgekar 2.6.6. No Spool Request Generated: Analyzing a Spool Dump If the spool system is unable to generate a spool request when a user selects Print. 15 of 61 .3.1. choose Tools -> ABAP Workbench −> Test -> Dump analysis. All the details about the abnormal termination are recorded in an ABAP short dump. Determining Why Output Request Was Not Processed Troubleshooting when no output appears at the printer 2. To analyze the abnormal termination or to prepare information for the R/3 hotline.2.

6. then see Analyzing "MissingOutput" Problems. It then passes the resulting output request to a host spool system or print manager for output. Problem Analysis 4: Status of a Spool Request? The first step in finding out what has happened to a spool request that was not printed out is to check on the status of the spool request and any print requests associated with it. Use the statuses of the requests to decide how to analyze the error. choose Tools −> CCMS −> Spool −> Output controller. To check the status of the spool request. you should 16 of 61 . You will see one of the following statuses for the spool request:  (no status): The spool request has not yet been sent to a printer.  Time: The owner of the request set a specific time for printing the document. Enter as much information about the spool request as you have and display the request. The resulting output requests have different statuses. the spool request waits in the spool until it is explicitly sent to the printer or deleted. then the spool system formats the output data for the printer. Press the F5 key or Output requests to display the statuses of the output requests.  If no output appears at the printer. an output request should be processed and sent on by the spool system within at most a couple of seconds.6C SR2 BASIS Training Prepared By Mahesh Soundalgekar 2. Example: If you see the statuses Waiting and Problem. A spool request is sent to a printer automatically only if a user has the Print immediately option marked when he or she requests a print. When a spool request is sent to a printer. Otherwise.~ R/3 4. In this case. the output request is still waiting in the R/3 spool system and has not yet been passed on to a host spool system and output device.  Complete or Problem: The spool request has been sent to a printer and has been processed by the R/3 spool system. See Analyzing Delayed Processing of Output Requests. Generally.4. Wait: The spool request has been sent to a printer. but it has not yet been processed. Use the Print function to print out the spool request.  <F5>: The spool request has been sent to a printer more than once.

4. 2. Analyzing delayed processing 17 of 61 .1.~ R/3 4. Problem Analysis 4: Status of a Spool Request? Use the following procedure to determine why an output request has not been processed by the R/3 spool system.6C SR2 BASIS Training Prepared By Mahesh Soundalgekar go to Analyzing "Missing-Output" Problems to determine what happened to the output request. Generally.6. an output request should be processed and sent on by the spool system within at most a couple of seconds.

then there may be a problem with the communication pathways within the R/3 System. Use the Control Panel of the Computing Center Management System or transaction SM51 to check the message server (Tools −> CCMS −> Control/Monitoring −> Control panel). then:  The "Message Server" service should be listed in one of the application servers 18 of 61 . If the message server is working correctly.6C SR2 BASIS Training Prepared By Mahesh Soundalgekar Check the status of the message server: If you find a lot of spool requests with the status Waiting in the output controller.~ R/3 4. You can eliminate this possibility by checking that the message server of your R/3 System is functioning correctly.

mark the print server in question and click on Processes. select the relevant request in the output controller and choose You can find the printer name in the Output device field. 2. then check the activity in the spool work process. Use the CCMS System Monitor or in transaction SM51 to display the application servers in your R/3 System. Display the definition and note the R/3 application server name that appears in the Print server field. Choose Tools . then it is likely that the spool work process is waiting for a status query to time out. Do the following: 1. enter the name of the printer in the Output devices field to which the present output request has been sent.~ R/3 4. CCMS −> Spool −> Spool administration. If you have only a single spool server in your R/3 System. Find out which printer an output request has been sent to. Check the status of the spool work process: Status Waiting may also indicate that there is a problem with the spool work process that is assigned to a printer. 19 of 61 . look for the spool work process (Type SPO) and note the name of the active user. If the print server is running and the spool service is active. In the output controller. then you can omit this step. – User SAPSYS is active: This 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. then you have found the source of the problem. Use the CPU function to check the spool work processes’ use of the CPU. 4. If you see no change in the CPU time after repeated use of the CPU function. In transaction SM51. Check that the application server that you noted from the Print server field is running and that the server offers the service Spool. On the Devices / servers tab page.6C SR2 BASIS Training Prepared By Mahesh Soundalgekar  You should be able to display detail information about any of the servers in your R/3 System. Restart the server if necessary. Use the CCMS functions for defining R/3 servers (instances) and for setting up operation modes to ensure that the spool service is always active at this server. It is likely that you have then found the reason for the delay in output request processing. In the process display. 3. If the server is not running or if the Spool service is not active. Find out which spool work process is responsible for the printer.

Log on to the UNIX system and check with the ps command to see whether the spool work process has forked an LPQ or LPSTAT for the query. The message includes the target host and printer. The same rules are used to limit waiting. the spool work process cannot work on any other output requests. the spool work process may wait 1 minute or more for the time-out error message from the network software.6C SR2 BASIS Training Prepared By Mahesh Soundalgekar If the spool work process requests status and the target host system does not reply immediately. The spool work process also records long-running printer queries in the R/3 system log. then it records the problem in the R/3 system log. You can find the PID (process ID) of the spool work process in the SM51 Processes display. If you are unable to determine the target system and printer of a query with host system commands. You can therefore check in the system log for devices that have chronic communication problems. then check in the R/3 system log for a time-out message. Depending upon the spool query settings in your R/3 system profile. then it locks the output device for five minutes and goes on to other output requests. If the print server is a UNIX system and the Access method to the printer is type L. The ps display for the daughter process will show you the target system and printer of the query. This indicates that the spool work process is processing an output request for a user. then you should turn off status querying for this output device. You can do this in the Printer names definition of the output device. If the spool work process waits more than 15 seconds for a reply. 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 you are able to determine which host and printer are causing the time-out problem. – A "real user" (a normal user in your system) is active. then you can find out which printer is being queried. If this problem occurs frequently. then the spool work process must wait for the query to time out. then you should check the status of the target host system and of the network link to the host system. If the spool work process must wait more than 30 seconds. the spool work process attempts to establish communication again. At the end of this lock period. Any of three scenarios could account for delayed processing of other output requests: 20 of 61 .~ R/3 4. During this time.

2. You can also check for the output request that is currently running. see the explanations above under "User SAPSYS is active". 21 of 61 . You may also sometimes notice that the spool work process is working on the RSPOWP00 program. then this may indicate that the spool work process currently has too much to do and has developed a backlog. then you should set up another spool work process at another server. If you are having frequent of spool requests and/or communications time-outs. 3. then processes with the R/3 developer problems with delayed processing spool work processes waiting for you may want to run your spool work trace switched on. A slow communication partner could include. Select all jobs for today’s date and then choose Edit −> Sort −> Status.~ R/3 4. 5.6C SR2 BASIS Training Prepared By Mahesh Soundalgekar 1. You should not interrupt processing of this program. – The spool work process is idle (status Wait in the Processes display). If this situation occurs often and you have multiple R/3 application servers. These command lines are held in R/3 start-up profiles. Distribute the workload by printer between the two spool work processes. then the spool work process may have finished processing the output request while you were starting transaction SM51. You can switch on the developer trace by adding the TRACE option to the command line with which an R/3 application server is started. then this output request may have caused a temporary slowdown in printing. The spool work process is waiting for a time-out after trying to send an output request to a host system. For a description of this problem. Multiple output requests are queued up for processing in the spool work process. The spool system sorts spool requests by their status. You can also start the developer trace by setting the rdisp/TRACE option in the system profile. If there are many spool requests with the status "Waiting". This indicates that the work process is busy with internal spool processing. for example. You can check on these possibilities in the output controller. a host system connected by a slow WAN link or a printer that has a network card to which the spool process is directly connected (not by way of an external print server). The spool work process is processing a large output request and/or is sending the output to a slow communication partner. If it is very large (many pages in the Pages column of the output controller display).

with the printer definition in the R/3 System. However.6C SR2 BASIS Training Prepared By Mahesh Soundalgekar The information in the developer traces is highly technical. or Problem but no output is printed. the trace information should let you or a consultant at least identify the host system and printer that are causing problems.2. then:  The R/3 spool system finished processing the spool request and is working normally A problem with the data in the spool request.6. The following graphic provides an overview of the problem analysis procedure. 2. Analyzing "missing-output" problems 22 of 61 . You can log output data to help you analyze the problem. Analyzing "Missing Output" Problems If the status of a spool request has been set to Compl.~ R/3 4.4. or with the host system spooler or printer prevented any output from appearing.

then there are multiple output requests with varying statuses. You should see either Problem or Complete. In the spool request list. CCMS −> Spool -> Output controller. Choose Tools . do the following: 1. Press Output requests to display the status information. Enter all available information that you have on the spool request in the selection screen. 3. Analyzing "Missing Output" Problems If you see <F5>. Especially useful: enter the name of the user who generated the spool request and R/3 printer name (Output device). check the Output status column.6C SR2 BASIS Training Prepared By Mahesh Soundalgekar Question 5: Is the status of the output request Complete or Problem? To check the status.~ R/3 4. 2. 23 of 61 .

You may have to change default values in some UNIX systems in order to accommodate manufacturer-specific print commands. Find the profile used by the application server from which the unprinted output request was sent. See the profile parameter documentation. print the spool request again. the R/3 spool system uses the Windows application interface for printing. If the output request is there. For help in interpreting the variables in the parameter value. In Windows systems. This section provides summaries of profile parameters used by the spool system for access method L. 24 of 61 . then it is likely that the printing problem is somewhere in the host system. After you have found and corrected the problem. no change from the default values of these parameters is necessary. then you can do the following to analyze the problem: 1. You can configure the R/3 formatting programs with the system profile parameters shown in the list below. If you did not find the output request in the host system spooler. available online in transaction RZ11. Check the status of the print request in the host spooler for possible information. local printing. then check that the print command you are using is correct. In UNIX systems. You may find this parameter set globally for your R/3 System in the DEFAULT. Choose Tools −> CCMS −> Configuration −> Profile maintenance. Instead. 2. Check to see if the output request is in your host system spooler or print manager.~ R/3 4. you can define command sets in device definitions that use access method L. see the following Setting Parameters. You should also check the printer and the local or remote connection from the host to the printer. you can find this command in the system profile of an application server.PFL default profile. for more information. Then use Extended maintenance to check the value of the rspo/host_spool/print parameter. In other operating systems. Note that you need no longer set commands for access mode L in system profile parameters.6C SR2 BASIS Training Prepared By Mahesh Soundalgekar Output request status Complete: If the output request has the status Problem.

 rspo/host_spool/print: The command. with a statement similar to: <NP>/usr/local/bin/print &P &F &C &L &R &D</> Normally. No harm is done if the parameters are set. which a printer program should use to have a host spooler. replace the profile value of rspo/host_spool/print.6C SR2 BASIS Training Prepared By Mahesh Soundalgekar You therefore do not need to set any spool parameter that specifies a print command or response format. -To have the formatting program pass spool request attributes to the host spooler. perform an output request.~ R/3 4. /bin/rm &F</> 25 of 61 . however. The spool system itself is internally configured. -Not required for Windows systems. the profile value of rspo/host_spool/print looks like this: <NP>/usr/bin/lpr -P&P -J&F -h -#&C &F 2>&&1. you can enter the following variables in the command text: To give this information to a shell script or UNIX command.

Some sample commands include the following:  rspo/host_spool/query: The command to use to request the status of a print job from the host spooler.  It must not exceed any length limitations imposed by the host spooler. 26 of 61 .~ R/3 4. -You can enter the variables shown above in the description of the rspo/host_spool/print parameter in the command text. A sample command is shown below:  rspo/to_host/data-file: The name for the files passed by the formatting process to the host spooler.6C SR2 BASIS Training Prepared By Mahesh Soundalgekar To find out the print command of your host system. -Not required for Windows systems. consult the system documentation. The name that you select must meet the following requirements: It must contain a string of eight + characters. The formatting program replaces these characters to create a unique file name.

The buffer is also reorganized if any character set is invalidated. For information about analyzing problems in SAPlpd. If it overflows. you should be able to print output requests successfully. larger block sizes. No print file is created on Windows NT systems where you have specified Access method C for the connection between the R/3 spool work process and the NT print manager. You can use this information to identify problems with the output data itself. The R/3 spool system passes this file to the host spool system or print manager for printing. try to use the command to print the host system file generated by the R/3 spool system. If the host print command is correct. try it out directly at the host system command line. When you have corrected the command in the R/3 system profile and have restarted the system. the buffer is automatically reorganized.  rspo/rspoget2_daemon/tcp_block_size: The block size for TCP/IP communications between the formatting program and the transfer program. check your host system documentation to find out what is incorrect in the command. If you can. Once you have found the command. Creation and reorganization of the buffer result in system log messages with the reference "Buffer RSTSCCC". Should you want to check the contents of these files.6C SR2 BASIS Training Prepared By Mahesh Soundalgekar In normal operation.~ R/3 4. these files are deleted almost immediately. If you are not able to print successfully using the command. Default: 1K blocks. then you should collect additional information about the output request that could not be printed. cause communications problems.  rsts/ccc/cachesize: The size of the shared-memory area that is created for translation tables for character codes. Possible problems in the output data can include: 27 of 61 . Default: 60K. If you are using the SAPlpd transfer program on a Windows or Windows NT PC. 3. then you should also try stopping and restarting the program. In some network environments. change the print command in rspo/host_spool/print so that the files are not deleted. such as 8K. You should enlarge the buffer if automatic reorganizations occur repeatedly.

Mark the most recent "problem" output request and choose the error log function. 28 of 61 . – The host spool system or print manager. If querying of the host spool system or print manager is activated. Example: The output request is formatted for PostScript. or Windows NT PC and you are using the SAPlpd program to pass data to the Windows Print Manager. Output request status is Problem: If the output request has the status Problem. then you may see error messages from the host spooler. If you are using SAPlpd on a Windows PC.~ R/3 4. If the printer is attached to a Windows. – The SAPlpd transfer program. SAPlpd passes error messages from the Windows print manager back to the R/3 spool system for inclusion in the output request log. If you cannot isolate and resolve the printing problem on the basis of the output request log. then the data in the spool request may be corrupt or incorrect. then you can do the following to analyze the problem: 1. but the printer is set to LaserJet emulation. If you see messages about severe errors. 2. Corrupt or incorrect data can be caused by a problem in your host system or database system or by an incorrectly programmed ABAP report. you may find error messages from SAPlpd in the log. If you find error messages and can correct the problems. Windows for Workgroups. Start the Output controller and display the spool request that has an error.6C SR2 BASIS Training Prepared By Mahesh Soundalgekar – Problems in the printer command language in the output data. – Incorrect emulation activated at the printer. make sure any printer commands you have added or altered are correct. repeat the print request with logging of output data switched on. Choose the Output requests function to display the output requests generated from the spool request. If you have modified the device type formatting. you should then be able to print successfully. The log may contain errors issued from the following sources: – The spool work process.

If a user specifies this output device for his or her print requests. the data should be output on the default printer of the user.x. 29 of 61 . 3. there is no default printer. then the output data is downloaded directly to SAPLPD on a Windows PC or to the lpd/lpr on a UNIX workstation. Frontend printing is intended for a limited number of users in an R/3 System who want to print out their screen display quickly.  3. If a user requests immediate printing. frontend printing has been available since SAP R/3 3. In contrast to remote printing. For this it is only need to create one output device in the SAP system to be able to address all default Windows printers.1. SAP therefore recommend frontend printing in the following cases:  Users want to print directly on their local printers. the system addresses his or her default printer.6C SR2 BASIS Training Prepared By Mahesh Soundalgekar You can also use the ABAP debugging and trace functions to analyze how the output request was processed. Dynamic IP addresses are used for the frontend. The output is therefore sent to the printer whose name corresponds to the host printer you specify in the frontend printing device definition. without having to create specific device definitions for these devices in the SAP system.~ R/3 4. This means that a user logged on to an SAP system using the SAP GUI can use the printers that are only set up on his or her frontend PC. Apple Macintosh computers. and on UNIX workstations. Frontend printing means that the print data is sent to the computer on which the user started his SAPGUI. the output is sent to the default printer. Therefore. Under UNIX and Macintosh. How Frontend Printing Works Frontend printing works on Microsoft Windows PCs. This is especially the case for users that frequently use different workstations or log on to the SAP system on a mobile basis and want to print at their current location. Frontend Printing on Local Printer To reduce the significant administrative cost associated with printing. you do not require fixed IP addresses for frontend printing. Under Windows. Frontend (or local) printing lets SAP users print on their local printers.

4. Prerequisites – UNIX  SAP GUI frontend software version: Make sure that the SAP GUI software on your PC is version 3. To use frontend printing. 3. you should release the port for the gateway server in table SAPROUTTAB. Choose Help About to display the version  number. The next section describes the setup and printing procedures.3.  3. If the SAPlpd program is too old.  lp/lpd daemon: Make sure that lp or lpd (depending upon your UNIX system) has been started on your workstation. UNIX workstation.1G or higher. To check: Start SAPLLPD. Always make sure that you have the latest version of SAPlpd. you can get the newest version by installing the latest SAP GUI frontend software.  UNIX systems do not offer a default printer designation that can be used for frontend printing. 3. 30 of 61 .6C SR2 BASIS Training Prepared By Mahesh Soundalgekar In order for users to print to their local printers.42.~ R/3 4. UNIX printer: To use frontend printing at UNIX workstations. Just enter the name of a special frontend printer in the R/3 print options dialog.2. ensure that each frontend workstation has a printer named __DEFAULT (underscore DEFAULT). But setting up frontend printing differs depending on whether your SAP GUI frontend software is running on a Macintosh. Defining Devices for Frontend Printing The use of frontend printing is the same at all frontend workstations and PCs.1G or higher. you must therefore define a UNIX printer whose name matches the value in the Host printer field.EXE. If communication between frontend PCs and application servers in your R/3 System runs through SAProuter. SAPlpd version: Make sure the SAPlpd program on your Windows PC has a version number higher than 2. you must enter the device name of the frontend printer and %LOC in the authorization object S_SPO_DEV.  Prerequisites – Microsoft Windows SAP GUI frontend software version: Make sure the SAP GUI software on your PC is version 3. or Windows PC.

Once you save the device definition. Procedure 1.5. Fill out the remaining fields as follows: 3.~ R/3 4.6C SR2 BASIS Training Prepared By Mahesh Soundalgekar 3. it is available to your users. to copy an existing output device configuration. 2. Choose Tools −> CCMS −>Spool −> Spool administration and then Output devices on the Devices / servers tab page. Allow users to enter this device in the Output device field in the print selection screen when they want to use frontend printing. Choose Output device Create. to create a new device definition or Output device Create with reference. 31 of 61 .

6C SR2 BASIS Training Prepared By Mahesh Soundalgekar 4. To do this. Supported GUI Platforms Frontend printing is supported on the following GUI platforms:  Frontend Printing Using SAP GUI for Windows A user that is logged on to the SAP system using the SAP GUI for Windows wants to print on a printer attached to his or her Windows computer. as with the other output types. Frontend Printing Using SAP GUI for HTML A user that is logged on to the SAP system using the SAP GUI for HTML wants to send a document to his or her frontend PC. the document is converted into a PDF file and can be printed from the browser.~ R/3 4.   6. Authorizations In addition to the general print authorizations. Purpose As of SAP R/3 4. authorization %LOC  Authorization object S_RFC: Field RFC_TYPE RFC_NAME ACTVT  Value FUGR LPRF 16 Frontend printing only works as long as there is an active connection to the frontend. This means that frontend printing cannot be used in background processing. Problems with the server workload can occur due to 32 of 61 .1.  Frontend printing should not be used for production or high-volume printing. Frontend Printing Using a Windows Terminal Server (WTS) A user that is logged on to the SAP system using a Windows Terminal Server wants to print on a printer attached to his or her frontend PC. the spool work process performs the processing of frontend printing. authorization field SPODEVICE. Optimal Configuration of Frontend Printing 6. each user requires the following authorizations for frontend printing:  Authorization object S_SPO_DEV.6A. 5. Conflicts can occur in your SAP spool system between regular and frontend print requests.

So that your SAP system spool can process requests as effectively as before despite the reservations. add the profile parameter rdisp/wp_no_spo (number of spool work processes) to the instance profile of the relevant server.  Define the maximum number of spool work processes that are to be used for frontend printing. insert the profile parameter rdisp/wp_no_Fro_max into the instance profile. 6. set up at least two spool work processes on every application server. mass printing. you should increase the number of spool work processes by at least one.6C SR2 BASIS Training Prepared By Mahesh Soundalgekar frontend printing even if you have classified spool servers and output devices by the type of output to be created (such as production printing. To do this. 7. as we recommend. and the number of spool work processes reserved for frontend printing is set to two using the profile parameter rdisp/wp_no_spo_Fro_min. Process The way in which you should configure your system in order to avoid conflicts of this type is explained below:  If possible. a printer is addressed that is only defined in the operating system of the frontend PC. see SAP Note 351492 in the SAP Service Marketplace. the number of spool work processes is defined as two using the profile parameter rsdisp/wp_no_spo.  You can use the parameter rdisp/wp_no_spo_Fro_min to reserve spool work processes for frontend printing.~ R/3 4. by default. a maximum of one spool work process for each spool server is designated for frontend printing. For more information. as one spool work process is used for frontend printing. and set its value to at least two. In the instance profile of the spool server mn1234_YXZ_99. Increase the value of rsdisp/wp_no_spo to at least three. Frontend Printing Using SAP GUI for Windows With frontend printing. 33 of 61 . and increase the value for the work processes. If a very large quantity of frontend printing is performed in your system.2. that is. The spool work processes reserved with this parameter are available exclusively for frontend printing. By default. and so on). this spool work process can also process frontend print requests.

each user requires the following authorizations for frontend printing:   Authorization object S_SPO_DEV.1. Value FUGR LPRF 16 7. that is.6C SR2 BASIS Training Prepared By Mahesh Soundalgekar 7. therefore. System Prerequisites      Frontend printing in the form described here is available as of SAP R/3 3. the access method is F.1. The newest version of SAP GUI and SAPlpd is available in the Software Center of the SAP Service Marketplace (http://www.service. the user must be logged on to the SAP system at the point of the print out.1.~ R/3 4.1.com/swcenter-main) under SAP Web AS _ Binary Patches _ SAP Kernel _ <Your Kernel> _ database independent. authorization field SPODEVICE.1.2. 34 of 61 . you specify the type of connection with which the output device is to be addressed. Device Definition To be able to address the users‘ frontend printers from the SAP system.  It is irrelevant whether the printer is connected to the frontend locally or remotely. Authorizations In addition to the general print authorizations. An additional SAP GUI session is required for the data transfer to the frontend. There must be at least one printer defined in the Microsoft Windows operating system.3. This connection type is called Access Method and is identified using a single letter. only five sessions can be in use. For an output device for frontend printing. You should use the newest SAP GUI and the newest version of the transfer program SAPlpd.SAP. There must be an active connection to the frontend PC. authorization %LOC Authorization object S_RFC: Field RFC_TYPE RFC_NAME ACTVT 7.1. Prerequisites 7. the corresponding device definition must contain the following specifications:  When you define an output device in an SAP system.

35 of 61 . Activities 1. 2. we recommend that you enter the device type SWIN (or SAPWIN) or the corresponding language-dependent SAPWIN version in the device definition (see SAP Note 423003 in the SAP Service Marketplace). So that a print data format is sent that can be interpreted by any Windows driver. 7.  The image below illustrates the required architecture for frontend printing under Windows: 7. if the default printer is to be automatically used. You can.6C SR2 BASIS Training Prepared By Mahesh Soundalgekar  So that the default printer on every computer can be addressed. SAPlpd forwards the data stream to the Windows print manager.1.~ R/3 4.5. also use any other SAP device type for frontend printing. __DEFAULT corresponds to the default printer name in each case. The output is first sent to the SAPlpd transfer program on the frontend PC through the SAP GUI. 3. The document is then printed on the default printer.1. as no connection exists to the frontend. he or she can select the name of the frontend printer using the print parameters. Restrictions for Frontend Printing Due to its special features. 4. you must enter the host printer __DEFAULT (two underscores) in the device definition. SAPlpd is started automatically.4. however. the following restrictions apply for frontend printing:  Frontend printing cannot be performed during background processing. When the user prints from the SAP system.

As of SAP R/3 4. the print requests can subsequently be performed in online operation in transaction SP01 without the requirement for an additional session by choosing Restart frontend printing.6A. there is a range of features that you must consider. When there are enough sessions free on the same frontend. the print requests are processed in the spool work process.  A free session is required for frontend printing. such as local or remote printing.  In releases older than SAP R/3 4. the print requests are subsequently printed. the print formatting is performed in the dialog process. Setting Up Frontend Printing Using Windows 8. when you are using a Windows Terminal Server.  Frontend printing should not be used for production printing and mass printing.5A. They are temporarily stored in the database. frontend print requests are not lost if you use the Support Packages and Kernel Patches listed in SAP Note 114426.6C SR2 BASIS Training Prepared By Mahesh Soundalgekar  You can only print at the frontend from update processing as of Kernel release 4. the applications run on the server and the screen data is sent to the corresponding clients. 8. If it exists. 8. you must make the following settings: 1. 36 of 61 . meaning that no timeouts apply. For more information about the restrictions for frontend printing. As of SAP R/3 4. delete the entry LPRINT_DEST in table TSPOPTIONS. As of SAP R/3 4.6A. The dialog timeout therefore applies to this formatting.6A. There are no restrictions for any other print methods. For frontend printing using a Windows Terminal Server. In releases older than SAP R/3 4.1. You must therefore not be using all six sessions. all of a user’s frontend print requests are printed on at the current terminal. To do this. the user must still be logged on when the print request is sent in the update process.5A.~ R/3 4. These are described below.5A.2. even if the user is now working from a different terminal. Procedure To set up frontend printing using a WTS. Terminal Server If you are using a Windows Terminal Server (WTS). however. see SAP Note 114426 in the SAP Service Marketplace.

and calling it without the other parameters.4. Frontend Printing Using SAP GUI for HTML You want to print at your frontend using SAP GUI for HTML.exe) from the listed variable value or re-entering it. in quotation marks. Is the path to SAPlpd correct? You can also check whether the path is correct at the DOS prompt by copying the program name (<SAP_GUI_path>\SAPlpd\SAPlpd. 37 of 61 . If there are spaces in the GUI path. In the Windows Terminal Server. all users print using the default printer of the user that first triggered a printout using this terminal server. as in the following example: "c:\program files\SAPpc\SAPguiI\salpd\SAPlpd. Result If you have made the settings described above correctly. which is necessary for the correct execution of printing. the variable LP_CMD is not set or is incorrectly set. you must only use lower-case characters for the word SAPlpd. set the system variable LP_CMD to the following value (Start ->Settings _->Control Panel -> System -> Environment or for Windows 2000: Start ->Settings ->Control Panel ->System ->Advanced -> Environment Variables ): <GUI_path>\SAPlpd\SAPlpd. 9. and automatically ended again after each printout.exe -f&F -c&C -P&P In the command above. SAPlpd is restarted for every printout. place the expression.  For more information.3. If SAPlpd remains started after the printout.~ R/3 4. Error Analysis Check the following if SAPlpd remains started:  Was the variable LP_CMD correctly set? You can check whether the variable LP_CMD was set correctly by opening the DOS prompt window in the Terminal Client and entering set.6C SR2 BASIS Training Prepared By Mahesh Soundalgekar 2.exe" -f&F -c&C -P&P 8. see SAP Note 150533 in the SAP Service Marketplace. LP_CMD must appear with the correct value in the list that the system returns. 8. excluding the arguments. SAPlpd must then be started.  What happens if the variable LP_CMD was not set? If the variable LP_CMD is not set.

the print requests are temporarily stored in the global file system.SAP. Prerequisites This frontend printing method is support as of SAP R/3 4.com/swcenter-main) A PDF Viewer as a browser Plug-In (as of Adobe 4. Depending on the quantity and size of output requests. 33.6B.0) or Microsoft Internet Explorer (as of 4. you must create a device definition with the following specifications: Access method F Device type PDF1 or language-specific version As the print data is output using a PDF viewer when you print using SAP GUI for HTML. The host printer name is irrelevant in this context.~ R/3 4.service. Activities The following image illustrates a simplified version of the processes during frontend printing using SAP GUI for HTML: 38 of 61 .   9. you may have to increase the global file system storage space. the print data is to be sent to and displayed in the browser. see SAP Note 351230):  The frontend printer must be defined in the SAP system using transaction SPAD. the following authorization for access to operating system files: Object: S-DATASET Program Field: SAPLLPRF Activity Field: 06.1. you must use a PDF device type. You can then print the document at your frontend. and 34 When printing using SAP GUI for HTML.0) You also require.2. if the following prerequisites are met (For more information. 9. in addition to the general frontend printing authorizations.6C SR2 BASIS Training Prepared By Mahesh Soundalgekar With this print method.  You require the following system components: The newest SAP Internet Transaction Server (ITS) (you can find this under http://www. To do this.0) Netscape (as of 6.

~ R/3 4.6C SR2 BASIS Training

Prepared By Mahesh Soundalgekar

1. The user is logged on to an SAP system with the SAP GUI for HTML through the Internet Transaction Server (ITS) and creates a print request with a device with access method F. 2. A small print data window with the title SAP Print Data Window appears on the screen. This print window periodically requests the completed print data in the SAP system, as it is not possible to send data asynchronously to the browser with the HTTP protocol. As the window performs the queries, the user can continue to work in the browser. The user must not close the print data window. 3. The print data is stored in the global file system until it is displayed at the frontend. If the print data is found in the SAP system by the print data window within ten minutes, the data is transferred to the browser as a PDF data stream and deleted in the global file system. Otherwise, the data is deleted after ten minutes. 4. If the data has been found and transferred to the frontend, the browser starts the PDF viewer. A new PDF viewer is started for each document, from which the document can be printed. 5. Once all print data has been transferred, the print data window is automatically closed, and is only generated again during the next print.

39 of 61

~ R/3 4.6C SR2 BASIS Training

Prepared By Mahesh Soundalgekar

9.3.

Restrictions
If the print data window does not find the print data within ten minutes, the request is terminated, as unnecessary load is otherwise placed on the Internet Transaction Server.

However, if the user performs an action again, and the print data has not yet been deleted in the global file system due to a timeout, the print data window is displayed and requests the print data again.  The print data window should not be closed manually, as otherwise it cannot request the print data. See Also : SAP Notes 351230 and 323736.

10. Configuration Parameters for Frontend Printing
Using SAP GUI for HTML For frontend printing using the SAP GUI for HTML, you can set parameters both in the ITS and in the SAP system.

10.1.

ITS Parameters

You can set the following parameters in the service file global.srvc (or webgui.srvc) of the ITS:

The last three parameters determine the length of time after which and the frequency with which the Print Data Window queries the SAP system for print data.

40 of 61

~ R/3 4.6C SR2 BASIS Training

Prepared By Mahesh Soundalgekar

Internally, the time interval for the queries is always SAPprintdata_startiv, until SAPprintdata_maxiv is reached.

increased,

starting at

If the number of queries specified in the parameter SAPprintdata_max_polls has been performed, the window is closed.

10.2.

SAP Profile Parameters

You can set the following parameters in the profile of the SAP system:

10.3. Defining Output Devices for Frontend Printing
For frontend printing; that is, when printing on your local printer through SAP GUI, you must enter an output device that was specially created for this print method when printing from SAP systems. You create the output device using the device definition. You do not need to create different device definitions in the SAP system for local printers. Rather, a generic output device is created, which forwards the print data to the frontend from which the print request originates.

10.4.

Prerequisites

You require the authorization for creating output devices.

10.5. Procedure
Follow the procedure below to create a device definition for frontend printing: 1. Call transaction SPAD, and choose Output Devices. 2. If you are not in change mode, change to this mode by choosing Change. 3. You now have the following options: You can create a new device definition by choosing Output Device -> Create. You can use an existing device definition as a template.

41 of 61

6. the system may display a slightly different screen. If a user enters the output device. click the entry for the output device that you want to use as a template. they must enter the name of the output device that you have just created in the Output Device field of the print window. Result After you have saved your entries. Complete the required fields of the device definition as follows for frontend printing: 5. Depending on your release status. the device definition is available for users. the default printer of his or her operating system is addressed. The example shows the device definition for frontend printing with the output device LOCL. the input fields that must be filled out are the same in every release. Example The following screen shots are taken from SAP Web Application Server 6.~ R/3 4. 10. 4.6C SR2 BASIS Training Prepared By Mahesh Soundalgekar To do this. Save your entries. 42 of 61 .20. However.7. So that users can print using their frontend. and choose Output Device -> Create using template. 10.

~ R/3 4. 43 of 61 .6C SR2 BASIS Training Prepared By Mahesh Soundalgekar As the option No Device Selection at Frontend is not selected. Implementing PC Printing in the R/3 System Local printing is not possible with most printers connected to Windows and IBM OS/2 PC’s and Apple Macintosh computers. the user can enter the output device LOCL in the print window and choose Enter. from which the user can select one. see composite SAP Note 114426. The system will then display a list of the defined local printers. For more information about frontend printing. 11.

6C SR2 BASIS Training Prepared By Mahesh Soundalgekar Only Windows NT. Prerequisites: To implement remote printing on Windows PCs. You can use both local as well as shared devices. can support the R/3 application server with spool work process required for local printing. R/3 application servers also cannot run on IBM OS/2 PCs and Apple Macintosh computers. For Access method. select S (Print on LPDHOST via R/3 protocol) or U (Print on LPDHOST via Berkeley protocol).  In the Windows print manager. SAPlpd can run on all systems. SAP therefore provides its own remote-printing solution for printing from Windows PCs. This solution uses the R/3 SAPlpd program to transfer output requests from the R/3 spool server to the Windows print manager. define the printers and fax devices you want to use. 44 of 61 .  In each printer definition in the R/3 spool system.~ R/3 4. of available Windows systems. SAPlpd is installed with the SAP GUI frontend software. do the following:  Install and start the SAPlpd program on a Windows PC. specify the host system on which the spool server is running as the Spool server for the output device.

6C SR2 BASIS Training Prepared By Mahesh Soundalgekar  Assume you have the following configuration:  An application server named C11_HPUX_11 on a UNIX workstation with the host name HPUX.  To start SAPLPD automatically add the program icon to the Startup folder under Start −>Programs or to the Start program group in the Program Manager (depending on the Windows system you are using). Example: PC Printing To implement this printing configuration do the following:  Ensure that R/3 application server HPUX_C11_11 provides spool processing.~ R/3 4. There is no R/3 application server on PC0033. SAPLPD is installed with the SAPgui frontend software.  Start the R/3 SAPLPD transfer program on PC0033. The available output devices include the local printer SAP002P and theshared printer \\SAP003\SAP003P. You can do this by editing the application server definition in the Computing Center Management System. 45 of 61 . You want to use SAP002 as the server for outputting R/3 data.  A Windows NT PC called PC0033.

and \\PC0035\FAX1 as output devices. The spool server can then print on any local or remote printer defined in the host spool system. Otherwise. \\PC0035\LPT1 is a shared printer. specify S (Print on LPDHOST using R/3 protocol) if the output device is defined with the SWIN device type. \\PC0035\LPT1. Set Up Requirements: To implement local printing. The R/3 System prints to all these devices in the same way by passing output requests to the print manager in PC0033. define LPT1. LPT1 is a local printer. you need to specify the following: – Specify SWIN as the Device type – Specify S (Print on LPDHOST via R/3 protocol) as the Access method. \\PC0035\FAX1 is a shared fax machine.~ R/3 4. 12. the R/3 spool server passes output requests to the host spool system in the same host. Specify HPUX_C11_11 as the Spool server for each printer and fax device. In this connection type. You can set up as many spool servers (application servers that offer the spool service) in your R/3 System as you want.  In the definition of \\PC0035\FAX1. Add definitions for the printers to the R/3 spool system (Tools −>CCMS −> Spool −> Spool -> administration and Output devices). 46 of 61 . you can specify either Access method U (Print on LPDHOST via Berkeley protocol) or S. For Access method. you must do the following:  Run an R/3 spool server on a host system from which you can conveniently drive your printers.6C SR2 BASIS Training Prepared By Mahesh Soundalgekar   In the PC0033 print manager. Implementing Local Printing in the R/3 System The most reliable and often the fastest method to transfer data from the R/3 spool system to the host spool system is "local printing".

The remote printer is defined as SAP003P.6C SR2 BASIS Training Prepared By Mahesh Soundalgekar  Define connections in the spool system or print manager of the host to each of the printers that the R/3 spool server is to use. You want to use SAP002 as the server for printing R/3 output. fill in the Spool server field with the name of the host system where the spool server is running. You can do this by editing the application server definition in the Computing Center Management System. SAP002P is a local printer. C for a Microsoft Windows NT host. SAP003P is a shared remote printer.  Create definitions for the printers to the R/3 spool system (Tools −> CCMS −> Spool −> Spool administration and Output devices). In each printer definition in the R/3 spool system. there is no difference between the printers. The local printer is named SAP002P. To the R/3 System. It reaches both printers by passing output requests to the print manager in SAP002.~ R/3 4. Example: Local Printing To implement this printing configuration you would need to do the following:  Ensure that R/3 application server SAP002_C11_11 offers the spool service. For Access method. define SAP002P and \\SAP003\SAP003P as printers. specify L for a UNIX host. SAP002_ C11_11 is the spool server for both printers.  In the SAP002 print manager.  Assume that you have a Windows NT PC named SAP002. The available output devices include the local printer SAP002P and the shared network printer \\SAP003\SAP003P. 47 of 61 .

Important implementation considerations:  Supported host systems: This access method can be used with all LPD implementations (all UNIX implementations and the IBM OS/2 LPD implementation). the R/3 spool work process passes output data by way of a network link to the host spooler in a UNIX system. whether it is locally attached to the host or is accessed by means of host remoteprinting facilities. then the access method would be L (Print locally via LP/LPR with signal). Implementing R/3 Remote Printing (UNIX Printers) The spool system offers a third access method for passing output data to the host spool system. 13. You can use any printer that is accessible from the host spool system. If the UNIX partner is not active when an output request is sent to it. The UNIX partner should always be available. enter C (direct operating system call) as the host spool access method.~ R/3 4. The access method is therefore suitable only in companies that have the organization and staffing necessary to monitor their systems closely and ensure high availability. only local printing is possible with OSF/1 systems. If the host were a UNIX system. the spool server must wait for network time-outs to terminate the attempted 48 of 61 . The OSF/1 spool system requires that the data sender run as the root account.  High reliability required: This access method can lead to printing performance problems if the UNIX communication partner is not active when an output request is sent. the R/3 System does not run as the root account. "remote printing". However.6C SR2 BASIS Training Prepared By Mahesh Soundalgekar For the NT host system in this example. In this access method. However.

The problem with this configuration is that the R/3 spool server must restrict its transmission speed to that acceptable to the printer. You can set up as many spool servers (application servers that offer the spool service) in your R/3 System as you want.  Network printers: You should not use this access method to print directly to a printer that is equipped with its own Ethernet or Token Ring card. The spool server cannot process other output requests while it is waiting. You can do this by editing the application server definition in the Computing Center Management System. 49 of 61 .  A UNIX workstation with the host name PSERVER. you must:  Set up the printers on host systems meeting the high reliability requirements of this access method. then data transmission to the printer can tie up the R/3 spool server for considerable amounts of time. specify U (Print on LPDHOST via Berkeley protocol). Set Up Requirements: To implement remote printing. If the printer does not have its own hard disk and you are not accessing it by way of a printer server. You want to use HPUX as the server for printing R/3 data.6C SR2 BASIS Training Prepared By Mahesh Soundalgekar communication. There is no R/3 application server on PSERVER.~ R/3 4.  In each printer definition in the R/3 spool system.)  Run an R/3 application server with the spool service on a host system of your choice.  Assume that you have the following configuration:  An application server named C11_HPUX_11 on the UNIX workstation with the host name HPUX. For the Access method. Example: Remote Printing (UNIX) To implement this printing configuration do the following:  Ensure that R/3 application server HPUX_C11_11 provides spool processing. specify the host system in which the spool server is running as the Spool server of the printer. (See the preceding notes. The available output devices are (among others) the local printer SAPPRT01 and the remote printer SAPPRT02.

For Access method. Answer the questions below to decide which procedure to use. the Windows NT Print Manager will take care of R/3 print requests. you can create a local connection to the printer.6C SR2 BASIS Training Prepared By Mahesh Soundalgekar  In the PSERVER spool system.~ R/3 4. Connecting Output Devices to a Windows System 14. define SAPPRT01 and SAPPRT02 as printers.  Local connection: Is the printer accessible from a Windows NT Server on which an R/3 spool application server is running? In this case. specify U (Print on LPDHOST using Berkeley protocol). there is no difference between these devices. It reaches both devices by passing output requests to the spool system in PSERVER. Which Type of Connection? You can connect an output device (PC printer or fax machine) locally or remotely to the R/3 System. 14. SAPPRT02 is a shared remote printer. In each case.1. Specify HPUX_C11_11 as the Spool server for each printer/fax machine. To the R/3 System. SAPPRT01 is a local printer.  Add definitions for the printers to the R/3 spool system (Tools −> CCMS -> Spool -> Spool administration and Output devices). 50 of 61 .

select it in the list of output devices and choose Create with reference. 51 of 61 . A spool server is an R/3 server that has a spool work process and therefore offers the spool service. You can find information about this in your Windows NT documentation. you will need to do the following:  Ensure that an R/3 spool server is running on the NT PC. Define the printer in the R/3 System. Note that shared (network) printers that you access from the Windows NT PC are considered local for purposes of R/3 printing. Creating Local Connections to Windows NT Printers 1. Then choose Create to create a new device definition.6C SR2 BASIS Training Prepared By Mahesh Soundalgekar Usually.2. The graphic displays an example of a local Windows NT connection. regardless of whether the printer is directly attached to the PC or not. Make sure that the prerequisites are satisfied. then you must install the printer on your Windows NT PC.~ R/3 4. To set up a local printer for a Windows NT PC. you want to make a local connection to the printer. A local connection to a Windows printer is possible only using Windows NT. Fill out the definition screen. You must be able to print on the printer from your PC before you can print to it from the R/3 System. Can you already print on the printer from your PC? If not. 2. Choose Tools −> CCMS −> Spool −> Spool administration and then choose Output devices on the Devices / servers tab. 14. You can define any printer the NT PC accesses as a local printer. If you want to copy the definition of an output device. Procedure 1. 2. The following table helps you to fill out the individual fields correctly. Example: An R/3 spool server is running on an NT PC. This is the fastest and most reliable type of connection.

Enter the name of the R/3 spool server running on the Windows NT system. For a local connection. For printer under Windows. the R/3 spool server and the Windows NT Print Manager must be running on the 52 of 61 . you can also use the generic SWIN Device Type . Use this type to print to any device supported by windows. For a list of device types delivered.~ R/3 4.6C SR2 BASIS Training Prepared By Mahesh Soundalgekar Field Value DeviceAttribut es tab Device type Spool Server Enter the device type defined in the R/3 System for your printer model. see SAPNet Note 8928. even the device type itself is not defined in the R/3 System.

usage authorization for this device can no longer be assigned separately.6C SR2 BASIS Training Prepared By Mahesh Soundalgekar same system. Add the profile parameter rdisp/wp no spo to the instance profile of the relevant server (Tools −> CCMS -> Configuration −> Profile maintenance) and enter the desired number of spool work processes. Authorizatio n Group To assign the output device to an authorization group. You can also use the name names.~ R/3 4. enter the name here. Instead of entering an output device explicitly in a user authorization. Enter the UNC name of the printer (name and network path) as defined in the Windows Print Host Printer 53 of 61 . Host Spool Access Method Enter C. you can now specify an authorization group. enter L for LPD-style local printing. This checks authorization for the output device concerned as well as the authorization group. If you use the name of an existing output device as the group name. Or. A spool server is a R/3 application server on which one or more spool work processes are running. During the authorization check the system uses authorization object S_SPO_DEV for the output devices as well as the authorization groups. This is the recommended access method. The group names are in the same namespace as the names of the output devices. for local printing by way of the Windows NT print application interface. The authorization still applies for all devices in this group.

Can you already print on the printer from your PC? If not. 2. passes the data on to the Windows Print Manager for printing. Is the SAPlpd transfer program running on your Windows PC? To reach the spool system and printers on a remote Windows system. You must be able to print on the printer from your PC before you can use it from the R/3 System. Status information about output requests is not available from Windows NT systems if you use access method C. In a PC connection. This connection is for PCs that do not have an R/3 spool application server running on them. Example: \\P09330\P330 3.  Remote or PC connection: Is the printer to be run by the Print Manager at a normal workplace PC or at a printer server PC no R/3 application server is running on the PC)? In this case. the R/3 System passes print data to the transfer program running on the PC. This helps you enforce an optimal output configuration. Choose Edit −>Classification.~ R/3 4. This program transfers print output from the R/3 System to the Windows output controller.  The standard connection to a PC printer is a remote or "PC" connection. Optional: Classify the device. Result You can use the printer in the R/3 System as soon as you save your new device definitions. the spool system checks that the device and server classifications match. This program. install the printer on your Windows PC. Background: If you classify your servers as well. You can find details about this in your Windows documentation. the R/3 spool system must work with a process that runs externally to the R/3 System. PC Connections to a Windows Printer 54 of 61 .6C SR2 BASIS Training Prepared By Mahesh Soundalgekar Manager. SAPlpd. For information about how to set up a PC connection to a Windows printer Prerequisites 1. Choose the output type classification appropriate for this device. you can make a remote or "PC" connection to the printer. This process is the R/3 transfer (or SAPlpd) program.

Define the printer in the R/3 System. If you want to copy the definition of an output device. You can obtain the newest version from the SAPNet servers (SAPSERV4 for the USA.6C SR2 BASIS Training Prepared By Mahesh Soundalgekar This section explains how to set up the SAPlpd program on a Windows PC. See Implementing R/3 PC Printing under heading 11. Fill out the device definition screen. Procedure 1. Choose Change and then Create to create a new device definition.~ R/3 4. 55 of 61 . You can find out about the newest features of SAPlpd by choosing Help −> Display README-file in SAPlpd. 2. SAPlpd. select an output device from the list of output devices and choose Create with reference. You can also use the TCP/IP print server under Windows NT instead of SAPlpd. for example) by FTP from directory /general/frontend/SAPlpd. The graphic shows an example of a remote PC connection. Choose Tools −> CCMS -> Spool −> Spool administration and then choose Output devices on the Devices / servers tab. For an explanation of how SAPlpd works on your network. The following table will help you fill out the individual fields correctly.EXE and associated files may be updated between R/3 Releases. but only for access method U.

use the generic SWIN Device Type This lets you use any device supported by Windows. Select the name of the R/3 spool server to use for processing output for this device. For a list of the device types delivered with R/3. The group names are in the same namespace as the names of the output devices.~ R/3 4.6C SR2 BASIS Training Prepared By Mahesh Soundalgekar Field Value DeviceAttributes tab Device type Spool Server Authorizati on Group Enter the device type defined in the R/3 System for your printer model. For printing under Windows. You can also use 56 of 61 . enter the name here.. To assign the output device to an authorization group. see SAPNet Note 8928. even if the device type is not defined in R/3.

Enter the network name of the Windows PC. This is the PC on which you started program SAPlpd in step2. HostSpoolAccMeth od tab Access method Enter S for printing under Windows using the generic SWIN device type Even though access method U is also supported for PC printing. The name of the PC is specified under Host name in the SAPlpd Host printer Destination Host 57 of 61 . During the authorization check the system uses authorization object S_SPO_DEV for the output devices as well as the authorization groups.~ R/3 4. This checks authorization for the output device concerned as well as the authorization group. The authorization still applies for all devices in this group. usage authorization for this device can no longer be assigned separately. Example: \\P09330\P330 Enter __DEFAULT (underscore underscore DEFAULT) to use the default printer in the Windows Print Manager. Instead of entering an output device explicitly in a user authorization. access method S provides more possibilities (such as reporting of error messages). Enter the UNC name of the printer (name and network path) as it is defined in the Windows Print Manager. you can now specify an authorization group. If you use the name of an existing output device as the group name.6C SR2 BASIS Training Prepared By Mahesh Soundalgekar the name names.

Device type: Select printer driver which is compatible with asked printer 58 of 61 . the following is required from user. Choose the output–type classification appropriate for this device.1. This helps you ensure an optimal output configuration. 3. i. Background: If you classify your servers as well. Machine IP address: Required. Click on “create” icon for configuring new printer OR modifying the existing printer. 3. C.~ R/3 4. Machine Name: should not more than eight characters.6C SR2 BASIS Training Prepared By Mahesh Soundalgekar window. in which the printer is attached locally. Select “output device” this will take you to “spool administration: output device screen”. B. From Deviceattribute screen iii. the spool system checks that the device and server classifications match. D. Short name: Give any three character name by which the printer will be identified. 2. Printer Name on windows: Should not be more than Ten character. Optional: Classify the device. Login on the server through GUI mode and use transaction code SPAD. Choose Edit . 15. Procedure for configuring of a new printer on SAP server Note: Before configuring the new printer on SAP. Result You can use the output device in the R/3 System as soon as you have saved the device definition. 4. Actual Printer Name: Printer which is to be installed. A. The screen will show. Classification. Printer Installation on SAP 1. Output device: Put as per the location’s identity ii. 15.

3. should be same as on windows level in local machine. Host printer: Put printer name. Now click on save button for saving the information and then it will ask for the destination host. Spool Server: Select the name of the SAP server. From HostspoolAccmethod screen ix. HP Laserjet 2100 59 of 61 . vii. v. Destination host : Put the host(local) machine name for which you want to configure the printer. m/c name. xii. 6. viii. Host spool Access method: Select “S” print on LPDHOST via SAP protocol.~ R/3 4. SAP title page: Leave Blank 5. x.6C SR2 BASIS Training Prepared By Mahesh Soundalgekar iv. 7. Message : Leave blank OR put the same as above info.2. Device class: Select standard printer through pull down key vi. Location: Put information pertaining to printer like location IP address. After completing the above task. Destination Host: IP of the machine where printer connected. xi. IP address 151. printer name of the user’s machine for reference.XXX m/c name and other pertaining details S11ISD12 # Vinod malhotra. LPQ format: Select “B” option through pull down key----????? From Output attributes screen xiii. Lock printer in R/3 : Leave Blank. take login on agni server as root and put the entry on etc/hosts file as.

6C SR2 BASIS Training Prepared By Mahesh Soundalgekar 60 of 61 .~ R/3 4.

~ R/3 4.6C SR2 BASIS Training Prepared By Mahesh Soundalgekar 61 of 61 .

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->