‎2011 Dec 26 3:06 PM
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
‎2011 Dec 27 4:49 AM
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.