I've searched for days and found nothing. My problem is, that I have to create a return delivery out of an QM-Report. Everything works fine.
However, the customer wants to change the delivery address manually.
Flow:
QM02 (QM-Report) => Return order with BAPI_PO_CREATE1
(different address works fine) => Delivery with BAPI_OUTB_DELIVERY_CREATE_STO
(different address from PO not working)
My question: Is there a possibility to change the delivery address of the outbound delivery? Do I have to implement a BADI or is there a simple solution?
If anything is missing, I will update the question.
Function
BAPI_OUTB_DELIVERY_CREATE_STO
allows you to create deliveries from PO but you can't handle many of the delivery fields.After you have created the deliveries, you should use
WS_DELIVERY_UPDATE_2
function to update any field.This is not a BAPI, and consequently it is not well documented, but is widely used for these changes.
Best regards
UPDATE
Here's a snippet: