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: 

Help with Stock Removal User Exit

sunilachyut
Contributor
0 Kudos
290

Hello All

To control the storage bin selection, I am using the user exit MWMTO004. When I use the transaction LT03 to create a transfer order the system selects the storage bin selected by me. However, when I create a transfer order through L_TO_CREATE_INT it doesnt select the storage bin chosen by me. After debugging the code in LT03, I found out that SAP locks the bin with lock object ELLQUAX and ELLQUAY and thus prevents it from re-selecting the same bin. Is there a way in the user exit, through which I can prevent selecting the same bin. I would be thankful for your inputs in this regard.

Thanks in Advance.

1 REPLY 1

sunilachyut
Contributor
0 Kudos
47

Oh God, such a relief I solved it. SAP provides a FM, L_TO_CREATE_GET_INFO, which updates the quantity that has already been picked. The following is what I am doing to select a bin in the user exit:

1) Clear the internal table sent to the user exit (t_qmat).

2) Call the FM L_TO_CREATE_GET_INFO to check the quantity left in each bin.

3) Select a bin and insert that bin as the first record of the internal table.

Thanks

Sunil Achyut