cancel
Showing results for 
Search instead for 
Did you mean: 

Stop sales order if order quantity exceeds available quantity

Former Member
0 Kudos

Dear All,

I need to stop saving sales order if user enters more quantity in sales order then available quantity.

For example : Available stock : 20

                       sales order stock 30 then it system should stop creating sales order. please help.

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

Hi Sameer,

This can be achived thru User Exit. you may need this requirement .

So , what i suggest is Have some customs table wherein you maintain document type and customers( if check doesnt need to happen,) .. you can easily make use of table itself rather than making code change incase in future you allow to create a sales order for a particular customer and you can add other document type as well

With Regards

S.Siva

Former Member
0 Kudos

Hi,

If you require to block sales order creation for more than available qty, then code the same using user exits. you may try with Userexit_save_document_prepare or userexit_check_vbap.

Former Member
0 Kudos

thank you very much for your reply let me explain you in detail I have document type ZPBO and I need above requirement only for ZPBO document type so please tell me what logic needs to written in ABAP.

jignesh_mehta3
Active Contributor
0 Kudos

Hello Sameer,

Speak to your ABAPer, he can easily put in logic in the ABAP to activate the Customization only for a particular Documents Type.

Thanks,

Jignesh Mehta

Former Member
0 Kudos

Sameer, As Jignesh rightly advised, discuss with your Abaper to write 'If schedule line confirmed qty is not equal to order qty then do not save sales order and give error of insufficient qty available or similar'.