03-15-2016 4:59 PM
My requirement is to delete a user session by the lock entry.
So assuming I have one lock entry in SM12 that I want to get rid of.
Instead of just deleting this lock entry I want to delete the session that causes this lock entry.
I know one connection is the User. However if the User has two sessions I would only want to delete that session that causes the lock and therefore automatically also get rid of the lock entry.
Any help much appreciated.
BR
03-16-2016 10:31 AM
That's a hard solution for the user which is currently creating a 1000 lines document...
In SM12 (or FM ENQUE_READ) did you identifyt the id to use in
call function 'TH_DELETE_USER'
exporting
user = <lock>-bname
client = <lock>-mandt
tid = <lock>-tid
exceptions
authority_error = 1
others = 2.
As you are SAP employee, don't you know someone who could match parameters of system funcions C_ENQUEUE and ThUsrInfo parameters?
Regards,
Raymond
04-22-2016 2:06 PM
There is a way of finding a connection of session to lock entry.
The return table from FM 'th_show_usr_details' has an entry that looks something like this:
field = *].enq_info
value = '20170402XXXXXXXXXXXXXXX311XXXsuie.........................'
This entry can then be matched with the lock entry fields gusrvb or gusr.
This way you know if a lock entry belongs to a particular session.
Then via FM ENQUE_DELETE the lock entry can be deleted.
04-22-2016 3:49 PM
If I remember right, you can double-click the user in user overview SM04 and delete a specific session.Make sure it's the right session, make sure the last activity is quite some time ago. Try to read the user by phone, mail or so.
Best regards Clemens