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

Similar Messages

  • Syntax for sum in Smart Form based on Selection criteria in Program.

    Hi,
    We have created smart form for printing confirmation entries in desired format. We have given some selection criteria in the program. Now, we want to do the sum of certain fields in the smart form based on selection criteria given in program and selection screen.
    But we are getting wrong sum in the smart form than expected.
    When we debug the program during run time, we are getting correct records as per our expectations. But result of sum in the out put is not as per given selection criteria.
    Do we need to establish link between "select option" and "Smart form"? How can we use internal table created for select option in the smart form?
    Thanks & regards
    Vijay

    Hi,
    There will be no option to sum the values in smartforms, You just have to sum and append the data to internal table and display the internal table data in the form.
    Regards,
    Satish

  • 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

  • How to change the font of variables in smart forms dynamicly

    Dear all,
    Is there any suggestion of how to change the font of variables in smart forms dynamicly?
    Thanks in advance.

    Hi,
    You cant change the font dynamically but tell me the scenario I will try to give the solution.
    Regards,
    Nageswar

  • 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

  • Smart forms - Dynamic sizing of the windows.

    Hi gurus, iam working on smartforms, i have a problem.
    My requirement is: Printing a table data on the smart form. Is the window which prints this table data is resized with the amount of table data, if so, what is the procedure i should follow for to print this data in the window.
    Please give me the steps to go with the above issue. iam new to smartforms. what is the size of the window i should give in the Form painter and what all the attributes i should declare.
    Plz give a detailed explanation..
    Regards,
    chaitanya

    Hi Chaitanya.
    I would like to suggest a few references,
    [SDN - Reference for Smart form - setting dynamic window height  |Smart form-setting dynamic window height;
    [SDN Library - Standard Reference - Dynamic Window Height - SMARTFORM Tutorial|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d937ec90-0201-0010-0ca8-b6cb3b6dd1ef]
    Hope that's usefull.
    Good Luck & Regards.
    Harsh Dave

  • Possible to generate graphics within smart forms dynamically like SVG ?

    Hello,
    I would like to generate a graphic for a smart form. This graphic will only be needed in the smart form. Therefore my question:
    It is <b>possible to generate dynamically graphics using ABAP</b> as programming language? In the same line like SVG (Scalable Vector Graphics) or ChartDirector? I know it works in many other programming languages.
    Smart forms can handle *.bmp and *.tif picutres. Therefore the output of this ABAP program should be a picutre within the format *.bmp and *.tif.
    Daniel

    Welcome to SDN,
    I am not sure whether you can use SVG in smart form, but certainly in ABAP yes. check out the following atricle for more info.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sapportals.km.docs/documents/a1-8-4/how to generate and display svg graphics in abap,%20Part%201.article
    Regards
    Raja

  • Tray selection when printing

    Hello,
    I'm using the folowing code to select a printer I want, and later I use this priner to print a document.
    services3 = PrintServiceLookup.lookupPrintServices(null, null);
    AttributeSet aset3 = new HashAttributeSet();
    aset3.add(new PrinterName("\\\\SSBE107208\\" + printerName, null));
    services3 = PrintServiceLookup.lookupPrintServices(null, aset3);
    I actually need to select the right tray in my java program. Is this possible??

    hi,
    Did u find out how to select the required tray?
    PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
    aset.add(MediaTray.BOTTOM);
    doesnt seem to work..it always selects from the default tray. I am trying to print to Brother HL6050DN printer and must select the bottom tray for printing. If u had found a way to select the tray, can u share it here?
    Message was edited by:
    rkveena

  • 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

  • SMART Form, Right Side not getting Printed, "Print Preivew Fine"

    Hi
    We are facing an issue while Printing a Smart Form,
    Printer Device Type : HPLJ8000
    Document Type : Customized Smart Form
    Print Prieview : Fine
    Print Format : DINA4
    Initially the Printout was fine, however the Left side of the Form is not having enough margin, as a reason the ABAPer have moved 3 mm to the right , now we have problem on the Right side, however the ABAPer says its not form issue as the print preview is fine, I am looking out to know the Possible changes I can do from Basis End,
    We have tried changing the SAP scipt and additoinal Print parameters for this print changed " Horiziontal and Vertical Shift " and we restarted the printer ever we change , and this dont make the Form Better,
    Any suggestions are appriceiated
    Regards

    yes .....I solved....got the answer

  • How to show image in Smart Form dynamically , Image is stored on local PC

    Hi All,
    I have a requirement where user can attach any image to PM Order in T-code IW33. Now this image  gets stored on user`s local PC.
    After this user will generate a report which is a Smart form, On this Smartform i have to show that attached image.
    So that image will contain Order Id and attached image.
    How this can be achieved.
    Regards,
    Abhishek

    Actually this Image(Image of Signature ) will be coming from Mobile device and then it will be stored as an attachment for an PM Order.
    So there will not be any manual interuption and therefore no one will be storing this in se78. But this image gets stored in local PC. And now i have to get this image on my Smartform.
    Any idea how to do it?
    Regards,
    Abhishek

  • How do u get New page in Smart form dynamically

    How do u get New page in Smart form dynamically

    page break in smart form
    Re: New Page in Smart Forms
    Page break inside a loop  in smart form

  • 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

  • Automatic tray selection for printing

    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
    Is this possible in SAP? (version 4.6c)
    Is there a dependency on the printer/model
    Thanks,
    Lakshmi.

    Hi,
    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 <b>367128</b> and apply the OSS note which is applicable for release 4.6 C.
    <b>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.</b>
    <b></b>
    I hope this should resolve your issue.
    Thank you.
    Regards,
    Karuna.M

  • 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

Maybe you are looking for

  • How to query on multiple fact tables ?

    Hello all, I know this is a recurring subject around here. I have read various topics and tried many thing but I couldn't reach my goal : I want to query a BMM with 6 fact tables that all have common dimensions. For instance, I have Invoices facts, S

  • IPod Video plays w/no audio

    Recently i downloaded videos and saved them to my iTunes. once i converted the video and syced into my iPod, you could not hear the music of that video and not on the iTunes. But the original video did play with audio. How do i get the converted vers

  • To show data corresponding to the Largest Week

    Hello, In the query I need to show the Order Qty for different products for the Largest Week. How can this be achieved, the query is based on Cube. Thanks & Regards, Sumita

  • I enabled iTunes Plus accidentally and now I can't disable it

    What do I do?

  • PIM Simple search is not retrieving existing items

    I can query for items in Mtl_system_items_b. When I am querying for the same items using simple search in PIM Super user for the same organization, it shows no results found. Please let me know what could be the reason for this. Edited by: 924162 on