Skip to Content

restriction on reservation in maintenance order

Jan 26 at 07:10 AM


avatar image

Hi experts

I want to put two different error message on material reservation create through maint. order when-

a) no stock available and b) if stock available is less than reqd. qty.

I think I should use the tables MARD and RESB, further my query is which User exit /BADI is suitable for this.

Kindly suggest.

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

4 Answers

Maheswaran KD . Jan 29 at 09:17 AM

Firstly, you can have the Reservation creation during Release of PM Order. Further, you can configure the Availability check in such a way not to release the order if there are some missing components.

You can do the setting in the mentioned configuration with option "2 - Check availability during order release".

Show 4 Share
10 |10000 characters needed characters left characters exceeded

Thanks Mr. KD and Mr. Jurgen, you are saying right but if the order is already released and the user is now adding more components, availability check will show the warning message only. our requirement is to stop & throw error message On SAVE if material is not avl. in stock.


You will need to develop a solution, possibly via user-exit IWO10009 (SMOD) or BADI WORKORDER_UPDATE (SE18)



This development sounds like a disaster in the making, in my opinion. For example, what if the order date is in the future? Will you stop the creation of a reservation based solely on the availability information you have for the current date, even though you may have some materials on order that are due before the work order date? I would seriously advise against any custom solution and, instead, implement the given MRP functionality that SAP offers out of the box. Again, just my opinion.



I worked this set of requirements about 10 years ago with a team at a large client. We reached the same point that Mr. KD and Mr. Goyal reached: Avail. Check can produce an error and prevent Release, but when the Order is already released, development is needed to produce an error. Trigger off of the Warning for Availability Check, when Order has REL.

We had the development activate a User Status that blocked the Goods Issue. That way, a Senior Person with authorization for the User Status could allow the GI to this Order, instead of an order previously planned to use the stock.

@Paul, the Avail. Check is to the Matl. Req. Date on the Order, usually day before the Basic Start Date. If the date is in the future beyond the replenishment time on the Matl. Master, the error will not occur. MRP will fill the requirement, as you suggest.


Jürgen L
Jan 26 at 08:45 AM

Checking tables MARD and RESB is in general not sufficient to know what is available. Checking MARD just tells you what you have in your storage location in SAP. But there is quite a difference between stock on hand and available stock. I tried to explain it in this blog: Unrestricted use stock not equal to available stock

Use BAPI_MATERIAL_AVAILABILITY to know what is available.

But isn't the availability check not already executed automatically in a PM order?

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

thanks for the reply, standard material availability check gives us only warning message, we need Error message here.

Please suggest if we can throw error if stock not available.


In this case you should tell what warning message (along with its message number) you get as SAP gave the provision to change the message attributes for some messages.

Peter Atkin Jan 26 at 11:11 AM

Also see transaction IWBK which gives you some of this information..


10 |10000 characters needed characters left characters exceeded
parveen goyal Feb 14 at 06:56 AM

Configured availability check does not stop, it only gives the info message. I want to restrict to create reservation if No stock or stock avl but already reserved.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Parveen,

There is no standard solution available. You need to develop a code to restrict to create reservation if the Material not in stock