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

Open a new session

Former Member
0 Likes
1,987

hello all!

I need to open a new session on a button click. How shoudl I do it?

Puru

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,601

On standard tool bar, you can see one star symbol button. Using that you can get new session.

Regards,

Chandra

hello all!

I need to open a new session on a button click. How shoudl I do it?

Puru

8 REPLIES 8
Read only

gopi_narendra
Active Contributor
0 Likes
1,601

on the standard tool bar u have the option for it, Create New Session.

Regards

- Gopi

Read only

0 Likes
1,601

i need to do it programtically

Read only

Former Member
0 Likes
1,601

On standard tool bar, you can see one star symbol button. Using that you can get new session.

Regards,

Chandra

Read only

Former Member
0 Likes
1,601

Hi Puru,

Onn Button Click do a

<b> CALL TRANSACTION 'S000'.</b>

Hope this helps.

Mark points if it helps

Cheers

VJ

Read only

Former Member
0 Likes
1,602

On standard tool bar, you can see one star symbol button. Using that you can get new session.

Regards,

Chandra

Read only

0 Likes
1,601

Please try with this code:

<b>CALL FUNCTION 'HLP_MODE_CREATE'
  EXPORTING
    TCODE                 = 'S000'
*   USE_BATCH_INPUT       = 'X'
          .</b>

Kind Regards

Eswar

Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
1,601

Hi,

Its not possible to open new session on a button click. Only way we can create new session is by calling an RFC in NEW TASK or by /o on the command field.

But if you use LEAVE TO TRANSACTION or SUBMIT PROGRAM then the current session is terminated and a new session is started.

Try calling HLP_MODE_CREATE function module with /o as the tcode.

Regards,

Sesh

Message was edited by: Seshatalpasai Madala

Read only

Former Member
0 Likes
1,601

Hi,

if you still need a solution...

Use the fm ABAP4_CALL_TRANSACTION. Example:

DATA: l_sessname TYPE string,

ls_spagpa TYPE rfc_spagpa,

lt_spagpa TYPE TABLE OF rfc_spagpa.

MOVE: 'BUK' TO ls_spagpa-parid,

'0010' TO ls_spagpa-parval.

APPEND ls_spagpa TO lt_spagpa.

l_sessname = 'BLA'.

CALL FUNCTION 'ABAP4_CALL_TRANSACTION'

STARTING NEW TASK l_sessname

DESTINATION 'NONE'

EXPORTING

tcode = 'BLA1'

skip_screen = 'X'

TABLES

spagpa_tab = lt_spagpa

EXCEPTIONS

OTHERS = 1.

As you see, you can use spagpa_tab to transfer SetGet Parameter. A transfer via BDC is possible as well. Check out the fm description...

Andy