Skip to Content

How we can block or stop order being saved if stock not available

Mar 08 at 06:07 AM


avatar image

How we can block or stop order being saved if stock not available

10 |10000 characters needed characters left characters exceeded

Before posting a question, please make sure you have searched all existing content -- as the answers may already be available.

Try to use these search options, too:

SAP Search

You can find more important guidelines in thecommunity rules of engagementand learn questions and answers best practiceshere.

If you have searched for answers already, then please make sure your question outlines the steps you took while searching for your answer and what you have already tried to solve this on your own. This way, members will know that you searched and that you were unable to find the answer you were after. You may also want to include screenshots that best describes the topic that your question relates to.

G Lakshmipathi

Thank you so much sir , I get many solutions through your posts really i learned a lot from you

A Big thanks

* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
avatar image
Former Member Mar 09 at 02:50 PM

Hi Ravi,

The standard SAP does not meet this requirement. That is why, if there is not sufficient stock, creation of sales order could be prevented via modification before save it. Something like below illustrated code parts could be written.

Include: MV45AFZZ


Data lv_labst like labst.


Select labst from MARD into lv_labst

where matnr EQ xvbap-matnr AND

werks EQ xvbap-werks AND

lgort EQ xvbap- lgort.

IF lv_labst LT xvbap-kwmeng.

Message '' There is not sufficient stock etc" type 'E'. ** or a message could be created via SE91**




Engin Karaboğa

10 |10000 characters needed characters left characters exceeded
Jürgen L
Mar 09 at 04:42 PM

This whole intention has no logic in a sense of a ERP system.

How would MRP run be enabled to create requirements for production or procurement if no demand was entered?

And even if you do planning manually, how would a planner know what he has to produce if there are no sales orders visible?

And how long could you hold the customers order unprocessed on a CSR desk before the customer gets impatient and is looking for another supplier?

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

Would hate to be a customer of this company.

- Hello, I'd like to place an order for X items.
- Sorry, we don't have them available.
- Hm, OK but can you just take an order and then let me know when you have this?
- Computer says "no".


Thank you so much Jurgen My concern is also same , we required to capture demand for one sales org and not for another sales org

Please help us how we can achieve this .


Pretty much anything what has no logic can only be achieved with own coding in exits

Ankur Chauhan Mar 08 at 10:23 AM

Hi Ravisankar,

Your requirement cannot be fulfil by standard solution because system checks the quantity only when you are posting the material in delivery, so you have to enhance the code here with your ABAP team through user exit in VBAP table.


10 |10000 characters needed characters left characters exceeded