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

BAPI to disconnect users

Former Member
0 Likes
1,467

Hi

I've seen a few posts that t-code SM04 can be used to disconnect users, but I would like to disconnect users.

But I would like to disconnect a specific user from third party software, and therefore can only use BAPI's and RFC's.

Are there a BAPI that I can use to disconnect a user?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,191

Hello,

You can use that fonction :

CALL FUNCTION 'TH_DELETE_USER'


regards

Thierry

6 REPLIES 6
Read only

Former Member
0 Likes
1,192

Hello,

You can use that fonction :

CALL FUNCTION 'TH_DELETE_USER'


regards

Thierry

Read only

PeterJonker
Active Contributor
0 Likes
1,191

TH_DELETE_USER works and is RFC enabled

Read only

Former Member
0 Likes
1,191

I notice that TH_DELETE_USER takes parameters of USER, Client and TID.

I've got the User, and Client, but how do I find the TID?

Read only

0 Likes
1,191

You can leave the default (-1) so yo do not need to set this field

Read only

0 Likes
1,191

Thanks Peter.  All my user sessions stay open when executing TH_DELETE_USER.  That might be the 3rd party controls that fails.  Thanks for the help!!

EDIT: UserName is case sensitive and that is why it failed.  With the correct case it works.

Read only

0 Likes
1,191

You could get TID with FM TH_USER_LIST, using TID =  -1, the FM will execute same system call than the LIST FM and delete in a loop.

Regards,

Raymond