cancel
Showing results for 
Search instead for 
Did you mean: 

Auto packaging in outbound delivery through abap code

Daderiga
Explorer
0 Kudos
495

Hi, I have this requirement where in exit ZXLTOU02 I create an HU with BAPI_HU_CREATE and then assign this HU to the outbound delivery with BAPI_HU_CHANGE_HEADER.

I tried to pack the material of the outbound delivery with BAPI_HU_PACK in the same user exit ZXLTOU02. 

My problem here is that I can get all done but in the outbound delivery I have the HU with a packed material but not the one in the outbound delivery. I'ts like the material item is not linked to the outbound delivery.

Here 2 pics.

The first one with my HU and its material linked to it.

The second one showing that, the material of the outbound delivery remains unpacked even though the first pick shows other thing.

Daderiga_0-1721289942368.png

Daderiga_1-1721289996770.png

I have read that you can update the outbound delivery and assign the HU and it's content through WS_DELIVERY_UPDATE but I can not find where I should implement this.

Any idea is welcome

 

View Entire Topic
baris_yalcin
Advisor
Advisor
0 Kudos

Hi Daderiga,

the Outbound Delivery OData API supports the assignment of a free/standalone Handling Unit to an Outbound Delivery:
https://help.sap.com/docs/SAP_S4HANA_CLOUD/588780cab2774a7ab9fffca3a7f919fe/27ca8a2be9924c76bdea2ab8...

I think that you could use also the Function Module WS_DELIVERY_UPDATE_2 for your purpose by using parameter IT_HANDLING_UNITS_1.

Best regards,
Barış Yalçın

Daderiga
Explorer
0 Kudos
I achieved it by BDC record and using a function with the IN BACKGROUND TASK DESTINATION 'NONE' statement.