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 to check for locks on a material - without using Enqueue function

Former Member
0 Likes
2,896

Hi

We have a requirement in which - we need to check the lock ( exclusive ) on a material before we call the BAPI to update the material.

I don't want to actually lock the material before calling the BAPI - the BAPI itself acquires the lock as a part of its processing. All I want to do is to check whether lock on a material exists before calling the BAPI - thus avoiding any lock related issues on the material in the BAPI call.

How do we just merely check whether material is locked - any standard function module /SAP tables where in material lock is stored that we use/interrogate ?

Correct answers will be promptly rewarded.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,477

Hi ,

There is standard function enqueue_read ,based on material number .

Pass the material number to FM ENQUEUE_READ if sy-subrc = 0 then material is locked otherwise not .

Please reward if useful.

2 REPLIES 2
Read only

Former Member
0 Likes
1,478

Hi ,

There is standard function enqueue_read ,based on material number .

Pass the material number to FM ENQUEUE_READ if sy-subrc = 0 then material is locked otherwise not .

Please reward if useful.

Read only

0 Likes
1,477

Thanks a lot . Full points awarded