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

How we can maintain lock in table level in module pool program?

Former Member
0 Likes
435

HI all,

I have one requirement, In that i am getting data from six tables , now how we can put lock on dependant tables , here we are getting data from six tables, at that time no one can allow to modify the record of those tables , they can be able to read the records not to modify , how we can do that. Please explain it to me.

Thanks in advance.

1 REPLY 1
Read only

Former Member
0 Likes
384

Hi Sitaram,

If its ZTable create the LOCK objects for the tables.

When you create a lock object SAP automatically creates two FM's 'ENQUEUE_E<table>' and DEQUEUE_E<tablename>.

You can use the enqueue function module to lock the records that you are reading.

Important thing is that the other programs which are reading data from the table should also use this ENQUEUE function module in order to verify the locks. This because SAP does not create locks at database level.

Hope this helps you.

Thanks,

Arun