Hi,
i have some problems with the material availability in my program.
We created a program to deliver open sales orders. So the user can build a list with open sales orders he want to deliver.
For this list, we check the material availability with the function module BAPI_MATERIAL_AVAILABILITY
and set the sum of the available material as default value for delivering.
For deilivery creation we use the function module BAPI_OUTB_DELIVERY_CREATE_SLS.
No our problem. The first function modules returns that 1700 pices are available. The user approved the delivery and the second function module tries to create the delivery with 1700 pic. But the BAPI_OUTB_DELIVERY_CREATE_SLS returns a error with message "Only 150 pic of material XXX available'.
Has anybody a solution for this problem? It`s not possible to submit the function BAPI_OUTB_DELIVERY_CREATE_SLS a check rule or anything else.
Regards,
Anton