Application Development and Automation 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: 
Read only

record locking

Former Member
0 Likes
610

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
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
565

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
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
566

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

Read only

Former Member
0 Likes
565

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

Read only

Former Member
0 Likes
565

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!

Read only

0 Likes
565

hi,

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

no problem.

regards,

pankaj singh

Read only

Former Member
0 Likes
565

Sorry for this post

Message was edited by:

George Popescu