Skip to Content

How to check if Material is not locked

Apr 24, 2017 at 04:06 PM


avatar image
Former Member

I have a requirement to create idoc from Material change screen with the new changed values. For this, I am using user exit EXIT_SAPLMGMU_001 to call the idoc posting Program RBDSEMAT. But since I need the new saved values, I have to wait until the Material is not locked before submitting the idoc Program. How can I achieve this within the Program to only call the Program after the lock has been released?


10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Raghu Govindarajan Apr 26, 2017 at 07:34 PM

I think this is what you are looking for Waiting for lock objects to release – using lock modes U and V

10 |10000 characters needed characters left characters exceeded
Raymond Giuseppi
Apr 25, 2017 at 07:35 AM

Technically, execute your code in a FM executed in BACKGROUND TASK, it will run after unlock and database update.

Any reason you didn't use standard solutions like change pointer triggering of IDoc?

Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Thanks Raymond! We are using a user exit since we need the idoc creation to be real time and also had to add some conditions in the Program for filtering before creating the idoc. If we use change pointer, can the idoc posting be real time, or do we still have to run the idoc posting program in background to pick up the message type to create idoc?


You could schedule the BD21 report as a periodic on event job, and raise the event after commit by scheduling FM BP_REMOTE_EVENT_RAISE IN BACKGROUND TASK in your exit.