Skip to Content
0

How to check if Material is not locked

Apr 24, 2017 at 04:06 PM

73

avatar image

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?

Thanks!

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
0

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

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

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

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?

0

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.

2