Skip to Content
author's profile photo Former Member
Former Member

call transaction doubt?

hi experts,

I want to call a transaction and to invoke a function code in the called transaction without any user interaction. Is it possible to use <b>call transaction "Tcode" </b>statement and pass a fuction code along with it. else suggest me how to over come this problem.

with regards,

James....

valuable answers will be rewarded..........

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Apr 23, 2007 at 11:36 AM

    Is it a standard SAP transaction. If not you could add a hidden input field on the transaction screen and populate that.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 23, 2007 at 11:36 AM

    check this addtion of the CALL TRANSACTION statement

    AND SKIP FIRST SCREEN

    Effect

    This addition suppresses the display of a screen of the initial dynpro of a called dialog transaction. The addition AND SKIP FIRST SCREEN suppresses the first screen under these prerequisites:

    For the initial dynpro, in the Screen Painter the own dynpro number must not be specified as the next screen number.

    All mandatory input fields of the initial dynpro must be filled completely and with the correct values by the SPA/GPA parameters

    If these prerequisites are met, that screen of the dynpro is displayed that is specified in the Screen Painter as the next dynpro of the initial dynpro.

    Example

    If the static next dynpro of the initial dynpro of the called dialog transaction FLIGHT_TA is not the initial dynpro itself, its screen is suppressed, because its input fields are filled using the SPA/GPA parameters CAR and CON.

    DATA: carrid TYPE spfli-carrid,

    connid TYPE spfli-connid.

    ...

    SET PARAMETER ID: 'CAR' FIELD carrid,

    'CON' FIELD connid.

    CALL TRANSACTION 'FLIGHT_TA' AND SKIP FIRST SCREEN.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 23, 2007 at 11:39 AM

    this is one more addtion of the CALL TRANSACTION statement

    ... <b>USING bdc_tab [bdc_options]</b>

    Effect

    Use this addition to pass an internal table bdc_tab of row type BDCDATA from the ABAP Dictionary to a dialog transaction. The additions bdc_options control the batch input processing. When a transaction with addition USING is called, the system field sy-binpt is set to value "X" in the called program - while this transaction is running, no other transaction can be called with this addition.

    The internal table bdc_tab is the program-internal representation of a batch input session and must be filled accordingly. The structure BDCDATA has the components shown in the table below.

    Component Description

    PROGRAM Name of the program of the called transaction

    DYNPRO Number of the dynpro to be processed

    DYNBEGIN Flag for the beginning of a new dynpro (possible values are "X" and " ")

    FNAM Name of a dynpro field to be filled or batch input control statement, for example, to position the cursor

    FVAL Value to be passed to the dynpro field or to the control statement

    Using the internal table bdc_tab, you can provide any number of screens of the called transaction with input and user actions.

    System Fields

    sy-subrc Description

    0 The batch input processing of the called transaction was successful.

    < 1000 Error in the called transaction. If within the transaction a message was sent, you can receive it using the addition MESSAGES.

    1001 Error in batch input processing.

    Note

    Outside of ABAP Objects you can specify the additions AND SKIP FIRST SCREEN and USING together. However, this does not make sense, because the addition AND SKIP FIRST SCREEN is desigend only to fill the mandatory input fields using SPA/GPA parameters, while the batch input table specified with USING controls the entire transaction flow including the display of the screens.

    Example

    Call of the Class Builder (transaction SE24) and display of class CL_SPFLI_PERSISTENT. The internal table bdcdata_tab contains the input for the batch input processing of the first dynpro (1000) of the transaction. Using structure opt, the batch input processing is set to suppress the first screen and to display the next screen in the standard size.

    DATA class_name(30) TYPE c VALUE 'CL_SPFLI_PERSISTENT'.

    DATA: bdcdata_wa TYPE bdcdata,

    bdcdata_tab TYPE TABLE OF bdcdata.

    DATA opt TYPE ctu_params.

    CLEAR bdcdata_wa.

    bdcdata_wa-program = 'SAPLSEOD'.

    bdcdata_wa-dynpro = '1000'.

    bdcdata_wa-dynbegin = 'X'.

    APPEND bdcdata_wa TO bdcdata_tab.

    CLEAR bdcdata_wa.

    bdcdata_wa-fnam = 'BDC_CURSOR'.

    bdcdata_wa-fval = 'SEOCLASS-CLSNAME'.

    APPEND bdcdata_wa TO bdcdata_tab.

    CLEAR bdcdata_wa.

    bdcdata_wa-fnam = 'SEOCLASS-CLSNAME'.

    bdcdata_wa-fval = class_name.

    APPEND bdcdata_wa TO bdcdata_tab.

    CLEAR bdcdata_wa.

    bdcdata_wa-fnam = 'BDC_OKCODE'.

    bdcdata_wa-fval = '=CIDI'.

    APPEND bdcdata_wa TO bdcdata_tab.

    opt-dismode = 'E'.

    opt-defsize = 'X'.

    CALL TRANSACTION 'SE24' USING bdcdata_tab OPTIONS FROM opt.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Apr 23, 2007 at 11:39 AM

    Hi James

    I would look at the

    CALL TRANSACTION ta [USING bdc_tab [bdc_options]] }.

    option for this purpose.

    Regards

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 23, 2007 at 11:40 AM

    Hi James,

    you can use CALL TRANSACTION 'T_CODE' statement to fulfill your requirement.

    Regards,

    Suresh

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.