I am using BAPI_SALESDOCU_CREATEFROMDATA to create sales order from a non-SAP system. It is working fine in normal case. But if the entered order quantity for a material is more than the maximum available in a batch, it dumps. When I ran the BAPI in test mode, a pop up screen comes in showing material stock. And when I just enter, system creates a sales order without assigning any batch to line item. My requirement is to do the same while calling BAPI from outside ie if the ordered quantity is more than the available stock, it should create the sales order without assigning a batch at line item. Is there any way I can achieve it? Is there any indicator or any field in any BAPI table which allows me to achieve this?
Thanks for your help!