cancel
Showing results for 
Search instead for 
Did you mean: 

restriction on reservation in maintenance order

former_member196951
Active Participant

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.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member

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".

former_member196951
Active Participant
0 Kudos

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.

peter_atkin
Active Contributor
0 Kudos

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

PeteA

Former Member

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.

Paul

Former Member
0 Kudos

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.

TRE

former_member196951
Active Participant
0 Kudos

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.

MTerence
Active Contributor
0 Kudos

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

Regards

Terence

peter_atkin
Active Contributor
0 Kudos

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

PeteA

JL23
Active Contributor
0 Kudos

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?

former_member196951
Active Participant
0 Kudos

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.

JL23
Active Contributor
0 Kudos

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.