02-25-2013 12:00 PM
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.
03-04-2013 9: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'
EXPORTING
commandname = 'ZABAPCMD'
additional_parameters = t_date
TABLES
exec_protocol = t_btcxpm
EXCEPTIONS
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.