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

Call Transaction

Hi.

I want to call transaction SP01 by passing the spool number.

But the problem is that there is no Parameter ID assigned to that field so that I can use SET parameter ID.

So is there any other way I can use Call Transaction SP01 without setting the parameter ID.

Also please note that I cant use SUBMIT as its a module pool program.

Thank You

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 17, 2006 at 04:16 PM

    CALL TRANSACTION ta { [AND SKIP FIRST SCREEN]

    | [USING bdc_tab [bdc_options]] }.

    Extras:

    1. ... AND SKIP FIRST SCREEN

    2. ... USING bdc_tab [bdc_options]

    Effect

    The statement CALL TRANSACTION calls the transaction whose transaction code is contained in data object ta. The data object ta must be of character type and must contain the transaction code in uppercase letters. If the transaction specified in ta cannot be found, an untreatable exception is triggered. The additions suppress the display of the initial screen and allow you to execute the transaction using a batch input session.

    At CALL TRANSACTION the calling program and its data is kept, and after exiting the called transaction, processing is resumed in the calling program after the call.

    When the transaction is called, the ABAP program linked with the transaction code is loaded in a new internal session. The session of the calling program is kept. The called program runs in an SAP LUW of its own.

    If the called transaction is a dialog transaction, after loading the ABAP program the event LOAD-OF-PROGRAM is triggered and the dynpro defined as initial dynpro of the transaction is called. The initial dynpro is the first dynpro of a dynpro sequence. The transaction is finished when the dynpro sequence is ended by encountering the next dynpro with dynpro number 0 or when the program is exited with the LEAVE PROGRAM statement.

    If the called transaction is an OO transaction (as of release 6.10), when loading all programs except class pools the event LOAD-OF-PROGRAM is triggered and then the method linked with the transaction code is called. If the method is an instance method, implicitly an object of the corresponding class is generated and referenced by the runtime environment. The transaction is finished when the method is finished or when the program is exited using the LEAVE PROGRAM statement.

    After the end of the transaction call, program execution of the calling program resumes after the CALL TRANSACTION statement.

    Note

    At the statement CALL TRANSACTION, the authorization of the current user to execute the called transaction is not checked automatically. If the calling program does not execute a check, the called program must check the authorization. To do this, the called program must call function module AUTHORITY_CHECK_TCODE.

    Addition 1

    ... 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.

    Addition 2

    ... USING bdc_tab [bdc_options]

    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

  • author's profile photo Former Member
    Former Member
    Posted on Oct 17, 2006 at 04:16 PM

    Subhash,

    Use the BDC option cited above in the on-line help.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 17, 2006 at 04:26 PM

    Hi,

    Use the below logic...

    CLEAR BDCDATA.

    BDCDATA-PROGRAM = 'RSPOSP01NR'.

    BDCDATA-DYNPRO = '2000'.

    BDCDATA-DYNBEGIN = 'X'.

    APPEND BDCDATA.

    CLEAR BDCDATA.

    BDCDATA-FNAM = 'S_RQIDEN-LOW'.

    BDCDATA-FVAL = '5000'. "<--Spool number in yoursystem

    APPEND BDCDATA.

    CLEAR BDCDATA.

    BDCDATA-FNAM = 'BDC_OKCODE'.

    BDCDATA-FVAL = '=CRET'.

    APPEND BDCDATA.

    CALL TRANSACTION 'SP01' USING BDCDATA

    MODE 'E' .

    -


    Sample program

    -


    &----


    *& Report ZRKTEST1

    *&

    &----


    *&

    *&

    &----


    REPORT ZRKTEST1.

    DATA: BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.

    • messages of call transaction

    DATA: MESSTAB LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.

    PARAMETER: P_TEXT TYPE TEXT100.

    START-OF-SELECTION.

    WRITE / P_TEXT .

    AT LINE-SELECTION.

    CLEAR BDCDATA.

    BDCDATA-PROGRAM = 'RSPOSP01NR'.

    BDCDATA-DYNPRO = '2000'.

    BDCDATA-DYNBEGIN = 'X'.

    APPEND BDCDATA.

    CLEAR BDCDATA.

    BDCDATA-FNAM = 'S_RQIDEN-LOW'.

    BDCDATA-FVAL = '5000'. "<- give the spool number here

    APPEND BDCDATA.

    CLEAR BDCDATA.

    BDCDATA-FNAM = 'BDC_OKCODE'.

    BDCDATA-FVAL = '=CRET'.

    APPEND BDCDATA.

    CALL TRANSACTION 'SP01' USING BDCDATA

    MODE 'E' .

    -


    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 17, 2006 at 04:34 PM

    Rather than using BDC, it's much easier to simply create a parameter transaction. See:

    call-transaction-x-and-skip-first-screen-question

    Rob

    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.