cancel
Showing results for 
Search instead for 
Did you mean: 

Pack existing HU into another existing HU both assigned to Outbound Delivery

Daderiga
Explorer
0 Kudos
271

Hi,

I have this requirement to pack an existing HU into another HU through abap code.

My scenario:

I have 2 HUs, one of them has a material assigned and the other one is just an empty HU.

Daderiga_0-1721994004287.png

I need to pack the first one and it's content into the second one.

Im trying to achieve this this way:

1- In a Z program I create the new empty HU.

2- Assign it to the Outbout Delivery

3- Once assigned, I use the BAPI_HU_PACK to pack the first one (with the material) into the second one (empty) so I can have 3 levels -> Top Hu (ump), Second HU (ump working as a box) and it's material.

When I execute the BAPI_HU_PACK I get this error HUFUNCTIONS 261 'Processing of HUs for selected objects not possible'

I think it's because once the HU is assigned to the Outbound Delivery you cant 'repack' it into another HU but if you do so manually, there's no problem.

Any idea?

 

Thanks in advance.

View Entire Topic
DominikTylczyn
Active Contributor
0 Kudos

Hello @Daderiga 

Again, you can't use BAPI_HU_* functions to pack deliveries. You have already had a similar discussion here: Auto packaging in outbound delivery through abap code

Best regards

Dominik Tylczynski

Daderiga
Explorer
0 Kudos
Yes, it's similar although not the same scenario. Anyways that don't answer my problem. Thank you anyway!