Registration

Dear SAP Community Member,
In order to fully benefit from what the SAP Community has to offer, please register at:
http://scn.sap.com
Thank you,
The SAP Community team.
Skip to end of metadata
Go to start of metadata

Author: Karthik D
Submitted: 14th May 2008

Description :

In SAP Dialog Programming we call transactions using  the CALL TRANSACTION statement but it opens up the new Tcode in the same session. Is there any option in CALL TRANSACTION Statement to open a transaction in New Session(window)(question) No !(thumbs down) . But there is a way in which we can attain the same result (thumbs up) , its by using the CALL TRANSACTION Statement inside a Remote-Enabled Function Module and then using the STARTING NEW TASK addition while calling the Function Module.

How to create a Remote-Enabled  Function module (question)

 Its just the same procedure as of ordinary Function module, but in the Attributes Tab, under Processing Type you have to select Remote-Enabled Module instead of Normal Function Module.

Example :

ZFM_CALL_TCODE_IN_NEW_WINDOW 

FUNCTION zfm_call_tcode_in_new_window.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"  IMPORTING
*"     VALUE(TCODE) TYPE  SY-TCODE
*"     VALUE(SONO) TYPE  VBELN
*"----------------------------------------------------------------------
  SET PARAMETER ID 'AUN' FIELD sono.
  CALL TRANSACTION tcode AND SKIP FIRST SCREEN.
ENDFUNCTION.
 

So How Can i call the Function Module to Open the Transaction in New Session (question)  

You have to use the following code segment to call that Function Module , and here Sales Document 9000000012 will open for Display in a New Session(Window).

e_tcode = 'VA03'.
e_sono = '9000000012'.
CALL FUNCTION 'ZFM_CALL_TCODE_IN_NEW_WINDOW' STARTING NEW TASK 'TEST'
  DESTINATION 'NONE'
  EXPORTING
    tcode = e_tcode
    sono  = e_sono.
 

Hope the above snippet will be useful for all.(lightbulb)

Thanks & Regards

Karthik D (green star)

1 Comment

  1. Guest

    Can you also call a dalog box in a new session using this snippet? Thanks for your help.