Technical Articles
Use of multiple tray in a single printer based on paper type for adobe form
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 .
Thanks,
Banalata
Good piece of work!! I can see lots of effort have been made here. Thanks for sharing Banalata...
Thank you 🙂
Nyc info!!
Thank you 🙂
Thanks for sharing! I think you might have an internal link for the note, I was unable to open it.
This is a public link from Support launchpad (SID required): https://launchpad.support.sap.com/#/notes/766410
Thank you for the information. I have updated the link.
its truly amazing you have done a great piece of work and efforts are crystal clear
Thanks!! 🙂
Useful Blog.
Hi,
Useful and nicely explained.
Q1:
Do you have any experience with Job Profiles ?
We would like to set trays from within the application instead of in the Adobe Form.
Because this 1 form is used on different printers with different tray numbers.
Q2:
Is it possible to set the Adobe Form Paper Type via javascript ?
This could be a workaround for my Q1.
Thanks.
Hi Jan
Did you already get an answer or found a solution to your problem yourself? I'm facing the same problem.
Regards
Thomas
Hi Thomas,
First of al we updated the Device Type of our printer (tx SPAD) which made a lot of additional options possible for this printer, also for use with Adobe Forms (previously not the case).
In tx SPAD you create print tickets, defining which input/output tray to use ( + add. options ).
Now, in the print options, when calling the Adobe Form, you set the correct print ticket in the 'PRINTTICKET' field.
https://help.sap.com/doc/saphelp_scm700_ehp02/7.0.2/en-US/4e/a6b123507e25cfe10000000a421937/frameset.htm
Regards,
Jan
Hi Jan
thank you for your explanations. Somehow that didn't quite work for us. Due to lack of time, i went a different way. As a Workaround, I've created an additional printer in SAP that points to the same IP address as the first printer. In addition, a separate XDC file with modified tray information. After that, i was able to print from different Trays.
Regards
Thomas
Hi Thomas,
We also tried the XDC-file ... but that didn't work at all.
Which data did you modify in the XDC (xml layout whit <tray> tag), where did you get the needed info ?
We also modified the default XDC used in Adobe Forms with custom page layout ... no success either.
We didn't get info from the manufacturer, so didn't know which values to use to address the trays.
Regards,
Jan
Hi Jan
After updating the Device Typ the Report RSPOXDCWIZARD did the Job for me and writes the following Lines into XDC-File:
<!-- ========================================== -->
<!-- InputTrays AdobeForms -->
<!-- ========================================== -->
<inputTrays>
<inputTrayDefinition name="Tray 2" medium="a4Letterhead" trayType="Preprinted" trayNumber="1"/>
<inputTrayDefinition name="Tray 4" medium="a4" trayType="Plain" trayNumber="8"/>
</inputTrays>
I've ran the Report for each Tray to get the right internal TrayNumber
See the following link
https://mind-forms.de/sap-formulartechnologien/adobe-forms/schachtsteuerung-mit-adobe-forms/
(is unfortunately in German but Google can help you translate:-))
Regards
Thomas
Hi Thomas,
Spitze, vielen Dank!
Grüsse
Jan
Hi all,
Which XDC editor is used in Eclipse? I couldn't get XDC file opened in below UI, but it is opened in text editor.
Tried with below XML editors in Eclipse but it is not working as expected. (using Eclipse ADT Version: 2020-12 (4.18.0))
Eclipse editor preferences for file associations
Regards,
Sravan Guduru