Home » Linux » Print SAP documents using Linux

Print SAP documents using Linux

RSS Link

  • An error has occurred; the feed is probably down. Try again later.

Blog Stats

  • 681,964 hits


Categories

Advertisements

A lot of people keep asking me how to print SAP R/3 documents using printer attached on Linux PC.

SAPGUI for Java is already installed on my Linux PC but I was unable to print any SAP documents ? We can’t use Frontend Printing (F acces method) since there was no SAPLPD program on it. Tell me how ??

Well, actually SAPLPD package on SAPGUI for Windows is duplicate Linux’s LPD flow. It is using same architecture and working method. Since Linux already had it LPD (and CUPS), it doesn’t need SAPLPD anymore. You can use LPD (and CUPS) to replace SAPLPD function.

SAPGUI for Java on Linux can use U : Print Using Berkeley Protocol acces method. Fill the Host printer column with name of your printer defined on your Linux PC. Use simple name and no space. On Destination host, fill with IP address of your Linux PC where your printer attached.

After that, open your inetd.conf file and add this at the end of lines.

printer stream tcp nowait lp /usr/lib/cups/daemon/cups-lpd cups-lpd

and you need to restart your inetd daemon or reboot your PC.

If you are using xinetd.conf, please add this at the end of lines.

service printer
    {
        socket_type = stream
        protocol = tcp
        wait = no
        user = lp
        server = /usr/lib/cups/daemon/cups-lpd
    }

Restart your xinetd daemon.

Before you print your SAP R/3 documents, please make sure your LPD (and/or CUPS ) daemon is running well.

Now, you can test your SAP R/3 documents printing. It should work.

Let me know if it doesn’t work. I’ll try my best to update this tutorial.

Updated version (added on May 24th 2010):

For new version SAP server such as SAP R/3 4.7, SAP ECC 5 or SAP ERP 6, you can use new type of frontend printing type G (Frontend Printing with Control Technologie). You also have to use SAPGUI for Java at least 7.10 or higher. Use the latest SAPGUI for Java instead (At the time of this tutorial, SAPGUI for Java 7.20 rev 2).

On SPAD, you can use G type (for Host Spool Access Method) output device.

After this step is configured, you can use this new G type  output device.

Advertisements

66 Comments

  1. Roliverio says:

    I would like to know what is the best setting for a linux printer trought LPD(CUPS) for printing raw ASCII. I’ve tried with SAP’s “Line printer II” and “Raw access” configuring CUPS to use a Postcript or a Raw queue access, none of them seem to work properly.

    Does SAP respect CUPS drivers properly?.

    Thanks for any info.

  2. ardhian says:

    Hi Roliverio,

    For your information, I have test this configuration using Epson Printer LX-300+ and Panasonic KXP3696.

    On SAP R/3 Printer configuration (using SPAD), I am using EPESCP device type and U Host Spool Access Method.

    It works for me but I still have to re-check and re-compile my Z program because before I am using linux, I have created Z program using Windows environment.

    Right now, In my office I am using another different SAP documents printing technique using Windows-based SAP Print Server (sapsprint). It’s more flexible and easier.

    I’ll post it as soon as possible.

    Best Regards,
    Ardhian

  3. Bryle says:

    Dear Sir, Thank you very much for your post. I’ve configured my printer successfully and able to print a test page, word & excel documents and it works fine but when it comes to SAPGui printing I still can’t get any output. I followed the instruction given above but still I can’t print SAP Documents. Maybe its because my lpd does not configure correctly, can you guide me on how to configure this or am I missing some configuration? Thanks in advance.

    Bryle

  4. Julio says:

    Hi
    Thanks for this guide, Ive configured my printer but use the method G:Front End Printing with Control Tech because the U method show a message error “unable to reach the remote host spool system”.
    with this method i can print, but only with transactions for reprint documents, when i use transactions wich create documents and the print is automatically i cant print
    anything(the print just go into the spooler).

    Im using opensuse 11 with KDE 3.5 and platingui 710 r4.

    Thanks.

  5. ardhian says:

    dear julio,

    if you are using U method to print from SAP system, you need to configure your LPD daemon on your linux box. If not, you’ll receive “unable to reach the remote host spool system” beacuse SAP Spool Work Process cannot reach your LPD process on your linux box.

    Hope that can help.

    ardhian

  6. yanela says:

    necesito configurar la impresión local de una pc para poder imprimir desde sap linux, he leído los comentarios publicados aquí pero hay algo que no entiendo es donde se configura el modo de acceso, es decir U: por ejemplo.

  7. ardhian says:

    Hi Yanela,

    Try to write in english please coz I only understand english.

    Apologize me.

    Ardhian

  8. sergio says:

    yanela,

    transaccion SPAD –> Dispositivos salida –> Visual. –> Selecciones la impresora –> Acoplam. SPOOL host –> Forma acopl.a SPOOL host

  9. ardhian says:

    Hi,

    Great response Sergio.

    Thank you for helping other SAP user.

    ardhian

  10. Sumantha says:

    I am facing problem while printing through SAP front end GUI 7.10 , I dont want to use CUPS , is there any other way to get printout plz tell me the configuration teps / yaah to use for prinitng

    with reagrds
    Sumantha

  11. ardhian says:

    hi sumantha,

    you still can use another method for SAP documents printing such as using spool management server.

    i use spool server method on my office. so far, it’s running well.

    please consider to donate to help me maintain and update this blog regularly.

    ardhian

  12. Dondon says:

    Hi, I’ve tried every instruction given here: G or U methods to no avail. My front-end PC is OpenSuse 10.2 with locally attached Epson LX-300+II printer, SAPGUI for Java 7.10. Any step-by-step configuration of the SPAD screens to enable front-end printing would be very very appreciated. Thanks

  13. Dondon says:

    dear julio,

    if you are using U method to print from SAP system, you need to configure your LPD daemon on your linux box. If not, you’ll receive “unable to reach the remote host spool system” beacuse SAP Spool Work Process cannot reach your LPD process on your linux box.

    Hope that can help.

    ardhian

    Hi sir,

    I get the same error when using the U method… The thing is I’m using CUPS… Is there a way that I could configure CUPS daemon for me not to face the error again?

    a million thanks,
    dondon

  14. ardhian says:

    Dear Dondon,

    Hi, I’ve tried every instruction given here: G or U methods to no avail. My front-end PC is OpenSuse 10.2 with locally attached Epson LX-300+II printer, SAPGUI for Java 7.10. Any step-by-step configuration of the SPAD screens to enable front-end printing would be very very appreciated. Thanks

    –> G method only available if your SAP R/3 4.7 has implemented BASIS SPAM level 52 (minimumly). You can check your server SPAM level using tcode SPAM. Otherwise your system cannot use this G methods.

    hope this could help.

    ardhian

  15. ardhian says:

    Dear Dondon,

    I get the same error when using the U method… The thing is I’m using CUPS… Is there a way that I could configure CUPS daemon for me not to face the error again?

    –> As far as my experiences on printing SAP Document, SAP spool work process cannot communicate with CUPS daemon directly. It still using traditional unix LPD. So you still need to configure LPD just like I show you on this tutorial.

    hope this could help.

    ardhian

  16. cevarief says:

    Hi Ardian,

    Do you know how to print to pdf instead of to printer ? I have difficulty on it.

    Thanks before.

  17. ardhian says:

    Hi Cevarief,

    I haven’t printed any document to PDF yet. But logically, it should be same as normal printing. You just need to install PDF-based printer.

    On Windows, you can use PDF Creator or Primo PDF. On Linux, it should already integrated.

    ardhian

  18. cevarief says:

    If my local printer attached is laser jet as defined in SPAD output device type, so using PFD-based printer, do i have to change it as well, to what device type ?

  19. Dondon says:

    Hello Ardian,

    I really appreciatte the help you gave me. SAP Front End Printing already works for me but I came to a dead end again. I cant print directly to the printer, I still have to preview the needed output and click the print icon. I badly need ur help on this. A million thanks…

  20. ardhian says:

    hi dondon,

    there is bad news about print preview when you’re using SAPGUI for Java. Because usually we created smartform or alv list using SAPGUI for Windows, we got bad print preview.

    I usually use print preview just to check whether its has correct value or not.

    hope this could help.

    ardhian

  21. julio says:

    Hi im back, im can finally print on linux using the platin gui for java, but i have a new problem.

    Im usin a group of servers(3)with win 2003 enterprise 64 Bits, te trouble its , Printing begins in the right way but suddenly, sap stop the print from the pc with Linux(Ubuntu 7.04).

    Im must config something on the sap spool or another thing??

  22. julio says:

    Hi, I have also, another question, how can configure the __DEFAULT printer on linux.

    Thanks.

  23. ardhian says:

    hi julio,

    if you’re using SAPGUI for Java version 7.10 (any kind of rev version) and using R/3 4.7 ext 2.00, Basis level 52 (minimumly) then you could use G type access method for printing.

    G access method type will show up on Host Spool Access Method list option.

    hope this could help.

    ardhian

  24. Julio says:

    Hi ardhian thanks for your help,

    But if i use the g method i cant print docs where the transaction send to print automatically.

    because im using transactions that prints when i save for first time, only method that works is the U method.

    Please help me to make this posible and use the __DEFAULT printer using the u method.

  25. ardhian says:

    hi julio,

    access method U cannot work with __DEFAULT printer configuration. __DEFAULT printer only work with F or G host spool access method.

    ardhian

  26. adriana says:

    Hello, i would like to do a question. I can print whith LPD and LINUX with the parameter “U”, but I have a problem if in SAP I send 4(copies) witht the LPD-CUPS prints only one, always prints only one. I don’t know where I must change the parameter.
    Please, help me.
    Thanks for all

  27. ardhian says:

    hi adriana,

    what is your current SPAD parameter ? I believe it should be fine although I didn’t know print result quality (usually bad one).

    I just used another SAP printing technique so that SAPGUI for Java on Linux can print and get good result as well as if you printed them from SAPGUI for Windows.

    I had helped 5 Indonesian company and 1 Phillipines company with this SAP Printing technique. They have paid me some money to keep me maintain this blog and keep innovation.

    If you interested, please feel free to contact me.

    ardhian

    • Richard says:

      hello, maybe you can help me. I am try print to zebra z4m+ on sapgui for java on linux ubuntu 9.10 (jaunty) using lpt1, I use unix print server remote. Only print escape character.

  28. devratt says:

    thank you for nice how to

  29. salvador bizarro says:

    Hello,

    I’m using a Stratus server with linux as a print server, and I configure in SPAD the method U for some printers.

    But, frecuently the print queue in SP01 display the message Waiting and finally ends with a connection error: Unable to establish connection to Berkeley LPD

    Then, I switch the print queue to another instance in SAP and the following jobs are printed well.

    I see that telnet 515 still answer with the message:
    /interfaces/telcel$ telnet uxsap062 515
    Trying 10.253.15.77…
    Connected to uxsap062.
    Escape character is ‘^]’.

    as an indication that the communication is good.

    The problem persist some minutes and then works fine again.

    Do you have any idea if I need to adjust some parameter or check any part of communications?

    I have a firewall between the SAP servers and the Stratus server.

    Best regards,
    Salvador Bizarro

  30. ardhian says:

    Hi Salvador,

    You have to make sure that SAP server could contact your Print Server (where Berkeley LPD reside) through port 515.

    This could be done by using Connection Check on each Printer Configuration on SPAD.

    If this message “Unable to establish connection to Berkeley LPD” still appear than seems you are experincing problem on communication problem and/or LPD service is temporarily unavailable.

    Best Regards,
    Ardhian

  31. Sachin Joshi says:

    Thank you for help it helped to connect some printers. But we are using printers connected in different buildings with different mode like printers connected to pc’s, printer connected to print server etc. Presently till we were using windows we were using F method for this function but with Linux front end method does not work how can I configure printer to use system default settings from SAP. Please help.

  32. sriram says:

    Hi

    I am already having cups 1.1 how i need to upgrde or update the latest version cups to take printout from sap. can u help me the steps

    thanks
    sriram

  33. ardhian says:

    To Sriram :

    No need to upgrade CUPS. Any CUPS or LPD will work with SAP

    ardhian

  34. sriram says:

    To ARDHIAN

    We want to use the sap print u method by using Linux host spool server, for that we are already install the Linux red hat os version 8.00, along with cups-1.1.17-13.3.6 version; we want to install or upgrade the cups version? Or with same version we can do the configuration sap print U method? if it so pl help if u having any documents

    Thanks
    Sriram

  35. sriram says:

    Hi Ardhian

    thanks for you replace is this any u can send me the steps bye step configuration details, how we can use the linux host spool server in sap by U method.

    Regards sriram

  36. ardhian says:

    To Sriram :

    If you want to use U access method, you can follow config on this article.
    You need to consider that you’re Z/Y program created by your developer (might need to be adjust) to make sure that the printing result is exactly like what you want since usually developer using SAPGUI for Windows to get best result.
    SAP also suggest that developer should work on Windows environment since SMARTFORMS and SMARTSTYLES only work on SAPGUI for Windows.

    I (for internal need) use different technique to get best printing result (as I use SAPGUI for Windows) when I use SAPGUI for Java (on Linux). Just modified printing technique. Not bothering my developers to modify their ABAP codes…:D

    My private client (usually company using SAP) pay me to get this solution. I already implement this solution on several company (4 Indonesian company, 1 Phillipines based).

    ardhian

  37. Ivanhoe says:

    Hi,
    We follow the article for configure a lx300 printer on linux box (Fedora Core 7) with U: access method, but the only report that we get is a square with Job ID, Tittle, Requesting User, Billing Info in it, and on the botton of the page the CUPS logo and ESP square are printed.

    If anybody has fix this issue, please post it.
    Thanks in advance,

    Ivanhoe

  38. sriram says:

    Hi

    Thanks for your support i did the configurations.
    when i am releaseing the spools to hostspool server its printing cover page and then main page, how we can disable the cover page printing.
    kindly help us

    Regards
    Sriram

  39. ardhian says:

    hi sriram,

    when you’re printing ALV list. There must be popup asking user to enter OUTPUT DEVICE.
    Click Properties setting.
    Choose Cover Sheet
    Double click SAP Cover Page and make sure that the attribute is do not print.
    Also check for OS Cover Page and do the same.

    ardhian

  40. sriram says:

    Hi Ardhian

    Thanks for your reply, same way i tried but still i am getting cover page. it content Job id,Title and Requesting User Id.

    Kindly help ue

    Regards
    Sriram

    • celeb says:

      Hi Sriram,

      cups-lpd is responsible for this. After wasting some time with google I finaly found solution.

      add -o job-sheets=none to /etc/inetd.conf, so it looks like:

      printer stream tcp nowait lp /usr/lib/cups/daemon/cups-lpd cups-lpd -o job-sheets=none

      regards,
      celeb

  41. patson says:

    I am using access method G and device type CNSAPWIN for simplified chinese characters to print.Access method G always pops up for a printer. Is there any other way of bypassing the popup and go directly to print on the default printer ?

    My users want to use a scanner and this will be a problem.

    Please help.

  42. ardhian says:

    hi,

    no. you cannot bypass it since you’re using G access method. You can use S or U type to by pass it.

    ardhian

    • Narendra says:

      Hello I am also facing same problem like unable to reach host system.

      I don’t have much knowledge about linux & cups but as per your first post like add some lines in xtiend.conf file that where exactly i have to add.

      Like I have spool server of linux and all the printer is configured there and my sap is installed in AIX server so now I going with access method
      U i am getting error.

      Kindly suggest on the same.

      Regards,
      Narendra

  43. Narendra says:

    Hello,

    I have AIX server in SAP and my spool server is on Linux.

    Now when i going to use Access method U i am getting error like “unable to reahc host spool system”

    Please suggest me how to resolve this error in linux.

  44. ardhian says:

    hi narendra,

    if you receive error message “unable to reahc host spool system” mean that your SAP server cannot reach your Linux LPD/CUPS daemon which mean that your LPD/CUPS daemon is not running well.

    Make sure that this daemon (LPD/CUPS) is running well before printing.

    ardhian

  45. Narendra says:

    Can you guide me how to check Cups/LPD & sap replied LPD is running on 515 port.

    But when i configuring printer in SPAD if i am specifying 631 port for cups this error of reachable is not coming & i am able to save but when I am giving print it is going in waiting mode & log showing unable to connect output processor.

  46. Narendra says:

    Hello,

    I am able to ping port 515 on spool server of linux.

    But still I am getting erroe like Failed to connect to LPD.

    Kindly suggest me on the same.

  47. Russell says:

    Hi,
    I installed cups and change the configuration file of xinetd.conf.

    The port 515 work fine with local printing.
    However When I requests external SA system print document to my print server. I only receive somthing like TEXT or raw1 …. And the server stop to send data to print server orz…..

  48. Thanks for your article by the way If you want to consider ERP system. Free Learning SAP R/3 in a step-by-step online and we provide SAP document and ABAP/4 training online everything we provide free for you. visit saptraineronline.com

  49. Deepak says:

    Hi Ardhian,
    I am facing a problem in taking an invoice prinout from sap from a linux desktop.
    The linux desktop is ready with RHEL 4.5 and the printer is Wipro LQ 5235.
    The sap standard reports are printd normally except the invoice.
    SAP is ECC 6.0.
    It will be of great use if you can guide me.
    Thanks in advance,
    Deepak

  50. thom says:

    Dear all…

    i still have same problem print with SAP, still can’t print 😦 therefore i already use acces method with U,
    in local with linux, but if i print share to windows that’s no problem, i use ubuntu 9.10 and PlatinGUI 7.10,
    my printer is LX300 +II, if print document it’s ok.. but if i print via SAP can’t printed, in my own spooler the satus is waiting (red) n’ in status text error is “output device unvailable”
    can anyone help me please? am i wrong with my configuration?

    thom

  51. Hardono says:

    Hi,

    I use Ubuntu 9.10. Here is the content of my inetd.conf :
    printer stream tcp nowait lp /usr/lib/cups/daemon/cups-lpd cups-lpd

    And this is my xinetd.conf :
    defaults
    {

    # Please note that you need a log_type line to be able to use log_on_success
    # and log_on_failure. The default is the following :
    # log_type = SYSLOG daemon info

    }

    includedir /etc/xinetd.d

    service printer
    {
    socket_type = stream
    protocol = tcp
    wait = no
    user = lp
    server = /usr/lib/cups/daemon/cups-lpd
    }

    I use U (Berkeley protocol) for Host spool access method in SPAD. When I test the connection is fine. But when I print the document only the cover page is printed, the page of the document is not printed.

    Could you help me please?

    Thanks
    Hardono

    • thomas roy setiawan says:

      Dear Hartono…

      i don’t know if you have solve the problem with this…
      i have the same problem, but now i have solve it,

      here the configuration on xinetd.conf that i used to :

      service printer
      {
      socket_type = stream
      protocol = tcp
      wait = no
      user = lp
      server = /usr/lib/cups/daemon/cups-lpd
      server_args = -o job-sheets=none
      }

      this conf is work n solve the problem..
      just try it

      thanks

      Thoms

  52. ardhian says:

    @Hardono :

    This problem occur because of print setting properties. Try to click properties and find out abot cover page printing.

    ardhian

  53. fredy says:

    Hello,
    I have a ECC6 SR2. The problem is that i hv installed JAVA GUI client on open suse. I am using printer HP LJ1320. I hv added the printer in the SPAD device type. Now the problem is when i print smartform report. The bolded portion of the tables apear complete black. I would appreciate a quick response

    • ardhian says:

      @fredy : maybe there is a problem with the driver. I don’t know about that. Yet, I used anothe technique to print from SAPGUI for Java on Linux so that its (printing result) is completely like what you get is like printing from SAPGUI for Windows.

      ardhian

  54. Fredy says:

    hello ardhian, first i am using the cups hp drivers. also for smartform reports in ecc6 i have used PDF1 printer from printing devices in SPAD. Now the bolded portion of the tables does not apear black. But the zsmartform custom reports print cuts from the left and the bottom and non smartform reports orientation changes

  55. aris says:

    Helo Mr Ardhian, Finally I already print SAP document with xinetd cups-lpd printing for printer LX-300+, LQ2180, LQ2190, HP Laserjet 1320, thank you for the article. however for other printer like HP Deskjet 3500series, 3700series, 3900series, HP Laserjet pro 1102, HP laserjet 2055d, Canon IP3600series, HP Laserjet CP1515, HP Laserjet CP3525. what should i choose on tab “Device Attributes” > Device Type, cause nothing similar with printer that i want to use on SPAD. thank for your help.

  56. ramu says:

    even though the spad and sp01 transaction configurations are not working then how could u do printing?

  57. anthony. montoya says:

    I have a cannon ir 3225 and it is hooked up to my hp pc via usb when in sap only i try to print lets say 4 copies but only 1 prints out. i am not that much of a wiz but i can understand most computer lingo. please help any advice.

  58. Thank you so much for this useful article.
    Also you can check the following sites for sap basis info.
    http://www.sapbasisinfo.com

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

My twitter post @devratt

August 2007
M T W T F S S
    Sep »
 12345
6789101112
13141516171819
20212223242526
2728293031  

Popularity


PageRank

Bookmark and Share
%d bloggers like this: