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

Swapping the sessions using abap coding

Hi all,

Can any one tell me how i can swap the two sessions like ALT+TAB using abap coding

i have two transaction consider T1 and T2.

first the user call the transaction T1 and in the screen there are few button in series with the input fields beside the buttons, when the user click any of the buttons i need to call the transaction T2 such that it overlaps T1. and call T1 in display mode in new session,

i have achieved all the above requirements but the problem is the user requires the T2 screen to be active and T1 below it. in the above case T1 is being active as it is call after T1.

Can anyone suggest what i can do.

@ Admin: Please dont lock the discussion, This might helpfull to others as well.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Mar 04, 2013 at 09:27 AM

    First, when calling T2 transaction you can call it with /o parameter (to open new session), or use STARTING NEW TASK when calling the program/t-code.

    Or use: "CC_CALL_TRANSACTION_NEW_TASK" - maybe the simplest way. Depends on your requirement some approaches might be useful some not.

    Second requirement can be achieved through ABAP using O/S commands.

    You have ALT + TAB (go to next session), or you can use most probably SHIFT + ALT + TAB (previous session).

    You have to maintain OS commands in SM69.

    Prerequisite is to find a system command as text value for what you want to do...

    More info about that here:

    Hope it helps, i haven't tried that specific action, but I've tried some command line actions and it worked.

    * Execute OS command using Function module:

    call function 'SXPG_CALL_SYSTEM'
    commandname = 'ZABAPCMD'
    additional_parameters = t_date
    exec_protocol = t_btcxpm
    no_permission = 1
    command_not_found = 2
    parameters_too_long = 3
    security_risk = 4
    wrong_check_call_interface = 5
    program_start_error = 6
    program_termination_error = 7
    x_error = 8
    parameter_expected = 9
    too_many_parameters = 10
    illegal_command = 11
    others = 12.

    * Execute OS command using ABAP - CALL statement:

    v_command = 'chmod a+rwx filename'.
    call 'SYSTEM' id 'COMMAND' field v_command.

    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.