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.
Showing results for 
Search instead for 
Did you mean: 

issue with LOCK Objects

0 Kudos

Hi All,

I have 2 programs ZPROGRAM1, APROGRAM2 which update a custom table ZTABLE. When updating the table, I am locking and unlocking the table using the Function Module 'ENQUEUE_E_TABLE'.

We had a situation where both the programs ZPROGRAM1 and ZPROGRAM2 were run at the same time. So, the table was locked by the program ZPROGRAM1 already. The other program ZPROGRAM2 couldn't update the table as the table was already locked by ZPROGRAM1.

My requirement is... when one program tries to update the table and if it is already locked by some other means, it has to wait till the table is UNLOCKED and then proceed with the update.

Could anyone please let me know how to wait in the program when the table is already locked? Is there any FM which fulfils this requirement..? Please share your valuable inputs on the same.

Thanks in advance.

Thanks & Regards,



Active Contributor
0 Kudos

Have you tried '_WAIT' parameter in the function module.

0 Kudos

Hi Sampath,

Thank you for your response. I haven't tried the parameter. But, I am not sure what value to be passed to this parameter.

Could you please let me know what value to be passed to this parameter?

or is there any other FM or method which waits till the table is unlocked?

Thanks & Regards,


0 Kudos

It is a flag. Just pass 'X' to it