on 03-08-2018 6:07 AM
How we can block or stop order being saved if stock not available
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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".
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,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
97 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.