‎2006 Aug 03 5:25 AM
If you want to edit a custom field in BKPF, be sure you use a lock
object (EFBKPF, function modules ENQUEUE_EFBKPF and DEQUEUE_EFBKPF).
for the above scenario give me some example code.
how to change flag value using lockobjects.
regards,
prabhakar.
‎2006 Aug 03 5:54 AM
Hi Prabhakar,
Lock Objects are used to Lock or prevent DataBase table from editing when some one edits it.
for example, If your code has some update task as you said which you have to do for BKPF you have to first Lock the DB table for others to Edit. Then once your task is been complete you release or remove the Lock.
Itab1 - Values to be updated or edit Custom Field in BKPF.
Select values(Need to be Edited) into itab1.
Call Function Module ENQUEUE_EFBKPF. This would Lock the DB for others to Edit.
Do the Editing Task(Update, Insert or Modify Whatever).
Once done Release it using Function Module DEQUEUE_EFBKPF.
Hope this would have helped you out.
Cheers,
Prashanth
‎2006 Aug 03 6:56 AM
Hi,
View the following links you will learn a lot and also how to create delete the locks ,including database locks and lock statement.
http://www.sap-img.com/abap/type-and-uses-of-lock-objects-in-sap.htm
http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
http://dev.mysql.com/doc/maxdb/en/c4/812640632cec01e10000000a155106/content.htm
http://sapdb.org/7.4/htmhelp/5e/eba673440a11d3a98200a0c9449261/content.htm
Please reward for the same.