Hi community,
Another blazing fast and short blog post of mine. It seems I have come across a bug in standard bapi BAPI_OUTB_DELIVERY_CREATE_SLS.
I was trying to use it to deliver completely a sales order, but I ran into an interesting issue.
This BAPI calls function module RV_DELIVERY_CREATE, but, alas, it calls it without a "selektionsdatum", which seems to be what the "due_date" in the BAPI is for.
I'm not sure about this, but the fact is, if I populate this field (selektionsdatum) with the value from due_date, it works (for me... in the system I work with...).
So what I did was implement an implicit enhancement at the beginning of the BAPI, and I store the value of due_date in the attribute of a global class.
Then I created another implicit enhancement implementation at the beginning of RV_DELIVERY_CREATE and get the due_date into selektionsdatum.
There ya go.
If this is helpful, great. If it's not, I'm sorry.
If I'm terribly mistaken about this, let me know.
EDIT: Andrea Olivieri mentioned below, in the comments, that if you populate the due_date and the ship_point, it might work. Or, at least, it worked for him. Check below for his example.
Cheers,
Bruno