cancel
Showing results for 
Search instead for 
Did you mean: 

Stop creating sales order if no stock

Former Member
0 Kudos

Hi Gurus

In a situation like No stock in shipping plant, the system should not allow to create (save) the sales order.

Currently though no stock just the sales order can able to create, only the part avilablity will not be confirmed. As such hanging many open P.O. .

Could anyone advise the steps in detail.

Rgds

RG.

Edited by: R G on Dec 15, 2010 10:44 AM

Accepted Solutions (1)

Accepted Solutions (1)

Shiva_Ram
Active Contributor
0 Kudos

As mentioned before, use user exit USEREXIT_SAVE_DOCUMENT_PREPARE in include MV45AFZZ. Here you can add a logic, if VBEP-BMENG is zero, then provide hard error. This will not allow the user to save the sales order.

Regards,

Answers (3)

Answers (3)

reazuddin_md
Active Contributor
0 Kudos

Hi,

Similar your requirement we have configured in other way. We have save the sales order, but with dummy storage location & sch.line category.

& we triggered this storage location when there is no stock available. ( in Tx:OVZJ- we maintained checking rule as "Complete delivery"-to confirm the complete order qtty if stockk available)

stock check is done through std FM: BAPI_MATERIAL_AVAILABILITY.

if system finds ATP stock = Zero. then storage location set as Dummy.

In your case, the same logic you can write, for not to save sales order.

Regards,

Reazuddin MD

0 Kudos

Hi: You can try trigerring a customized Incompletion Procedure which does not allow to save the sales order in the event of confirmation not happening.

Former Member
0 Kudos

you can use USEREXIT_SAVE_DOCUMENT_PREPARE (it is called before the number is generated),

so here you can check the stock is avilable or not, if not then put condition not to save document

Former Member
0 Kudos

hi,

this is a tough requriment.

instead go to MMBE in one screen and open second screen for creation of sales order that will be simple.

of course you can develop your requriment also but here you need PP SD MM integration as well.

balajia