Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
Showing results for 
Search instead for 
Did you mean: 
Introduction: - In this blog we are going to learn how to print different pages of a adobe form output from different tray of a single printer based on page format in SAP .

Example: I am printing a customer invoice which is having 10 pages. Where 10th no of page is having different format than other 0 to 9 pages. It can be printed on a pre-printed paper or with a different paper size. Like 0 to 9 pages will be printed on 'A4' type paper and 10th no of page is on 'A5' type of paper.

Here, 0 to 9 pages should be printed from Tray1 of a printer and 10th page should be printed from tray 2 of same printer.

Step1: - Create an adobe form in transaction ‘SFP’ where first page and next page paper type is different from special page which should be printed from different tray. Here in this example I have used A4 and A4 plain paper type. As I want to print 10th no of page from a different tray with some pre-printed data. But paper dimension is same for all pages. As tray selection works for different paper type, so I am using A4 and A4 plain.


Step 2:- Check printer details.

Check the specific printer manual for each printer languages which tray numbers are mapped to the corresponding media source commands.

As part of standard solution, SAP has provided several XDC files for common printers and printer languages which can be used for customizing XDC file.

Here as an example, I am referring output device LP01.  Here device type is HPLJIIID.  We will create our own device type, output device and modify the  XDC file and map with our new device type.

To do so, follow below steps.

Step3: - Go to transaction ‘SPAD’. Click on Full administration.

Create a new ‘Device Type’. Go to ‘Device Type’ tab and press enter.

Select Device Type and click on menu bar ‘Device type’. Then go to ‘create using template’.

Provide a device type name and execute. Save it.

New device type has been created.

Step4: -Create new output device in ‘SPAD’ transaction and assign new device type to this.

Step5: - Now go to transaction SE38 and execute report ‘RSPO0022’. Here we will download XDC file of device type 'HPLJIIID' and after doing required changes assign it to new device type.

Select original device type and click on ‘XDC administration’. Select XDC file and click on ‘Download XDC file’.

Step6: - Open XDC file in Eclipse IDE. Add an input tray name and maintain medium (page size which is mentioned in SFP for adobe form) in ‘Medium to Tray Mapping’ Here for this example, 0 to 9 page is having A4 paper and 10th no of page is A4plain. Here in this example, 10th no of page is the payment page and 0 to 9 pages is normal invoice. Then in ‘Input Trays’ maintain tray name, tray number and tray type. And save this file with a different name (here I have changed the name as hppcl5e_1.xdc).

Step7: - Again go to SE38 and execute report ‘RSPO0022’. Click on ‘create new XDC assignment’. Pop up will appear. Provide new device type and new XDC file. Our new XDC file has been uploaded.

Now use new output device to print adobe form output from multiple tray of a printer.

Conclusion: So, in short we are using different page type while developing adobe form in SFP. Then we are creating own device type by copying a standard device type based on our requirement. Downloading XDC file from XDC administrator and modifying it in Eclipse IDE. Then uploading new XDC file in XDC administrator and map it with new device type.

I hope this will help you to print your Adobe form output from different tray based on page format.

Useful Link :-  Note 766410 .