‎2008 Mar 10 2:47 PM
Hello,
I need to lock an employee, but I don't want to lose the lock when the session is finished.
Do anyone know how to do this? Is there any kind of database persistence regarding lock objects?
The actual scenario is a process that's locking the employee with the FM BAPI_EMPLOYEE_ENQUEUE, and another process unlocking the employees with the FM BAPI_EMPLOYEE_ENQUEUE, however I need to guarantee the lock regardless whether the user will remain logged between one process and the other.
Kind regards,
Thiago
‎2008 Mar 10 2:51 PM
Hi,
If you use the function module BAPI_EMPLOYEE_ENQUEUE then the Employee may enter in to SAP until you release the lock. you can use BAPI_USER_LOCK and BAPI_USER_UNLOCK
Regards
Sudheer
‎2008 Mar 10 4:48 PM
Hi Sudheer,
Those FMs, either BAPI_USER_LOCK or UNLOCK don't solve my problem, because I don't want to lock users to log into SAP system.
I want to lock master data maintenance in HR (transaction PA30), this is the reason why I was using the FM BAPI_EMPLOYEE_ENQUEUE.
So, my problem is that I don't want to lose the lock even if I log off the system (the standard procedure is clean the lock table - SM12 - when all the transactions are closed).
Thanks,
Thiago