‎2007 Jan 22 5:58 PM
‎2007 Jan 22 6:00 PM
Hi,
Use the lock object.
Create a lock object in SE11
It will generate two function modules..One to lock it and another one to unlock the record.
Check this link for how to create a lock object
http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eef3446011d189700000e8322d00/content.htm
Thanks,
Naren
‎2007 Jan 23 4:06 AM
Hello Sunil,
Go to se11 transaction.
Click on lock object radio button and give a lock object name starting with 'E'.For example 'ESAMPLE'.Click CREATE.
In the TABLE tab, you can give the table name for which you require a lock.In the LOCK PARAMETERS tab,you can give the table fields based on which the table should be locked.
Call a function module in your program ENQUEUE_lockobjectname to obtain a lock on the required table.In our example the FM will be ENQUEUE_ESAMPLE.
To release the lock on the table,call the function module DEQUEUE_lockobjectname.In our example the FM will be DEQUEUE_ESAMPLE.
Regards,
Beejal
**Reward if answer helps.
‎2007 Jan 22 6:03 PM
Hi,
Check the Enqueue* and Dequeue* Func.Modules in SE37. You will get a couple of standard table entries locks for different table.
If you want to create your own Lock objects, then go to SE11, create and object starting with EZxxxxx, this will create two FM's one for ENQUEUE and one for DEQUEUE.
Hope this helps.
Regards
Subramanian
‎2007 Jan 23 12:52 AM
In addition to the above, while you create the Lock Object, the system asks you on which fields you want to Lock the complete entry in a table.
While executing the program, you have to lock the required entry in a Loop statment.. Just call the ENQUEUE_ZXXXX and pass the field and lock that entry.
Sim process has to be followed for Unlock.
Ketan
‎2007 Jan 23 2:23 AM