Additional Blogs by SAP
cancel
Showing results for 
Search instead for 
Did you mean: 
thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Introduction
I don't know about your company, but mine just loves PDF documents. Maybe we are just control freaks and like the locked-in nature of a PDF document. It seems like everyone and their brother has the Adobe PDF writer application. It is also a really common request from the users to add a PDF export option to the reports that we write in SAP. Now I know that we have all the cool new Adobe Forms technology in Netweaver 04. I have been playing with that a lot lately and I plan to write some weblogs on it soon. However I want to look at something a little simpler first.

The task I set out to try and complete was setting up a simple PDF writer in our 4.6C R/3 system. I found several OSS notes that put me on the write path yet I never found where the solution was exactly laid out. Therefore I thought other people might be interested in the solution as well.

Printer Setup
First of all you will need the PDF device type in your SAP system. All systems on top of Basis (WebAS) version 46D and higher already have this device type for at least Latin-1. If you are on a release older than 46D or if you are missing the device type for your code page (some of the latest code pages were not supported until 640), have a look at OSS note 317851. It has the instructions and files necessary for installing the PDF Device type.

What I wanted was a printer ID in SAP that would convert output to PDF and send it for front end printing. On my front end, I will setup a simple generic text printer that is routed to a file instead of a printer port. Then I can create PDF files on the fly from my SAP output, similar to an Adobe Printer Driver.

The only draw back to this solution is that I must setup an output device on each workstation that will use this solution. If you want the front end printing to be fairly transparent then you want to be sure to use the same name for each front end device you setup. That way later in the SAP Printer setup we can default in that name.

Printer File Port

Printer - Generic Text

Next we want to go to transaction SPAD in our SAP System. Here we will setup our printer with the PDF Device Type.

For our access method we want to use F (Printing on Front end computer) and default in the name we gave the device on the front end.

Printing from SAP
Now we are ready to try and print something from SAP. I will just jump over to SE16 and print out something simple. When I put in PDF1 and hit enter, it proposes the correct name of my front end device.

A few seconds later I get a popup from windows asking where I want to save the file. Now this is really the only drawback to this solution. This file dialog, provided by Windows, is lacking in functionality. In such you have to be sure and end the filename in .pdf if you want the file to be recognizable as a PDF.

In the end you get some nice looking output that is easy to produce. Not bad for something that only takes a few minutes to setup.

6 Comments