cancel
Showing results for 
Search instead for 
Did you mean: 

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

former_member429272
Participant
0 Kudos

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

Lakshmipathi
Active Contributor
0 Kudos

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:

https://cse.google.com/cse/home?cx=013447253335410278659:5di2969x5we

https://www.google.com/cse/home?cx=013447253335410278659:k8ob9ipscwg

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.

former_member429272
Participant
0 Kudos

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

A Big thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Form: USEREXIT_SAVE_DOCUMENT_PREPARE or USEREXIT_SAVE_DOCUMENT

Data lv_labst like labst.

LOOP AT XVBAP.

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**

ENDIF.

ENDLOOP.

BR

Engin Karaboğa

Answers (2)

Answers (2)

JL23
Active Contributor

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?

Jelena
Active Contributor

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

former_member429272
Participant
0 Kudos

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 .

JL23
Active Contributor
0 Kudos

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

ankurch
Active Contributor
0 Kudos

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.

Thanks,