Print SAP documents using Linux
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.




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.
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
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
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.
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
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.
Hi Yanela,
Try to write in english please coz I only understand english.
Apologize me.
Ardhian
yanela,
transaccion SPAD –> Dispositivos salida –> Visual. –> Selecciones la impresora –> Acoplam. SPOOL host –> Forma acopl.a SPOOL host
Hi,
Great response Sergio.
Thank you for helping other SAP user.
ardhian
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
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
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
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
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
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
Hi Ardian,
Do you know how to print to pdf instead of to printer ? I have difficulty on it.
Thanks before.
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
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 ?
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…
I have a similar problem. May you help me if you got any replies from this.
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
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??
Hi, I have also, another question, how can configure the __DEFAULT printer on linux.
Thanks.
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
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.
hi julio,
access method U cannot work with __DEFAULT printer configuration. __DEFAULT printer only work with F or G host spool access method.
ardhian
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
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
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.
thank you for nice how to
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
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
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.
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
To Sriram :
No need to upgrade CUPS. Any CUPS or LPD will work with SAP
ardhian
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
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
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
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
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
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
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
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
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.
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
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
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.
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
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.
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.