09-11-2019 11:14 AM
Hi All,
I have a requirement wherein the scenario is 'I am in a standard transaction code say VA03 and i placed an option/button kind of thing in 'Help' menu bar. When i click on that option i call a custom transaction which should open in a separate session without killing the VA03' The thing is i tried with all possible standard FMs. What is happening is that the custom transaction opens in a new session but the standard VA03 gets killed and it automatically goes to home screen.
FMs i tried using:
ABAP4_CALL_TRANSACTION
CKEKUTIL_CALL_TRANSACTION_TASK
COPF_CALL_TRANSACTION
RFC_CALL_TRANSACTION_USING
CC_CALL_TRANSACTION_NEW_TASK
BDC_OPEN_GROUP
SAPGUI_SET_FUNCTIONCODE
and also CALL TRANSACTION(both normal and static method of a predefined class) and LEAVE TO TRANSACTION.
PS: I dont want to pass any value between the screens. The thing is custom transaction should open in a new session and standard screen should remain the same
Thanks and Regards,
Muralidhar BA
09-11-2019 12:03 PM
What you can do is to use an RFC capable function module and call it thru aRFC:
CALL FUNCTION 'ABAP4_CALL_TRANSACTION' STARTING NEW TASK 'MYTCODE'
EXPORTING
tcode = 'MYTCODE'
The dialog handling of RFC calls is documented here.
09-11-2019 12:03 PM
What you can do is to use an RFC capable function module and call it thru aRFC:
CALL FUNCTION 'ABAP4_CALL_TRANSACTION' STARTING NEW TASK 'MYTCODE'
EXPORTING
tcode = 'MYTCODE'
The dialog handling of RFC calls is documented here.
09-12-2019 4:43 AM
Hi Gabor and Sandra,
I just tried the same. It works the same way as i mentioned. If you can help me with any other way, it would be great.
Thanks,
Muralidhar
09-12-2019 5:19 AM
Hi Muralidhar,
I executed FM 'SAPGUI_SET_FUNCTIONCODE' in SE37, a new session is created for va03 .
CALL FUNCTION 'SAPGUI_SET_FUNCTIONCODE'
EXPORTING
functioncode = '/OVA03'
EXCEPTIONS
function_not_supported = 1
OTHERS = 2.<br>
09-12-2019 6:15 AM
There is no authorization control with SAPGUI_SET_FUNCTIONCODE, you should check if SAP really control the authorization on the tcode before using it
09-12-2019 7:27 AM
muralidhar2796
Could you share the code you tried and in what exit you were using it?
09-12-2019 7:42 AM
09-12-2019 12:44 PM
Muralidhar, I just copy pasted your code and it works fine for me..
09-12-2019 1:51 PM
muralidhar2796
Do you call it from a user exit of VA03? So it does open the new external session but it goes back to the session manager in the original session?
09-13-2019 5:23 AM
I called it from the menu bar with an extra option placed in Help menu using menu painter..
09-11-2019 12:18 PM
You just need CALL TRANSACTION 'XXXX' (almost all the FMs you mention simply do that) to call another transaction as a new "internal session" over the internal session of VA03, but in the same "external" session. But if the called transaction does something like LEAVE TO TRANSACTION or SUBMIT without AND RETURN, that will reset all existing internal sessions in the current external session (and will "kill VA03").
The solution is to start the transaction in a new external session by using aRFC as explained by Gábor Márián.
09-12-2019 9:33 AM
if you create a dynpro screen, over there you call needed transaction code. and from VA03 you call your custom screen as pop-up for example, i think you will have what you want...