2016 Aug 31 10:07 AM
Hi guys,
I need to close sessions of some user that is locking one object previous to trigger a job(i need to make this by program not handly), but this user can have several sessions of same transaction and locking sveeral objects. I don´t know how to link the locks and the sessions. Does anybody have the same problem?.
Thanks in advance.
2016 Aug 31 5:07 PM
The locks are not related to the session, only to the user ID and key fields. You can easily see the locks in SM12 and come to such conclusion on your own.
Forcefully closing the sessions and removing locks is not the best practice in SAP (or any ERP system I suppose), so it's not a "problem", as you're suggesting. Problem is what you are likely to get by simply removing the locks in a program.
2016 Aug 31 5:07 PM
The locks are not related to the session, only to the user ID and key fields. You can easily see the locks in SM12 and come to such conclusion on your own.
Forcefully closing the sessions and removing locks is not the best practice in SAP (or any ERP system I suppose), so it's not a "problem", as you're suggesting. Problem is what you are likely to get by simply removing the locks in a program.
2016 Aug 31 5:40 PM
Hi Jelena,
My problem comes when the user is locking an object that is going to be needed by a night job(It is not normal, but sometimes it happens). I know that locks are linked to key and user, but i have checked that when i close a session by sm04 i get the session closed and the locks released. So i need the user out of this transaction previous to my job. If you need a better way please share it.
Thanks in advance.
Best regards
2016 Sep 01 11:14 AM
Dear Carl
Your problem is locks but going one level next you shall understand from the user why he is locking it. It is very common scenario when jobs run people will be working on some of objects in parallel. Removing locks is not the solution. First is to understand what is the user always doing at same time when your jobs run.
Thanks
Nabheet
2016 Sep 01 1:43 PM
I'm confused - does your SAP Production system have no time-out? Our users get booted out after about 15 minutes of inactivity and "night jobs" usually start way past the office hours, at 7-8 pm.
It seems to me this rather needs to be taken up with the management. There should be no need whatsoever to have a transaction open in change mode for extended period of time. Essentially you are trying to do the time-out's job here and it doesn't seem to make much sense.