2007 Nov 20 6:18 AM
Hi,
I have called the tcode ME51N using "call ransaction 'ME51N'" but it opens in the same session(same screen) i want it to be opened in a new session(screen).
2007 Nov 20 6:20 AM
2007 Nov 20 6:24 AM
Call transaction will start your transaction 'ME51N'" in the same screen and after completion it will return back to your calling program.
#
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 LEAVEstatement occurs within the called transaction, the transaction ends and control returns to the program in which the call occurred.
#
One solution can be -
(don't know it will work or not) Create a Function Module (Type Remote function) Inside this FM use your logic of Call transaction.
In your main program. Call the Function Modulel in a NEW TASK. This will create a new session for your Transaction call and Main program will run separately.
regards,
abhishek
2007 Nov 20 6:45 AM
2007 Nov 23 6:19 AM
When you call a Function Module in NEW TASK...( Its an option that is available in CALL FUNCTION ) the FM will be called in Asynchronus mode mode and running of the fm will be independent of the main program.
Syntax
CALL FUNCTION func STARTING NEW TASK task
[DESTINATION {dest|{IN GROUP {group|DEFAULT}}}]
parameter list
[{PERFORMING subr}|{CALLING meth} ON END OF TASK].
http://help.sap.com/saphelp_nw04/helpdata/en/3d/a846df17c1014e928626637ab06838/content.htm
Regards,
Abhishek