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 level locking for custom table

Former Member
0 Likes
1,555

Hi All,

My requirement is i have to update the custom table, but when iam locking the table, some times if the user opens the table and try to isert the records its failing.

So i need to create the record level locking for the table.

Please suggest me how to create the record level locking for Custom table.

Thanks in advance

Regards,

Sreehari

3 REPLIES 3
Read only

former_member195698
Active Contributor
0 Likes
637

Instead of updating the table through SM30. Create a Custom Z program for Updating the table. Create a Lock Object on the Table to Achieve Row level locking.

User has to select the Row to Edit the data.

Regards,

Abhishek

Read only

Former Member
0 Likes
637

Hello,

You can create a custom lock object and use Enqueue/Dequeue functions. Otherwise, you may use the function:

call function 'ENQUEUE_E_TABLE'

exporting

mode_rstable = 'E'

tabname = <Table Name>

varkey = <Varkey - Concatenated key fields>

_scope = '3'

exceptions

foreign_lock = 1

system_failure = 2

others = 3.

Thanks,

Venu

Read only

Former Member
0 Likes
637

create lock objects in se11 for the custom table .

this will create 2 fms ENQUEUE_<lockobjname> and DEQUEUE_<lockobjname>. when you call the ENQUEUE_<lockobjname> FM, pass all the key fields so as to perform a record level lock.

hope this helps.

Thanks,

Balaji