How to Open SAP Transaction in New Window Or in New Session using ABAP cc_call_transaction_new_task Function Module
ABAP developers can use ABAP function module CC_CALL_TRANSACTION_NEW_TASK in order to execute and display an SAP transaction in a new window or in a new session.
Using cc_call_transaction_new_task, parameters can be set for the first screen of many SAP transactions like VA02 or VA03.
In this sample ABAP report, I will execute the main ABAP program and write a message on the SAP screen.
And using the ABAP function module cc_call_transaction_new_task with required VBELN parameter is set to a valid Sales Order nnumber, I will open a new SAP GUI screen and display the Sales Order using the VA03 SAP Transaction code.
Here is the source code of the sample SAP report used for demonstrating the cc_call_transaction_new_task ABAP function.
You can realize that while using CC_CALL_TRANSACTION_NEW_TASK function, we also use STARTING NEW TASK with an identifier.
Also we are defining the DESTINATION 'NONE' for the cc_call_transaction_new_task function.
Later, you can pass required parameters like transaction code, whether to skip first screen or not and additional parameters like VBELN number using the EXPORTING and TABLES sections of the function module.
I hope, as an ABAP developer you find this sample ABAP program useful for demonstrating cc_call_transaction_new_task function module to open new window and call the transaction code in the new session.
For a similar ABAP function, please refer to How to Display SAP Transaction in a New Session Or in New Window using ABAP4_Call_Transaction Function Module.