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: 

Lock and Unlock ?

Former Member
0 Kudos

Hi,

i am submititing the report "rm06k052"(Transaction- MEKL) via job in background. Suppose if one scheduling agreement contains several no of line items and for materials i have to change the price.

So i m calling for each and every line item. When it is trying to update second item it is saying that" No selections found" bciz it is locked by first one. For 3 rd line item went successful.

Even though i m checking job status , after the completion 1st line item job only i m submitting another one..still it is locking for some time.

Please tell me how to unlock the SA.

can i use dequeue_all FM...if i call this FM it will unlock all locked objects by the background user?

please tell me how to do this...

Thanks

Venki

1 REPLY 1

naimesh_patel
Active Contributor
0 Kudos

Don't use the dequeue_all FM.

What you can do is, after completion of the first Submit, check the lock status using the FM ENQUEUE_READ. May be you need to some research to get your locked values from the return table of the ENQUEUE_READ.

You have to call this FM several times till you get the objects with lock status from this FM. Once you don't find any entry with your material you can start with the next submit statement.

Regards,

Naimesh Patel