Dynamic Tray Selection in Smartforms

Hi all,
I am looking for a solution, to set the tray in a Smartform dynamically.
It is not sufficient to set the Tray statically on the "Output Options" tab -> Ressource Name.
Can anybody help me?!?
Thanks and best regards,
SteCee

Normally, tray selection is done using GET_PRINT_PARAMETER FM.
Refer to these threads, may be helpful -
Print to different output tray in SAPscript/Print Workbench
Automatic tray selection for printing
Regards,
Amit

Similar Messages

  • Smart form dynamic tray selection on printing

    Hi Experts,
    I have a requirement in smart form that need to output the a particular invoice to a particular tray a printer. For e.g. tray 2.
    I have added TRY02 to the resource name of the pages in the smartform, but still the invoice is being printed to the default tray of the printer.
    I have done a test to that printer by printing the SAPCRIPT-TRAYTEST from SO10, and the output is being printed correctly i.e. to the different trays. So I guess the printer has been configured correctly.
    Is there any additional configurations that need to be done for smart forms for the tray selection works correctly? And, is it correct the way I implemented the functionality in the smart form?
    Can someone help please?
    Thanks in advance
    Regards,
    Zaheed

    Hi Experts,
    I have a requirement in smart form that need to output the a particular invoice to a particular tray a printer. For e.g. tray 2.
    I have added TRY02 to the resource name of the pages in the smartform, but still the invoice is being printed to the default tray of the printer.
    I have done a test to that printer by printing the SAPCRIPT-TRAYTEST from SO10, and the output is being printed correctly i.e. to the different trays. So I guess the printer has been configured correctly.
    Is there any additional configurations that need to be done for smart forms for the tray selection works correctly? And, is it correct the way I implemented the functionality in the smart form?
    Can someone help please?
    Thanks in advance
    Regards,
    Zaheed

  • Dynamic tray selection - SAPScript

    Hi,
    I need to dynamically select a tray to print a form using SAPScript, depending on some condition.
    Need to know how to do this?
    Thanks in advance!
    regards,
    Karen

    There are 2 options. The first one I have not used before but I think it is the better way.
    Example: You want print out an invoice on different paper.
    In SAPscript you have in this invoice 2 pages:  "FIRST" and "NEXT"
    Salesorganization 1000 = TRY01
    Salesorganization 2000 = TRY02
    **************************************************************************************** 1st option
    1st option: (As mentioned in this thread): Create not 2 but 4 pages:
    F_01 and N_01          both with Resource Name = TRY01
    F_02 and N_02          both with Resource Name = TRY02
    Page F_01:   in field "Next page":  N_01
    Page N_01:   in field "Next page":  N_01
    Page F_02:   in field "Next page":  N_02
    Page N_02:   in field "Next page":  N_02
    In the print-program you have to decide if you want to have page F_01 and N_01 or F_02 and N_02.
    For this reason call function  "OPEN_FORM"  without the name of the form (SAPscript) because in
    call function START_FORM you can export the page.
    data:   GV_STARTPAGE type TDPAGE.
    if vbdkr-vkorg = '1000'.
      GV_STARTPAGE = 'F_01'.
    endif.
    if vbdkr-vkorg = '2000'.
      GV_STARTPAGE = 'F_02'.
    endif.
    call function START_FORM
      FORM = name of form
      LANGUAGE = nast-spras
      STARTPAGE = GV_STARTPAGE
      and so on
      call function WRITE_FORM
      call function WRITE_FORM
      call function WRITE_FORM
    call function END_FORM.
    call fuction CLOSE_FORM.
    **************************************************************************************** 2st option
    Short description:
    Normal SAPscript only FIRST and NEXT, both with same tray.
    ABAP: Do not print, only get OTF-data.
    Change the tray in OTF-data.
    Print OTF-data.
    I have done this before and I know it works. But I think the 1st option is better.
    You can change the field for the "Recource name" from TRY01 to TRY02 in the print program but only with a trick.
    Do not print out in a normal way (Open_form; write_form; close_form).
    Solution:
    In function OPEN_FORM     set field    OPTIONS-TDGETOTF to 'X'.
    This means: The function CLOSE_FORM will not print into spool and maybe from spool to the printer but the print data will only be stored into a table.
    In SAPscript you have 2 Pages. FIRST and NEXT; both with Recource name = 'TRY01'.
    At the end nn CLOSE_FORM you can receive the table OTFDATA.
    data: GS_OTFDATA type ITCOO,
            GT_OTFDATA type standard table of ITCOO.
    call function CLOSE_FORM
      tables OTFDATA = GT_OTFDATA.
    * Up to now no data have been sent to spool.
    * If you have a look now into table GT_OTFDATA (field TDPRINTPAR) you will
    * find in the first lines  "TRY01"
    * You can change this
    If vbdkr-vkorg = '2000'.
      loop at GT_OTFDATA into GS_OTFDATA.
    *   Find the pattern "TRY01" in GS_OTFDATA-TDPRINTPAR
    *   with commands FIND or SEARCH or something like that.
    *   Change the pattern "TRY01" in GS_OTFDATA-TDPRINTPAR to "TRY02"
    *   and take over this change to table GT_OTFDATA with command "MODIFY".
    *   Please notice: In table GT_OTFDATA the pattern "TRY01" can occure more than 1 time.
        modify GT_OTFDATA from GS_OTFDATA.
      endloop.
    endif.
    * Now print the OTF-Data
    call function PRINT_OTF
    * the paramters are   PRINTOPTIONS (same as in OPEN_FORM)
    *                   and tables OTF = GT_OTFDATA.
    Ok, I know the problem and the thread are very old but maybe someone wants to have a more detailed solution.
    Keywords in English: SAP ABAP SAPscript  Resource Name ITCTG-TDPAPERRES   from program dynamically dynamic dynamically
    TRAY  TRY01 TRY02 TRY03
    Keywords in German: SAP ABAP SAPscript  Resourcenname   ITCTG-TDPAPERRES vom Programm aus dynamisch TRAY  TRY01 TRY02 TRY03 Druckerschacht Schachtsteuerung Druckerschachtsteuerung verschiedenes Papier
    best regards
    Norbert Zanders

  • Printer tray selection in smartforms

    Hi All,
    I have a requirement that for a particluar printer the smartform should be printed using a particular tray (for ex. Tray4). How can this be achieved?
    Regards..

    Refer these threads,
    Print to different output tray in SAPscript/Print Workbench
    Automatic tray selection for printing
    Regards,
    Joan

  • Dynamic Tray Selection

    Hi All,
    When the print out is issued from the SMARTFORM, it should automatically determine the tray for the paper (based on a pre-defined logic):
    The trays can be:
    Tray 1
    Tray 2
    Manual Feed
    I tried sending Dynamic Value in RESOURCE NAME field of Smartform Page. The Value i tried in TRY1, TRY2. But printer is not selecting according to the value passed at runtime in field RESOURCE NAME. Could someone please let me know about the exact name to be specified in RESOURCE NAME as the field is 20 characters long.
    If GET_PRINT_PARAMETERS is to be used, please let me know where should i pass the internal table which i get from GET_PRINT_PARAMETERS FM.
    Thanks,
    Best regards,
    Prashant

    Hai prashant,
    Do you want to define the tray statically?.
    Then you can mention the tray at the page level.
    Select the page and select 'output options' tab.
    There you can mention the tray name with the resource field.
    if you want to select the tray dynamically then ,refer the OSS note 367128 and apply the OSS note which is applicable for release 4.6 C.
    Implement the program correction. Afterwards, you can also enter a field (for example, ) in field 'Resource'. This field must be defined in a global manner (the type must be RSPORESNAM). You must set the value of this field before you call up the page. That is, you must either supply the value on the first page via the interface or you must set it during the initialization. If you call a page via an explicit page break, you must have set the value before the page break.
    I hope this should resolve your issue.
    You can even try using cal functions.
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
    GET_PRINT_PARAMETERS
    Regards,
    Srikanth.
    Please reward points If it is helpful

  • Dynamic color selection in Smartforms using tables

    I am printing a smartform in pdf, i am using  tables in smartforms where the number of column is dynamic, and say there can be cases where there will be no data in a particular column and if that is the case than i have to print a particular color say grey, so my question is how to achieve this functionality in smartform dynamically, i am printing it in PDF.
    Regards & thank,
    Pritam.

    you need to create the 2 text elements , and put the condtion like below
    if not value is initial.
    display text1
    else
    display text2.
    endif.
    in text2 element > Output options> put the color. which you want...

  • Dynamic style selection in smartform depending on language

    Hi
    Today I assign a style to a smartform statically in form attributes. I don't assign styles to any subnodes.
    Is it possible to make the assignment of style to the smartform dynamically at runtime?
    (If you can suggest a completely other solution for my problem, that will also be very much appreciated).
    Reason: I have a requirement to translate a lot of smartform (maybe 100+) from English to Chinese, Japanese, Korean, Russian etc.
    I'm in a Unicode environment and the translation itself seems to work quit simple.
    But there seems to be a major problem about the font.
    In our smartforms we use smartstyles with 2 fonts helve and times.
    So far we have just translated a few smartforms to Chinese with SE63. We have also translated some material texts and addresses and we have defined a test printer with CNSAPWIN.
    Test prints now shows that we can print all the Chinese texts, but all the texts and numbers that is not translated into Chinese (i.e. quantity, price, net value etc.) is printed with a bigger font size.
    Now this is a know problem discussed in more forum threads and OSS nodes, and the solution seems to be, to change the style to use special Chinese fonts and adjust the font size.
    We have tested this at it seems to solve the problem. But all the threads and notes discussing this issue is talking about "the English smartform" and u201Cthe Chinese smartform" and so on. This is not very smart.
    If we follow this strategy and creates a form for each special language (special from our perspective), we will need 5 different versions of every smartform and the time needed for future maintenance will increase dramatically.
    A much better solution would be to have one smartform that is translated with SE63 and only make 5 different styles to handle the different fonts etc. This solution requires however that we can assign the styles to the smartforms dynamically at runtime.
    Yours sincerely / Med venlig hilsen / 此致敬礼 / Mit freundlichen Grüßen / Pozdrawiam
    Thomas Madsen Nielsen

    Hi!
    In SAPScript there is an option for this, using the STYLE keyword. However I don't know will it work in Smartforms or not.
    If it is not working, I think you have to different character and paragraph formats within 1 smartstyle for each language.
    About the STYLE keyword:
    Changing the Style: STYLE Locate the document in its SAP Library structure
    The STYLE control command allows you to change the style within a text. The new style is in force until another STYLE command is issued. If you specify * as the name of the style, then the system reverts to the default paragraph of the original style or form.
    Syntax:
    /: STYLE style
    /: STYLE *
    A style set with this command has no effect in a text included with INCLUDE. The system takes the paragraph and character formats from the calling text. To use the style set with STYLE in the INCLUDE text as well, you must add DOMINANT to the command.
    Note
    If the INCLUDE text has a style assigned to it, in both cases, the system always takes the paragraph and character formats from the directly assigned style.
    Regards
    Tamá

  • SAPScript and dynamic tray selection

    Hi,
    A customer of mine has 2 identical SAPScript layout sets defined with 1 minor difference - within the page attributes a different printer tray has been defined (attribute called resource name) in order to choose a different printer tray ...
    I was wondering wether this value could not be dynamically set by the SAPScript output program (when opening the layout set or using a specific command) ?
    I didn't really find any special function or parameter in the open_form function module ... I find it a shame that only for the tray functionality we have to maintain 2 layout sets ...
    Or can this be achieved in a total different way?
    Thanks,
    Steven

    I am not sure if you can change Tray attribute on a page dynamically from print program.
    But I have a suggestion, Why don't you create two pages identical in one single SAPScript just with the Tray different on each one. And call appropriate page while printing dynamically from your program using Function "CONTROL_FORM".
    Advantage in this approach is, you do not need to maintain two different SAPScripts. And all code maintenance in SAPScript is common to both the pages, so do not need to make changes twice.
    Limitation is if you resize any window in one page need to do the same on the other page too. This is still OK because usually you do not resize as often as you make changes in the code.
    Shashi Reddy

  • Printer Tray Selection Through Smartform

    Hi All,
    My requirement:
              There are two headings one should be printed in A4 Portrait and the other heading to be printed in the A5 landscape format inbetween each printed paper a color paper is to be inserted from tray 3 consider the other two size papers are kept on the separate trays...
    Kindly help....
    Thanks in advance.

    For ASCII text reports, the printer options can be enabled with embedded PCL escape commands within the Apps driver (Note 152285.1 should be helpful).
    For Bitmap reports, it can be done by editing PPD file (located under $ORACLE_HOME/guicommon6/tk60/admin/PPD)

  • Can we change tray selection dynamically?

    Hello experts,
    is it possible to change the tray selection dynamically? That is to say, via the driver program.
    For example the default tray on the SAPscript  form is TRY02. So if there are less than 20 lines on a form, it'll use TRY02 containing paper with pre-printed text. However, if there are more lines, then, I would like it to use TRY03 containing blank paper, for the rest of the information.
    Is this possible via programming or any other way for that matter?
    Your help is greatly appreciated.
    Edited by: Goharjou ardavan on Oct 29, 2008 11:07 AM

    Hi,
    Tray Options are available in the Output Device. You can't control it from the SAP Script. In Output device Tray's will be defined, But there is no option to shift the Tray based on the lines.
    But If you guys can define two output device, one with tray TRY02 and other device with tray TRY03. Then in the program based on the how many lines, Pass the Respective Output device to the Spool structures in the program.

  • Tray selection of printer doesn't work with printing order confirmation

    Hello,
    When we try to print output for the order confirmation document (BA00 and custom ZBA0) on a different paper tray (e.g. tray 2 for printer avbekyo-01_tray2 in SAP R/3) then the ouput is printed to tray 1 in stead. We have defined two different printers in SAP for the tray selection. We tested the ouput on different printers, besides the avbekyo-01 and went wrong on the others also. When we print out an invoice (ZRD0) to the printer on the second tray, the invoice is printed correctly from the second tray. With an ABAP developer we debugged the print process, but no code leads to the fact that the output for the order confirmation should be printed to the first tray, while the second tray was selected in the output record. In the code still the second tray is processed, but printed on the first. The only difference we can find is that the order confirmation is SAPScript and the invoice is a Smartform. Does anyone know a solution?.
    Kind regards

    Unfortunately the setting doesn't resolve the problem. We also have activated the settings of Tray2 in the option Tray Info.
    Edited by: Chantal Polman FUNC ACCOUNT on Jun 4, 2008 2:32 PM

  • How to dynamically include textelement in smartforms

    Hi Experts,
    I need to print payslip using smartform and need to take the values from pay99_result.
    I took all the values and filled in the internal table and passed to smart forms, but the requirement is when ever particular wage type is given for an employee only that wage type only printed in the smart forms output. we have 87 wage types.
    I designed the layout using table in window and created several table line, in the salray details table line rows values descripiton should come dynamically according to the particular month credited(affected) wage types.
    This is the salary details line item .
    desc amount annual semi annual deduction amount
    textelement1 textelement2 textelement3 ... . . . .. ...
    Inn single text element multiple coloumn need to come.
    using this text element respective values should come dynamically, i tried condition in the text element , but if condition failed (no values for wage types) whole coloumn is not displaying but for me only that row should not printed.
    Any one please guide me how to approach on this issue and how to pass the text element value dynamically ???
    With Regards,
    Thanesh

    HI,
    why dont you make use of Dynamic text concept in smartforms..which is fits in your requirement.. to make use of it..
    on a window. right click and choose Text.. it will take you to text window..in that choose text type as D Dynamic text...
    I hope this answer will help  you..
    Regards,
    Kiran

  • Wrong automatic paper tray selection in HP LaserJet M3035 printer.

    Hello,
    I have a printer (this one http://h10010.www1.hp.com/wwpc/us/en/sm/WF06b/18972-18972-3328064-12004-3328083-2512333-2512337-3435... ) shared in Active Directory by several users (running Windows XP machines). The thing is that no matter how many times I try to set the source paper tray to a specific one, it seems it doesnt apply/store the changes, and it comes back to Auto tray selection  (and it always selects tray #1, which is the one im trying to avoid), causing an issue which needs to be solved by hand.
    Thanks a lot in advance.

    1. Go into your SETUP MENU on your printer.
    2. Choose PREFERENCES
    3. Choose DEFAULT TRAY.
    Try it and let me know what happens, thanks.
    **Click the KUDOS star on the left to say 'Thanks'**
    Please mark a reply "ACCEPTED AS SOLUTION" if it solved your problem, so others can find it.

  • Does the Officejet 8600 Pro Premium N911n printer perform auto tray selection?

    I have an Officejet 8600 Pro Pemium N911n printer,  CN577A with two trays. My Operating Sysem is Win8,64bit,there are no error messages, no system changes.
    The HP Officejet Pro 8600 e-All-in One series User Guide states that By default, the printer draws media from Tray1.If Tray1 is empty, the printer draws media from Tray2(if it is installed and loaded with media. I have Tray lock disabled ,Tay1 the default Tray and Automatic Tray Selection enabled.Prior to making these selections,I contacted HP support via email to report that this option was not working. I received a response that there is no method that will automatically select a tray when one tray is empty. The User 's manual states otherwise..This option might not work but it is part of this series of printers. I have both trays loaded and I will determine if it works after Tray1 is empty. Does anyone have one of these printers and the auto Tray function works? Thanks.
    This question was solved.
    View Solution.

    Hello wardell1,
    Please take a look at this document and let me know if the troubleshooting steps help resolve your issue.
    Good luck!
    ↙-----------How do I give Kudos?| How do I mark a post as Solved? ----------------↓

  • How to dynamically replace variables in SMARTFORM texts based on item data?

    Hi experts,
    I'm currently designing a confirmation of order using Adobe PDF forms. The general layout with tables, pictures and texts was not big deal.
    But one tiny bit doesn't work and I'm becoming more and more desperate about it.
    We need various free texts for our pdf form. I created the texts using smartform texts. Some of these texts need to be slightly dynamic, so I added some dynamic fields in it.
    For example:
         "The material is currently out of stock.You can expect shipping around week &num_week&."
    To replace the dynamic field &num_week& in my interface, I read that I have to name the dynamic field exactly like the corresponding field in my interface. In my case this would be now:
         "The material is currently out of stock.You can expect shipping around week &SLS_PRT_COM-ITEM_DETAIL-ZZ_EXTRAFIELDS-ZZWEEKNUM&."
    To see the text on my form, I added a text object with type 'text module' and the proper textname. Of course I'm able to insert text on my form, save and activate it without problems. But if I want to print the form, nothing happens as the print program exits with an error code.
    After some hours I found out that this problem only occurs if I'm trying to replace the dynamic field with a field from the item table. Using a field from head details or globals like sy-mandt works like a charm.
    So my question is: Is it possible to use item data to replace dynamic fields of a smartform text?
    Greetings and thanks in advance!
    André

    Hi
    Have a look at the links below:
    LiveCycle ES2 * Adobe LiveCycle Designer ES2
    Using floating field in Adobe Forms to display text paragraph with dynamic variables in between
    After adding the floating field it will apeare in the hierarchy pallet above or bellow the text field.
    Good luck
    Shai.

Maybe you are looking for

  • Open Pdf on report execution

    Hello All, I want to open the pdf file Whenever I execute the report. but Without saving that file to my system. that is the main issue. <b>I donot want to save the file on my system.</b> eq. Select * from sflight into table itab_sfight. Data in the

  • How to send automated mail using Weblogic API ,,,,,, NOT Java Mail API.

    Hi All, I need to send an automated mail using BEA Weblogic API, can you please let me know how to accomplish this task, I will be heartly thankful to you, waiting for your response back naveen

  • Simple xml file mapping exception

    How come a file with this content works fine: <?xml version="1.0" encoding="utf-8" ?> <ns:Data xmlns:ns="http://natoil.com/xi/XI/TestFile"> <Name>Joe</Name> </ns:Data> But a file with this content gives a mapping exception: <?xml version="1.0" encodi

  • Require Adobe AIR 2.5 all Package

    Hii, i want to develop applications for android using flash cs5, i have gone through blogs which gives me useful information regarding how to develop android applications using flash cs5. i was tried to use adobe air 2.6. , but as we know adobe air 2

  • Cannot download installation file

    Hi, I am trying to synchronize MI Client with MI Server to download application EASYTORUN on MIClient.The application is successfully uploaded through Webconsole and assigned to User with particular Device ID. I am getting following Error on MIClient