Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

New Session from Method

0 Likes
1,165

Through a method i want open a new session from the existing session by retaining the existing one .Any one please help me

3 REPLIES 3
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
850

Call the function module ABAP4_CALL_TRANSACTION. Pass SESSION_MANAGER to the parameter transaction


CALL FUNCTION 'ABAP4_CALL_TRANSACTION'
  STARTING NEW TASK 'SESSION_MANAGER'
  DESTINATION 'NONE'
  EXPORTING
    tcode = 'SESSION_MANAGER'.

Read only

Former Member
0 Likes
850

Hi,

Use the function module 'CC_CALL_TRANSACTION_NEW_TASK'.The below code opens VA03 in a new session.


WRITE 'This is the main ABAP program'.

DATA :
  lv_skip(1) TYPE c VALUE 'X',
  lv_vbeln LIKE vbak-vbeln VALUE '1500000015',
  l_st_param TYPE tpara,
  l_it_params TYPE TABLE OF tpara.

CLEAR l_st_param.
CLEAR l_it_params[].

l_st_param-paramid = 'AUN'.
l_st_param-partext = lv_vbeln.
APPEND l_st_param TO l_it_params.

CALL FUNCTION 'CC_CALL_TRANSACTION_NEW_TASK'
  STARTING NEW TASK 'VA03'
  DESTINATION 'NONE'
  EXPORTING
    transaction = 'VA03'
    skip_first_screen = 'X'
  TABLES
    paramtab = l_it_params
  EXCEPTIONS
    communication_failure = 97
    system_failure = 98
    OTHERS = 99.

IF sy-subrc = 0.
  " Success
ELSEIF sy-subrc = 97.
  " Communication Failure
  EXIT.
ELSEIF sy-subrc = 98.
  " System Failure
  EXIT.
ELSE.
  EXIT.
ENDIF.

Also you can use ABAP4_CALL_TRANSACTION

Hope its helpful.

Read only

uwe_schieferstein
Active Contributor
0 Likes
850

Hello Prakash

If you have class CL_RECA_GUI_SERVICES available on your R/3 system you may have a look at its method CALL_TRANSACTION.

Regards

Uwe