‎2007 May 24 9:38 AM
Hi Experts
I have a question regarding lock objects.
Suppose I have one program in which I am using a transaction to do some specific work and while this program is running , I don't want anyone to access that transaction. Can i block the transaction using lock object?? If yes,then how to do it?? If not then how can i do it?
‎2007 May 24 9:45 AM
Hi,
check the following link:
http://sap-img.com/abap/how-to-lock-and-unlock-users.htm
Hope this helps.
Reward if helpful.
Regards,
Sipra
‎2007 May 24 9:42 AM
Hi Smith,
Lock objects are used to synchronize access to the same data by more than one program.
There are three types of locks:
Exclusive lock: The locked data can only be displayed or edited by a single user. A request for another exclusive lock or for a shared lock is rejected.
Shared lock: More than one user can access the locked data at the same time in display mode. A request for another shared lock is accepted, even if it comes from another user. An exclusive lock is rejected.
Exclusive but not cumulative: Exclusive locks can be requested several times from the same transaction and are processed successively. In contrast, exclusive but not cumulative locks can be called only once from the same transaction. All other lock requests are rejected.
Creating lock object
1)Go to SE11
2) select lockobject
3)give name starts eith EZ followed by the name of lock object.
2)Choose table
3)Add fields .
4)Save & Activate
Just see these links:
http://help.sap.com/saphelp_nw04/helpdata/en/a2/3547360f2ea61fe10000009b38f839/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eeb2446011d189700000e8322d00/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/af/22ab01dd0b11d1952000a0c929b3c3/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eea5446011d189700000e8322d00/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eee6446011d189700000e8322d00/frameset.htm
Thanks,
Reward If helpful.
‎2007 May 24 9:43 AM
Hi
Using Authorizations you can achive this.
<b>
Check SU03 Tcode.</b>
Regards,
Sreeram
‎2007 May 24 9:43 AM
Hi,
Yes u can do it.you can use ENQUEUE and DEQUEUE Function Modules in the program to lock and unlock the respective transaction.
Example: Function Module 'DEQUEUE_ALL' for unlocking.
Regards,
Padmam.
‎2007 May 24 9:45 AM
Hi,
check the following link:
http://sap-img.com/abap/how-to-lock-and-unlock-users.htm
Hope this helps.
Reward if helpful.
Regards,
Sipra
‎2007 May 24 9:58 AM
Hi Smith,
use the lock object FM
'ENQUEUE_ESRDIRE' and pass the program name of the tcode.
select program name from TSTC table by passing the tcode.
This way you can lock.
Thanks
eswar