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.

Similar Messages

  • Calling two smartforms in one Abap program

    Hi ABAPers,
    Can anybody know how to call 2 smartforms in 1 abap program?actually i used the FM SSF_FUNCTION_MODULE_NAME...and two smart forms are called...but my main problem is...the first smartforms is called and the print dialog box appeared...once i click the button back ...the second smartforms is called and print dialog box appeared again..
    I want to correct this...i want this  to be happen once i click the print button...the two smart forms will be combined in a one printing...meaning the first page is the first smartforms and the next page will be the second smart forms...no matter how many pages will be the first smartforms...the second smartforms will concatenate or will append to the last page of the first smartforms..how can i do this?
    Please help...this is my sample code..kindly correct the error.
    Will reward points...
    suppressing the dialog box****************************
        outop-tddest = 'LP01'.
        cparam-no_dialog = 'X'.
        cparam-preview = space.
        cparam-getotf = 'X'.
    Call the First Smartforms *******************
       CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
          EXPORTING
            formname           = 'ZSF_CHEQUE'
          IMPORTING
            fm_name            = ly_formname
          EXCEPTIONS
            no_form            = 1
            no_function_module = 2
            OTHERS             = 3.
        CALL FUNCTION ly_formname
          EXPORTING
            prepared_by      = p_prepb
            approved_by      = p_apprb
          TABLES
            it_cheque        = it_final
          EXCEPTIONS
            formatting_error = 1
            internal_error   = 2
            send_error       = 3
            user_canceled    = 4
            OTHERS           = 5.
    Call the Second Smartforms *******************
          CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
          EXPORTING
            formname           = 'ZSF_TSHEET'
          IMPORTING
            fm_name            = ly_formname
          EXCEPTIONS
            no_form            = 1
            no_function_module = 2
            OTHERS             = 3.
        CALL FUNCTION ly_formname
          EXPORTING
            prepared_by      = p_prepb
            approved_by      = p_apprb
          TABLES
            it_cheque        = it_final
          EXCEPTIONS
            formatting_error = 1
            internal_error   = 2
            send_error       = 3
            user_canceled    = 4
            OTHERS           = 5.
    Thanks in advance
    aVaDuDz

    hi,
    i never used these function but i've found this link.
    [http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/62ae7fcd-0b01-0010-3e9d-a54f26944450]
    [http://help.sap.com/saphelp_nw2004s/helpdata/en/64/bf2f12ed1711d4b655006094192fe3/content.htm]
    [http://help.sap.com/saphelp_nw04/helpdata/en/64/bf2f12ed1711d4b655006094192fe3/frameset.htm]
    [SMartform printing;
    hope that is useful.
    bye
    Marco
    Edited by: nicolai marco on Jan 14, 2008 12:36 AM

  • How to call our smartform in standard report

    Hi friends,
    How to call Zee smartform from standard report without affecting stadard flow.
    Thanks,
    Yogesh

    Hi,
      do it this way.
    in the ALV function call
    give in
    exporting
    I_CALLBACK_USER_COMMAND = 'user_command '
    write a subroutine
    FORM user_command USING whatcomm TYPE sy-ucomm whatrow TYPE
    slis_selfield.
    case whatcomm.
    when 'print'.
    call 2 function modules here
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING FORMNAME = P_FORM "Your form name
    variant = ' '
    direct_call = ' '
    IMPORTING FM_NAME = FM_NAME
    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.
    EXIT.
    ENDIF.
    calling the generated function module
    CALL FUNCTION FM_NAME
    EXPORTING
    ARCHIVE_INDEX =
    ARCHIVE_INDEX_TAB =
    ARCHIVE_PARAMETERS =
    CONTROL_PARAMETERS = CPARAM
    OUTPUT_OPTIONS = OUTOP
    USER_SETTINGS = SPACE
    MAIL_APPL_OBJ =
    MAIL_RECIPIENT =
    MAIL_SENDER =
    IMPORTING
    JOB_OUTPUT_INFO = TAB_OTF_DATA
    DOCUMENT_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.
    endcase.
    endform.
    This is an example in the function gereated call give you own importing and exporting parameters.
    Regards
    Kiran Sure

  • How to call a Smartform in Report to print Production Order

    Hi all,
    Can any one tell me how to develop a smartforms when the user selects the print button in ALV report.
    i.e, The requirement is when  the user presses the print button in ALV report, at that time it has call the smartform and it has to print the Report.
    Can any one shed some light on this.
    Regards
    Yathish

    Hi Yathish
    do it this way.
    in the ALV function call
    give in
    exporting
      I_CALLBACK_USER_COMMAND           = 'user_command '
    write a subroutine
    FORM user_command USING whatcomm TYPE sy-ucomm whatrow TYPE
    slis_selfield.
    case whatcomm.
       when 'print'.
          call 2 function modules here
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
           EXPORTING  FORMNAME           = P_FORM    "Your form name
                    variant            = ' '
                    direct_call        = ' '
           IMPORTING  FM_NAME            = FM_NAME
           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.
        EXIT.
      ENDIF.
    calling the generated function module
    CALL FUNCTION FM_NAME
    EXPORTING
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
    CONTROL_PARAMETERS   = CPARAM
       OUTPUT_OPTIONS       =  OUTOP
      USER_SETTINGS        = SPACE
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
    IMPORTING
      JOB_OUTPUT_INFO      = TAB_OTF_DATA
      DOCUMENT_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.
    endcase.
    endform.
    This is an example in the function gereated call give you own importing and exporting parameters.
    Kindly reward points if helpful.
    Regards
    Zarina

  • How to call two different servlet-url in the same application

    Hi,
    I want to call, consecutively these methods in my application.
    response.sendRedirect(servlet-url1)
    reponse.sendRedirect(servlet-url2)
    but the second method dont answer,
    I think, the first method redirect s with response ,
    but how to call two different servlet ?
    thanks

    if you call the first redirect, the servlet is getting aborted, so you can redirect to the first servlet, working the stuff in it, and then in the second servlet you can redirect to the third servlet

  • How to call two RFC in a single JAVA method.

    Dear all,
    I just want to know that how to call two RFC in a single java method which is defined in CRM implementation file. I'm using NWDS as the customization IDE & working on ISA 7.0.

    Hi Sunil,
    In the Backend Implementation class, in any method you can call multiple RFCs.
    It will be the same way as you do for the single RFC call.
    Following syntax is for your reference.
    Get the JCO connection
    JCoConnection  connection = getDefaultJCoConnection();
    JCO.Function func = connection.getJCoFunction("ZXXXXXXX");
    set the import parameters
    Execute it.
    connection.execute(func);
    get the data from export / table parameters
    Now call the second RFC
    func = connection.getJCoFunction("ZYYYYYYYYYY");
    set the import parameters
    Execute it.
    get the data from export / table parameters
    close the connection
    Hope this will help you.
    -Chandra.
    Edited by: Chandra Sekhar Seeli on Jan 13, 2011 2:04 PM

  • How to call standard report with in zprogram?

    Hi Sap experts,
    How to call standard report with in zprogram.
    For example if country is 'US' then call Zprogram(zprog_US).Inside zprogram call standard report(rhecm_change_proc_status).If country is 'CA' then call zprogram.Inside zprogram call standard report.For same othercountres like 'PR','GB','ES'.Actually HR_ECM_READ_FEATURE_CARGP will having the input as employee id and will return the CAREA(County like 'US','PR'......).Kindly help me what is the procedure?
    Regards,
    Sujan

    >
    sujan T wrote:
    > Thanks for your reply.
    >
    >    What is the logic to call the standard report from zprogram?Inside the zpogram how to call standard report?
    >
    > Regards,
    > Sujan
    no special logic is required
    If u want to use
    RPUAUDOO IN THE ZREPORT.
    Put the submit button where ever required
    ex: In zreport after certain process reacedu want to call then use
    submit rpuaudoo and return.
    Regards
    Sas

  • How to call a transaction with a variant

    Hi all
    I created a bdc program after updating it should call another transaction with predefined variant that that transaction program is of type module pool.
    can anyone tell me the syntax how to call a transaction with a variant.

    Hi
    goto Tcode SHD0
    enter the Tcode for which Tran Variant has to be created(dialog Tcode)
    enter Trans variant to be created
    press create button
    it will go through all the screens of that Tcode and save
    and modify the fields as per requirement
    we can create Transaction Variants Using SHD0 Transaction.
    Transaction Variants and Screen Variants
    Transaction variants can simplify transaction runs as they allow you to:
    Preassign values to fields
    Hide and change the 'ready for input' status of fields
    Hide and change table control column attributes
    Hide menu functions
    Hide entire screens
    In particular, hiding fields in connection with screen compression, and hiding screens, can result in greater clarity and simplicity.
    Transaction variants are made up of a sequence of screen variants. The field values and field attributes for the individual screens found in transaction variants are stored in screen variants. Each of these variants is assigned to a specific transaction, can, however, also contain values for screens in other transactions if this is required by transaction flow. The transaction that the variant is assigned to serves as initial transaction when the variant is called.
    There are both client-specific and cross-client transaction variants. All screen variants are cross-client, but may be assigned to a client-specific transaction variant.
    A namespace exists for cross-client transaction variants and screen variants and both are automatically attached to the Transport Organizer. Client-specific transaction variants must be transported manually.
    In principle, transaction and screen variants can be created for all dialog and reporting transactions. There are, however, certain Restrictions that apply to certain transactions, depending on their internal structure.
    No transaction variants are possible with transactions already containing preset parameters (parameter transactions and variant transactions).
    Regards
    Anji

  • Calling two Business service using split join in osb

    Hi,
    While trying to call two business service using Split Join in osb i am getting selection failure message in Bpel em console. i am using invoke activity to invoke the BS and assign to assign the input. in the assign i am assigning *$request.payload/input* to input.payload . In the em console i am getting input like this
    receiveInput
    Jun 19, 2012 5:05:45 PM Received "process" call from partner "bpelprocess1_client"
    <payload>
    <inputVariable>
    <part name="payload">
    <client:process>xxxxx</client:process>
    </part>
    </inputVariable>
    Assign (pending)
    Jun 19, 2012 5:05:48 PM Error in evaluate <from> expression at line "65". The result is empty for the XPath expression : "/client:process/client:input".
    <payload>
    <client:process>xxxxxx</client:process>
    Jun 19, 2012 5:05:48 PM The following exception occurred while attempting to execute operation copy at line 63
    <payload>
    <bpelFault>
    <faultType>0</faultType>
    <selectionFailure/>
    </bpelFault>
    Jun 19, 2012 5:05:57 PM "BPELFault" has not been caught by a catch block.
    Jun 19, 2012 5:06:00 PM The transaction was rolled back. The work performed for bpel instance "650002" was rolled back, but the audit trail has been saved for this instance.If this is a sync request, please resubmit the request from the client. If it is an async request, please recover from the recovery console by resubmitting the invoke message.
    Can anyone help on this?
    Thanks in Advance...

    maybe this one helps a bit, it's the same pattern
    http://www.xenta.nl/blog/2011/07/03/oracle-service-bus-implementing-aggregator-pattern-by-use-of-split-join/
    if you're using a dynamic split join easiest way is to do something like
    assing <yourresponse/> to $response
    at this moment your assign an empty placeholder to the response variable
    now you go into the for-each looping and for each iteration you need to insert the response of your bpel call in the $response variable
    so in the looping as last step you add something like
    insert $mybpelresponse/rootelement into $response/yourresponse
    with the insert it will insert the reponse 1..x times into the $response variable (so actually aggregating all the responses for you)

  • How to write a messenger with using java?

    May I know how to write a messenger with using java? The messenger need included two functions which are file transfer and add users to join the conversation.
    Thank you.

    Ok, so you need to start from the beginning, the requirements, is it a swing (i.e. GUI) app, web app, console, etc...?
    As stated by sprizor making an IM client is no easy task, you need to both implement the server side and the client side, which both communicate with each other, file transfers are also quite complex, and even maintaining a multi-user chat can be quite difficult.
    If you are after a Web Based app, then you will need to look into Push technologies, like Grizzly Comet which is a nice wrapper for the NIO java stuff:
    https://grizzly.dev.java.net/
    Good luck...

  • How to call java function with parameter from javascript in adf mobile?

    how to call java function with parameter from javascript in adf mobile?

    The ADF Mobile Container Utilities API may be used from JavaScript or Java.
    Application Container APIs - 11g Release 2 (11.1.2.4.0)

  • How to call PDF Report with parameters in jdeveloper 10.1.3

    Hi all,
    how to call PDF Report with parameters in jdeveloper 10.1.3
    for example I have Report name is repdept.pdf with parameter as deptno
    and I want call this Report from JSP page ?
    thanks
    frank

    Hi all,
    how to call PDF Report with parameters in jdeveloper 10.1.3
    for example I have Report name is repdept.pdf with parameter as deptno
    and I want call this Report from JSP page ?
    thanks
    frank

  • How to sync two IPhone with one PC , but with different applications

    How to sync two IPhone with one PC , but with different applications ?
    We have two IPhones , but one PC , we want to sync separately , is that possible ?

    Absolutely, connect each phone, select what content you want on each phone, then hit the sync button. iTunes will keep everything straight, by device, upon subsequent syncs, including separate backups.

  • How to call a stored procedure using its package name in Oracle

    hi
    we're doing a JDBC scenario where we call a stored procedure(a.prc) using its package name(b)The stored procedure has In /Out/IN-OUT parameter.
    i have got 2 queries:
    1- How to call the stored procedure using it's package.
    2- How to capture the In/Out parameter in the response.

    hi Prateek
    thanks for the reply.
    However when i tried mapping it to Package.procedure, communication channel throws the error saying that Package.proceudre needs to be declared.
    As i said , the procedure has IN-OUT parameter too.In oracle we need to write a block if we want to read the IN-OUT parameter.
    How to get the IN-OUT parameter in XI?

  • How to call a form with dabble clicking on a record with one time where

    Hi All,
    How to call a form with dabble clicking on a record with one time where clause. I mean when i dabble click on the current record i want to call another form with details of the
    record with onetime where clause. Can anyone help me in this regard.
    Now i am calling a form with parameter with onetime where but this should avoid.
    Thanks in advance
    Arif

    Hello,
    I mistakenly mark it as solved. There is a problem remain. when i placed the code below it do not execute with the where condition. I mean the condition to execute is not work.
    All records executes. Please correct my code--
    Here the WHEN-BUTTON-PRESSED-trigger on the Edit-Button:
    :GLOBAL.MODE:='EDIT';
    :GLOBAL.REQ_ID:=:PROBLEM_REQUEST.REQ_ID;
    CALL_FORM('REQUEST_ID_PARAM',NO_HIDE,DO_REPLACE,NO_QUERY_ONLY);And also, WHEN-NEW-FORM-INSTANCE-trigger of REQUEST_ID_PARAM:
    DEFAULT_VALUE(NULL, 'GLOBAL.MODE');
    DEFAULT_VALUE(NULL, 'GLOBAL.REQ_ID');
    IF :GLOBAL.MODE='EDIT' THEN
    GO_BLOCK('PROBLEM_REQUEST');
    EXECUTE_QUERY;
    SET_BLOCK_PROPERTY('PROBLEM_REQUEST', INSERT_ALLOWED, PROPERTY_FALSE);
    END IF;Arif

Maybe you are looking for

  • All of my songs do not show up in the "Artist" list of my iPod Video

    I can't figure this out and see no reference to it anywhere. On my iPod I have roughly 4,000 songs. Occassionally I think of a song I want to hear by a particular artist and when I to to Music>Artist>whoever, not ALL of their songs on my iPod will sh

  • How to ignore DOCTYPE when parsing xml java?

    Hello i am trying to parse some sml files that have: <!DOCTYPE ModuleRoot SYSTEM "C:\xxx\xmlapp.dtd"> i don;t have the dtd file how can i ignore it by changing my code and not changing the xml file. DocumentBuilderFactory documentBuilderFactory = Doc

  • Registration not marked as green

    Hi there, I have used LR 3 as trial version. After having ended I purchased full licence and entered license key - got green marking. I have countinued with registration data and sent them. I obtained in that form that the data were succesfully sent

  • Process Chains creation in support

    Please search the forums before posting on how to transport process chains Dear Friends, i have created process chains in DEV. how to transport Process chains to support? is it possible to create Process chains in Support? Regards ramana Edited by: A

  • IOS 7 update on 3rd gen.

    I thought I was suppose to get iWork and iPhoto and iMovie when I updated to iOS 7??? I'm so disappointed, I feel as though I was lied to :( is there anyway that I can still get them free or was never supposed to?