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

Starting SAP transaction in between ABAP code

Hi,

How can I start a particular transaction in between ABAP code if certain condition is true.

Regards,

Tushar.

Add a comment
10|10000 characters needed characters exceeded

Related questions

7 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jun 10, 2005 at 03:57 PM

    Hi Tushar,

    Have a look at the help of command 'CALL TRANSACTION'.

    Regards,

    Sükrü

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 10, 2005 at 04:03 PM

    Hi,

    You can start a transaction with folliwing sintax:

    CALL TRANSACTION 'name_of_transaction'.

    If you want to pass a parameter value can use:

    SET PARAMETER ID 'name_of_parameter' FIELD <value>.

    I hope to be you of help,

    Regands,

    Antonello.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 10, 2005 at 04:20 PM

    Hi

    You can start Transaction b/w ABAP code either by using CALL TRANSACTION or SUBMIT statement.

    Executable programs can be executed via the ABAP statement SUBMIT.

    Regards

    Vineet

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 13, 2005 at 05:16 AM

    Hi Tushar

    For starting the new transaction in the program itself then we have use CALL TRANSACTION <TCODE> statement .

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 13, 2005 at 07:05 AM

    If a program has a transaction code, there are two ways of starting it from another program.

    If you do not want to return to the calling program at the end of the new transaction, use the statement:

    LEAVE TO TRANSACTION <tcod> [AND SKIP FIRST SCREEN].

    This statement ends the calling program and starts transaction <tcod>. This deletes the call stack (internal sessions) of all previous programs. At the end of the transaction, the system returns to the area menu from which the original program in the call stack was started.

    If, on the other hand, you do not want to return to the calling program at the end of the new transaction, use the statement:

    CALL TRANSACTION <tcod> [AND SKIP FIRST SCREEN] [USING <itab>].

    This statement saves the data of the calling program, and starts transaction <tcod>. At the end of the transaction, the system returns to the statement following the call in the calling report. If the LEAVE statement occurs within the called transaction, the transaction ends and control returns to the program in which the call occurred.

    You can use a variable to specify the transaction <tcod>. This allows you to call transactions statically as well as dynamically.

    The addition AND SKIP FIRST SCREEN allows you to prevent the initial screen of the new transaction from being displayed. The first screen to be displayed is then the specified Next screen in the screen attributes of the initial screen. If the first screen calls itself as the next screen, you cannot skip it.

    Furthermore, the AND SKIP FIRST SCREEN option works only if all mandatory fields on the initial screen of the new transaction are filled completely and correctly with input values from SPA/GPA parameters.

    The USING ITAB addition in the CALL TRANSACTION statement allows you to pass an internal table <itab> to the new transaction. <itab> has the form of a batch input table. For further information about batch input tables, refer to Importing Data With Batch Input.

    Cheers

    Nishanth

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 13, 2005 at 12:45 PM

    Hi,

    It is as simple as that,

    CALL TRANSACTION "transaction name".

    regs,

    venkat Ramanan

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 14, 2005 at 07:14 AM

    Hi Buddy,

    Pls close the issue if you are satisfied.

    Regs,

    Venkat

    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.