Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

record locking

Former Member
0 Kudos

Hello,

I am studying the locking concept. Can anyone tell me how can I lock a single record of a table? I found examples how to lock an entire table, but I need to lock at record level. Thank you!

1 ACCEPTED SOLUTION

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

You can use lock objects. You simply create a lock object in SE11, this creates two function modules automatically, ENQUEUE_<lock object name> and DEQUEUE_<lock object name> . You use the ENQUEUE function module to lock the record, by simply passing the key values of the record to the function module.

Regards,

Rich Heilman

5 REPLIES 5

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

You can use lock objects. You simply create a lock object in SE11, this creates two function modules automatically, ENQUEUE_<lock object name> and DEQUEUE_<lock object name> . You use the ENQUEUE function module to lock the record, by simply passing the key values of the record to the function module.

Regards,

Rich Heilman

Former Member
0 Kudos

Hello,

Check this thread:

http://www.sapdevelopment.co.uk/dictionary/lock_enqueue.htm

In the enqueue Fm you could metion the value of the keyfield of the table. Which will lock only one record.

Vasanth

Former Member
0 Kudos

Anyone knows why am I beeing asked for an access key when I am trying to create a lock object starting with Z or E (as the system requires) ? I have developer role.

Thank you!

0 Kudos

hi,

i am able to create the lock object.. starting with EZ...

no problem.

regards,

pankaj singh

Former Member
0 Kudos

Sorry for this post

Message was edited by:

George Popescu