Application Development 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: 

How can I find the no. of external sessions that are opened by current user

Former Member
0 Kudos
127

Hi,

In my ABAP code, how can I find the no. of external sessions that are opened by the current user?

Thanks.

7 REPLIES 7

Former Member
0 Kudos
69

Hi Kumar,

user realted data stored in the tables

USR01

USR02

USR03

USR04

may be this will help ful to you.

Thanks

0 Kudos
69

Hi M Prasanth,

In the tables given by you, nowhere can I find the no. of current SAP session. Is there a SY fld for this?

ThomasZloch
Active Contributor
0 Kudos
69

Call function TH_USER_INFO, return value ACT_SESSIONS.

Thomas

0 Kudos
69

Hi Thomas,

Can I set the no. of sessions opened by the user?

For Eg: if the user has opened 3 sessions and the maximum limit is 6 sessions, is there a way by which I can set the total no. of sessions opened by the user to 6 through my code?

0 Kudos
69

Probably not, but you can open new sessions for him by calling TH_CREATE_MODE

Thomas

TH_CREATE_FOREIGN_MODE is even funnier, try surprising your workmates a little bit...

0 Kudos
69

hi ,

i have tried the FM TH_USER_INFO to find the no of opened session. its works fine when a user is logon once. if he logon more than once it give the no of opened session of the last logon even if i use this FM in logon's other than the last logon. is there any way to find the no of opened session of current logon in case of user using multiple logons?

0 Kudos
69

Hi,

You can use Function Module TH_USER_LIST

In that under the tables USRLIST field EXTMODI gives the no of opened sessions by an user.

Regards

Ram