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: 

How to lock a database Z table before updating it through a report program

Former Member
0 Kudos

Hi,

How to lock a database Z table before updating it through a report program and also how to unlock it after my updation.

The whole process is done through report program.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Go to SE11, in the option 'Lock object' enter the name of your lock,

begin with 'E', suppose 'EXXXX' And create. In tab 'Tables' fill the

table name where the record you want to lock exist and select the

lock mode. Lock mode can be shared and exclusive. If 'shared',

when you lock the record, other can also read data, but can not

modify. If 'exclusive', when you lock the record, other can neither

read nor modify the record. After save and activate, you will get two

function module.'ENQUEUE_EXXXX' to lock record,

'DEQUEUE_EXXXX' to release lock on one record.

When use this function module it only lock one record at a time. It

does not lock the table.

Regards,

Omkaram.

5 REPLIES 5

Former Member
0 Kudos

you can use two function modules..

ENQUEUE_table name to lock

DEQUEUE_table name to unlock

Regards

Ansari

0 Kudos

Hi,

But when call the function module enqueue_Ztablename,

I am getting a message saying function module does not exist.

pls help me out

Thanks&Regards,

Sandeep

Former Member
0 Kudos

make a lock object in se11, with name starting with EZ* or EY* for your ztable

then use enquque_ez* FM to lock ztable record

and use dequeue_ez* FM to unlock ztable record

Former Member
0 Kudos

Hi,

Go to SE11, in the option 'Lock object' enter the name of your lock,

begin with 'E', suppose 'EXXXX' And create. In tab 'Tables' fill the

table name where the record you want to lock exist and select the

lock mode. Lock mode can be shared and exclusive. If 'shared',

when you lock the record, other can also read data, but can not

modify. If 'exclusive', when you lock the record, other can neither

read nor modify the record. After save and activate, you will get two

function module.'ENQUEUE_EXXXX' to lock record,

'DEQUEUE_EXXXX' to release lock on one record.

When use this function module it only lock one record at a time. It

does not lock the table.

Regards,

Omkaram.

0 Kudos

Hi Omkaram,

Thank you soo much.

Its working.

Thanks & Regards,

Sandeep Kishan