Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
Showing results for 
Search instead for 
Did you mean: 

Adobeform for multiple trays

We have some printers with multiple trays. Depending on the message category, we can print adobeform from a specific tray. Rule will be always as simple i.e. for one message category; we know the tray number where we want to print the adobeform.

First we need, maintain data in TVARVC as below:

Go to Transaction STVARV and maintain the data for the Message Category and Tray Value.

Name contains the Message Category and the Value is Tray Name / Number (i.e. either for Duplex Printer or Simplex Printer)

Before calling the function module ‘FP_JOB_OPEN’, pass the value of the tray name or number in the field ‘JOB_PROFILE’ of the structure ‘SFPOUTPUTPARAMS’ i.e. form processing output parameter.

Code as below:

Taking example for Production Order (CO01/02/03)

Transaction OPK8

List Name


Enhancement Spot at Form ‘FILL_OUTPUTPARAMS’.

DATA:        lv_messageo TYPE fpjobprofile,

                  lv_msgo     TYPE rvari_vnam.

CONSTANTS: lc_msg1 TYPE rvari_vnam VALUE 'ZFPP01_',

                     lc_msg2 TYPE rvari_vnam VALUE 'ZFPP02_'.

*-- Concatenate like 'ZFPP01_LG01ZP01'

*-- print_co-lstid contains value of list name i.e. LG01 and print_co-auart contains the value of Order Type i.e. ‘ZP01’, ‘ZP03’, etc.

CONCATENATE lc_msg1 print_co-lstid print_co-auart INTO lv_msgo.

*-- Select query to fetch the tray value from table 'TVARVC' comparing the Message Category

SELECT SINGLE low  "ABAP/4: Selection value (LOW)

INTO lv_messageo

FROM tvarvc "Table of Variant Variables (Client

WHERE name = lv_msgo

      AND type = lc_value_p.

IF sy-subrc EQ 0.

    xs_outputparams-job_profile = lv_messageo. " Populate the value of the Tray name in the field 'JOB_PROFILE'.


This is how depending on the message category, print will come from a specific tray in the printer has multiple trays.

Thanks for reading the document. :smile:


Debopriya Ghosh