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

Regarding Internal Session Termination

Former Member
0 Likes
465

Hi Friends,

I have to end a particular internal session (Planning Area in my case) of the other user after a specific time, who is in change mode through a background job.If I use the function module u201CTH_DELETE_USERu201D,it is closing all the sessions of that user.But my requirement is to close only u2018SDPu2019 session without closing others.How can I do this?

I tried to delete based on mode number using function module u201CTH_DELETE_MODEu201D,but each time mode number is getting changed based on the sessions opened, so I am not even able to use thatu2026.Please suggest me any function module or bapi which meets the requirementu2026

Thanks in advance u2026u2026

1 REPLY 1
Read only

Former Member
0 Likes
385

Hi,

check fm : TH_USER_LIST.

Check this sample code provided in 1 forum.

DATA: USRTAB LIKE UINFO OCCURS 1 WITH HEADER LINE,

MODE TYPE I,

OPCODE TYPE X.

CALL FUNCTION 'THUSRINFO'

TABLES

USR_TABL = USRTAB.

LOOP AT USRTAB WHERE BNAME = SY-UNAME.

IF USRTAB-TCODE = 'ME23'.

OPCODE = 25.

CALL 'ThUsrInfo' ID 'OPCODE' FIELD OPCODE

ID 'TID' FIELD USRTAB-TID.

ENDIF.

ENDLOOP.

Hope this helps to solve ur issue.

Thanks & regards.