Multiple smartform call in a single custom program

Hi,
I have a custom program from where i have to call A4 and A3 size smartforms. If i use SSF_OPEN and then call to smartforms and SSF_CLOSE it gives me error like previous martform request is not completed.
Can anybody provide me the code how to call first A4 size smartform and then A3 size in a single call?
also is there a need to provide something called TRAY for printing the pages?
Regards,
Cooldeep

Did you set the NO_OPEN field and the NO_CLOSE field of the control structure for every called form between SSF_OPEN and SSF_CLOSE. (*)
But are you sure it is possible (and advisable) to merge two form spools of different format (2 different trays) in a single print request ? (**)
Regards,
Raymond
(*) ref [Printing Several Forms in One Print Request|http://help.sap.com/saphelp_nw04/helpdata/en/64/bf2f12ed1711d4b655006094192fe3/frameset.htm]
(**) Also check your parameters and compare with sample report SF_EXAMPLE_03

Similar Messages

  • How to include multiple image components into a single custom component???

    How to include multiple image components into a single custom component???

    Hi Marcel,
    an ABAP transaction can only run or at least be started on one single system. A portal transaction can be assigned using a URL. This doesn't need any logical component.
    Regards
    Andreas

  • How to call two smartforms with using a single print program

    Hi,
       I have a requirement wherein I need to call two smartforms using a single print program.
       The interface parameters are different in two smartforms.
       I presently solved the issue using the smartform names as the reference.
       Can anyone let me know if there is any other way to solve it.
       I heard something about global params. But not sure.
       Please let me know the best possible way to solve this issue.
    Thanks and Regards,
       Debabrata

    Hi Debabrata,
    Based on the condition in your print program you can call the below code
    fname1 TYPE rs38l_fnam.
    IF -
    call function 'SSF_FUNCTION_MODULE_NAME'
      exporting
        formname                 = 'ZSMARTFORMS'
    importing
       fm_name                  = fname1
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.*
    CALL FUNCTION FNAME
    EXPORTING
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB      =
      ARCHIVE_PARAMETERS =
      CONTROL_PARAMETERS=
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT              =
      MAIL_SENDER                 =
      OUTPUT_OPTIONS           =
      USER_SETTINGS             = 'X'
    IMPORTING
      DOCUMENT_OUTPUT_INFO =
      JOB_OUTPUT_INFO             =
      JOB_OUTPUT_OPTIONS      =
    EXCEPTIONS
      FORMATTING_ERROR         = 1
      INTERNAL_ERROR              = 2
      SEND_ERROR                    = 3
      USER_CANCELED              = 4
      OTHERS                             = 5
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ELSE.
    fname2 TYPE rs38l_fnam.
    call function 'SSF_FUNCTION_MODULE_NAME'
      exporting
        formname                 = 'ZSMARTFORMS'
    importing
       fm_name                  = fname2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.*
    CALL FUNCTION FNAME
    EXPORTING
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB      =
      ARCHIVE_PARAMETERS =
      CONTROL_PARAMETERS=
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT              =
      MAIL_SENDER                 =
      OUTPUT_OPTIONS           =
      USER_SETTINGS             = 'X'
    IMPORTING
      DOCUMENT_OUTPUT_INFO =
      JOB_OUTPUT_INFO             =
      JOB_OUTPUT_OPTIONS      =
    EXCEPTIONS
      FORMATTING_ERROR         = 1
      INTERNAL_ERROR              = 2
      SEND_ERROR                    = 3
      USER_CANCELED              = 4
      OTHERS                             = 5
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDIF.

  • Multiple smartforms call for transfer order

    Hi All,
    I have a requirement to call multiple smartforms based on customer number from same print program.How i would define nace setting and also in my requirement i have to create a ztable that will contain customer number and smartform name,that means i need to pic smartform name from that ztable for corresponding customer.But my form will trigger from transfer order transaction.
    Could you please help in this regard.
    Thanks
    Mohit

    Hi ankur,
    NACE setting doesn't happen for LT31(transfer order) transaction.Setting somewhere defined in SPRO in WM module.My problem is the i need to create ztable that is recommended by client to maintain customer number along with smartform name.
    Thanks
    Mohit

  • Single invoice against multiple sales order for a single customer PO

    Hi all,
    Customer provide a single order via EDI per Depot.  When the order is received into SAP these are split into multiple order based on the Production or distrubtion location of the products. The customer will receive a number of deliveries to the depot from the various locations.  Each delivery has his own SAP sales order and delivery note.  This creates mutliple invoice against a single Purchase order sent by the customer.
    We have a requirement from two customers that they only wish to receive a single invoice per depot per day.   This means we need to change the way we currently invoice the customers(no multiple invoices needed).We need to be able to combine multiple deliveries with the same PO to a single invoice.  This would mean that the invoice can't be generated until all the deliveries relating to the single PO have been POD flagged or 7 days  have passed from PO date and invoicing is due.
    how to achieve the above,whether through user exit in billing or data transfer routine in copy control(delivery to billing) or through config and how ??
    regards
    sachin

    Hi Sachin,
    You will have to create a new data transfer requirement on the copy control between the delivery and the invoice. In the new data transfer requirement, you will need a programmer to code when there should be an invoice split.
    Regards,
    Finbarr

  • Calling Standard screen from custom program

    Hi all,
             My requirement is
    1)Either to fix a link(say from a button) on my custom screen for material creation,to call mm01 basic data screen for image upload.
    2) Or to upload material image directly to the corresponding table(using any fm or something).
    ,please show me light on the above issue.
    Thanks in advance
    Sri

    Hi Jovito,
    I also think the same that it's not possible. Now my issue is how to get my requirement.
    FYI..
    To open Classification screen directly we have a function module CLFM_OBJECT_CLASSIFICATION. But if I want to open IA06
    Inspection characterstics screen we don't have any FM or API to do the same.
    So how will I get my requirement done. That why I use the BDC call transaction to open IA06 Insp. characterstics screen but here I am facing this Back issue.
    Please advice if there is any suggestion.

  • Transfer GOS Attachment (Single/Multiple) from custom program to XK01

    Hi,
    GOS - Generic Object Service is a way one can attach single / multiple attachment. I have a custom program where there is a GOS with some attachment (used CL_GOS_MANAGER class).
    Next I need to send / transfer this GOS attachment from my custom program to say a standard transaction , eg XK01.
    Whether we can achieve this functionality, ie. we are able to create/save attachment but is there a way to send attachment (not via email) such that the same attach itself to the GOS of the standard transaction. I don't see any method in the CL_GOS_MANAGER class by which we can achieve this!
    Any suggestion/solution will be highly appreciated!
    Thanks,
    Deb

    Hi,
    I am trying to send attachment linked to a custom BO to standard BO eg, LFA1 using 'GOS_SERV_TOOLS_TEST' (copy_linked_objects).
    Surprisingly, I am able to copy/send attachment list within same BO (LFA1) from one LIFNR to another LIFNR. But the same method does not work when I try to copy attachment between diff BO example from VENDOR BO to MATERIAL BO. Why is it so?
    Also it does not work between a custom BO & standard BO. Please suggest in case I am missing on anything!
    Thank,
    Deb

  • How to create Multiple Address for a single customer

    Respected Members,
    In tcode Xd01 we create on customer but there we can maintain only one address but sometimes a scenario can be that single customer can have different address .
    How to do that.Any exit is available to create multiple address with creation of single customer.
    This provision is given while creating a Business Partner.Tcode is BP .In this Address Overview tab is there and you maintain multiple address to single Busines partner.
    Same thing can we do for the customer.
    Any solutions or suggestions,please give me your support.
    Thanks

    Hello Manish,
    Unfortunately Customers have only one address. However you can use contact persons to store different addresses, or (in the Sales view) you can assign other partner functions with different addresses (e.g. one customer acting as the Sold-to partner may have different Ship-to partners).
    If these options do not meet your requirements, you could extend the customer master data with your own functionality and enhance transaction XD01 with your own screens for holding alternate addresses.
    Regards,
    John.

  • Calling multiple smartforms in a single driver program.

    Hi ,
    Can anybody tell me how can I call multiple smartforms in a single driver program.
    Each form has been assigned a output type.
    Regards,
    Sudha.V

    Hi,
    Here i  have 2 smartforms assigned to different OUTPUT TYPES
    Use this way
    IF nast-kschl = 'FUCI'  .
        ci_form = 'ZLAYOUT'.
      ELSEIF nast-kschl = 'RD04'.
        ci_form = 'ZLAYOUT01'.
      ENDIF.
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          formname           = ci_form
        IMPORTING
          fm_name            = fnam
        EXCEPTIONS
          no_form            = 1
          no_function_module = 2
          OTHERS             = 3.
    AFter this call the smartforms based on the output type
    Please closeif solved,
    Thanks,
    Aditya
    Edited by: aditya on May 21, 2008 6:15 PM

  • Can we call multiple Smartforms from single Driver Prog?

    Hi all,
    Can we call multiple smartforms from single Driver Program. Here Driver program is custom Program.
    I want to give Print Parameter only once and output should get printed one after the another smartform in same order of smarforms were called.
    If yes, then how?
    Thanks in advance.

    Yes, you can do this in your Smartform driver program.
    Each time you call you Smartform function module you will need to change the values in structure OUTPUT_OPTIONS slightly.
    On the first call set TDNEWID to X.
    After this, set it to space
    On the last form set TDFINAL to X.
    This will put all of the output into one spool request, in the order they are called in the program.
    Regards,
    Nick

  • Passing data to custom smartform from a custom program...

    Hello Gurus,
    Since, the function module gets generated dynamically at runtime when smartform is activated, I know that first I should use  "SSF_FUNCTION_MODULE_NAME" and pass custom smartform name to it to get the name of function module. Then I have to use call function '/XXXXXXXXX'.
    Now, I am writing a custom code and I want the data from my select program in custom program to be passed to smartform ? How can I pass the data from my custom program to smartform ? Do I pass it before using function module "SSF_FUNCTION_MODULE_NAME" ? If yes, how ?
    Regards,
    Rajesh.

    hi,
    u have to declare ur structures in form interface and can retrive the data from custom program.
    check this sample code.
    declare structure in interface.
    WA_MKPF TYPE MKPF.
    write ur custom code lik this.
    DATA: wahz TYPE zmemigo_form_header,
          wa_mkpf  TYPE mkpf.
    DATA: t_itemz LIKE zmemigo_form_item OCCURS 0,
          t_mseg   TYPE mseg OCCURS 0,
          waitemz TYPE zmemigo_form_item,
          waitem TYPE mseg.
    DATA : form_name TYPE tdsfname VALUE 'ZPS_STN'.
      DATA : fnc_module TYPE rs38l_fnam.
    SELECT SINGLE mblnr INTO wa_mkpf-mblnr FROM mseg
                CLIENT SPECIFIED WHERE  mandt EQ sy-mandt
                                   AND  mblnr EQ p_mblnr
                                   AND  mjahr EQ p_mjahr
                                   AND  bwart EQ '351'
                                   AND  shkzg EQ 'H'.
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          formname                 = form_name
        VARIANT                  = ' '
        DIRECT_CALL              = ' '
        IMPORTING
         fm_name                  = fnc_module
        EXCEPTIONS
         no_form                  = 1
         no_function_module       = 2
         OTHERS                   = 3
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
               WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      CALL FUNCTION fnc_module
        EXPORTING
          wa_headz         = wahz
          wa_mkpf          = wa_mkpf
        TABLES
          it_itemz         = t_itemz
          it_mseg          = t_mseg
        EXCEPTIONS
          formatting_error = 1
          internal_error   = 2
          send_error       = 3
          user_canceled    = 4
          OTHERS           = 5.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.

  • Calling multiple smartforms

    Hi All,
    My requirement is like this....
    Multiple smartforms are created by different programs..And now I want trigger all these smartforms with my program..Is it possible?
    When I tried to do like this it needs to come back and again print preview to go next smartform....Is is possible to call all the smartform at single execution.........
    Edited by: sundeep singh on May 30, 2008 9:06 AM

    g_output_options  TYPE ssfcompop, " Output Options for Smartform
    g_control_options TYPE ssfctrlop. " Control Options
    Control Options
      g_control_options-device    = 'PRINTER'.
      g_control_options-preview   = ''.
      g_control_options-no_dialog = 'X'.
    Output Options
      g_output_options-tdnoprev   = 'X'.
      g_output_options-tdimmed  = 'X'.
    Call Smartform
      CALL FUNCTION lv_fmname
        EXPORTING
        ARCHIVE_INDEX              =
        ARCHIVE_INDEX_TAB          =
        ARCHIVE_PARAMETERS         =
          control_parameters         = g_control_options
        MAIL_APPL_OBJ              =
        MAIL_RECIPIENT             =
        MAIL_SENDER                =
          output_options             = g_output_options
          user_settings              = ''  
    rwrd points if useful
    Bhupal

  • Single concurrent program for multiple operating units

    HI
    I am working on XML/BI publisher to generate AR invoice reports.
    We have single rdf report using which rtf templates are generated.
    There are 10 operating units (10 ORG_ID's) and 10 rtf templates, one for each operating unit. There are 4 different responsibilities for each ORG_ID
    Eg: ORG_ID's = 11, 12, 13, 14..........etc
    Eg: Responsibility = xx, yy, zz...........etc
    I want to register a single concurrent program. When a user submits a request from "XX" responsibility, then the template associated with that org_id should be generated. Whichever responsibility the user is accessing from, that particular template must be shown as output.
    How can i register one concurrent program for multiple operating units.
    Thanks!
    Edited by: 994628 on Mar 18, 2013 4:39 PM
    Edited by: 994628 on Mar 18, 2013 4:42 PM

    >
    There are 10 operating units (10 ORG_ID's) and 10 rtf templates, one for each operating unit. There are 4 different responsibilities for each ORG_ID
    Eg: ORG_ID's = 11, 12, 13, 14..........etc
    Eg: Responsibility = xx, yy, zz...........etc
    I want to register a single concurrent program. When a user submits a request from "XX" responsibility, then the template associated with that org_id should be generated. Whichever responsibility the user is accessing from, that particular template must be shown as output.
    >
    interesting case for 10 OE set 10 template
    what is purpose? for each OE different requirements for layout?
    BTW
    if each Responsibility associated with one org_id then
    - you can get current org_id when you run concurrent program
    - create main template (will be #11) with condition like
    <?choose:?>
    <?when: ORG_ID=11?>
    <?import:xdo://FND.XX11_SUB.en.00/?>
    <?call:TEMPLATE11?>
    <?end when?>
    <?when: ORG_ID=12?>
    <?import:xdo://FND.XX12_SUB.en.00/?>
    <?call:TEMPLATE12?>
    <?end when?>
    <?otherwise:?>
    <?import:xdo://FND.XX21_SUB.en.00/?>
    <?call:TEMPLATE21?>
    <?end otherwise?>
    <?end choose?>so based on org_id will be import of needed subtemplate
    - re-register your "10 rtf templates" as subtemplates
    another way is substitution of template for concurrent then it running
    in before_report trigger set needed template
    l_conc_request_id := fnd_global.conc_request_id;
        if ORG_ID = 11 then
          UPDATE fnd_conc_pp_actions t
             SET t.argument2 = 'XX11'
           where t.concurrent_request_id = l_conc_request_id
             and t.action_type = 6;
      if ORG_ID = 21 then
          UPDATE fnd_conc_pp_actions t
             SET t.argument2 = 'XX21'
           where t.concurrent_request_id = l_conc_request_id
             and t.action_type = 6;

  • Single spool for multiple smartforms

    Hi,
    I am using Function modules SSF_open and ssf_close for creating single spool for multiple smartforms but when i try to run the program in background then the job is getting cancelled...........and if i run the program in foreground then the program is running fine giving single spool for multiple forms........
    so the problem is that job should run in background if i run it in background instead job is getting cancelled.
    please tell me the solution how can i get the single spool for and multiple smartforms as well as the job should run if i am doing so.

    Moved to the correct forum

  • Printing Purchase Order from ME9F using custom program and smartform

    I was able to use my custom program which calls a smartform to print purchase orders from transaction ME9F. I did this using transaction NACE.
    However, when I call "Output Message" from ME9F, the output always fails (shown by an 'X' icon after the checkbox). When I try to put back the standard program in NACE, it does not show an 'X' but a check which indicates that the printing was successful.
    Do you know why this happens? What did I miss?
    Here's my call to my smartform from my custom driver program:
        " Change Smartform ZP_MMSF_P01_PURCHASE_ORDER
        " to internal Function module name
        CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
            EXPORTING
                FORMNAME   = 'ZP_MMSF_P01_PURCHASE_ORDER'
            IMPORTING
                FM_NAME    = fmname
        wa_cparam-no_dialog = 'X'.
        wa_output-tddest = 'LOCL'. "or 'LP01'.  "Spool: Output device
        CALL FUNCTION fmname
            EXPORTING
                control_parameters         = wa_cparam
                output_options             = wa_output
                i_data                     = i_data
                wa_lookup                  = wa_data_lookup
                goods_amt                  = goods_amt
                discount_amt               = discount_amt
                vat                        = vat
                total_amt                  = total_amt
                total_amt_inwords          = total_amt_inwords

    Vijaya,
    I have this problem though,
    Whenever I try to provide values for CONTROL_PARAMETERS and OUTPUT_OPTIONS to the sapscript call in your code, the PO printing (even the preview) does not proceed. I do this because I wanted to suppress the printer dialog.
    here is a fragment of the code:
    " code I added
    LS_COMPOSER_PARAM-tddest = 'LOCL'. "or 'LP01'.  "Spool: Output device
    LS_COMPOSER_PARAM-bcs_langu = sy-langu.
    LS_CONTROL_PARAM-preview = 'X'.
    LS_CONTROL_PARAM-no_open = 'X'.
    LS_CONTROL_PARAM-no_close = 'X'.
    LS_CONTROL_PARAM-device = 'PRINTER'.
    LS_CONTROL_PARAM-no_dialog = 'X'.
    DO NAST_ANZAL TIMES.
    *--In case of repetition only one time archiving
    * if sy-index > 1 and nast-tdarmod = 3.
    * nast_tdarmod = nast-tdarmod.
    * nast-tdarmod = 1.
    * ls_composer_param-tdarmod = 1.
    * endif.
    IF SY-INDEX NE 1 AND REPEAT IS INITIAL.
    REPEAT = 'X'.
    ENDIF.
    CALL FUNCTION LF_FM_NAME
    EXPORTING
    ARCHIVE_INDEX = TOA_DARA
    ARCHIVE_PARAMETERS = ARC_PARAMS
    CONTROL_PARAMETERS = LS_CONTROL_PARAM
    MAIL_RECIPIENT = LS_RECIPIENT
    MAIL_SENDER = LS_SENDER
    OUTPUT_OPTIONS = LS_COMPOSER_PARAM
    USER_SETTINGS = SPACE
    IS_NAST = NAST
    IS_REPEAT = REPEAT
    I tried to trace it to the function module generated by smartform. The error propagates this way: From the function module, there is a call to function SSFCOMP_PROCESS_DOCUMENT. Then inside that function, there is a perform operation to tr_ssfcomp_process_doc
    perform tr_ssfcomp_process_doc using startpage docstruc
                                           header.
    Inside that form, it calls the macro tr_active which checks the value of ssfcstat-trlevel (tracelevel) against c_trlevel_document. In the macro, if ssfcstat-trlevel is less than c_trlevel_document, the smartform will fail. c_trlevel_document is 15 and ssfcstat-trlevel is 0, and so the smartform fails.
    (you can see the macro tr_active in include LSTXBCMAC and the form tr_ssfcomp_process_doc is in the include LSTXBCFTR)
    When I do not put values in CONTROL_PARAMETERS and OUTPUT_OPTIONS, everything is ok.
    Do you know why this happens?
    Thanks in advance!
    Edit: I have found out about transaction SFTRACE, but this is disabled.
    Kyle

Maybe you are looking for

  • Can't Add Wireless Printer to Laptop

    I am trying to add a HP Officejet Pro x576dw MFP to my HP Probook 4530s .  Laptop runs Windows 7 Pro 64-bit. When I use the add printer feature, the printer shows up. I select it, then hit next.   The next step is to install the print drivers.  BUT,

  • How to unlock my sapuser  user account in sap r/3 system..

    Hello,                 I am a newbie to sap bw.I am practising sap bw with sap r/3.My user login account got locked becoz of password error.Now i know the correct password for the user sapuser.please advice me how can i relogin to my my sap bw. "It s

  • How to "loupe" thru images?

    I've used LR for a while now, and my basic workflow has always been: 1.  Import images from my SD card into LR 2.  Review the imported images in LR using the Loupe view and the right (and left) arrow keys For some reason this does not work anymore. H

  • Not recieved certificate

    Hi all, I cleared IZO-147 exam on 27th August 2009 but till not I could not receive the certificate. Could you suggest whom I should contact to get the status of it. Regards Salil Verma

  • Prioritize data on one SSID on an autonomous AP with multiple SSIDs

    Hello, I have a standalone AP(AP1261N) which is configured with 3 SSIDs.I would like to prioritize any data flow on SSID 1 for example so that users on SSID 1 are always functional independent on what is happening on the other SSIDS. Then have the SS