cancel
Showing results for 
Search instead for 
Did you mean: 

How to unpack HU from another HU using a function module ?

former_member408386
Discoverer
0 Kudos


Hello,

     I'm searching the right way to unpack a box from a palet. I need to make disappear the overpacking. I have not found a standard program to do it so I decided to develop a specific program. I tried to use the HU_PACKING_AND_UNPACKING function but without success.

     Please could you provide me sone help ? May be someone has found another way ? May be someone can explain how to paramter the FM in my case?

     Thank in advance.

     Best regards

Gregory

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

Have you tried BAPI_HU_UNPACK.

Cheers,

Nag

former_member408386
Discoverer
0 Kudos

Hello Naga,

     Thank you for your answer.

     For me BAPI_HU_UNPACK permit to extract an item from an HU, not a HU from another.

     Have you already tried to do this with BAPI_HU_UNPACK ?

     If it's the case, could you explain how do you fill the different input/output structures ?

     Best regards.

Gregory     

Former Member
0 Kudos

Hello Gregory,

THis FM works for freely defined HUs. Does not work for Delivery/Shipment.

You have just pop in- external id number and lower HU for unpacking along with plant and Sloc.

Cheers,

Nag

former_member408386
Discoverer
0 Kudos

Naga,

  We use HU for internal purpose in this case. The HU has been defined by an inbound delivery. The top HU is free in VEKP table. So it should run in my case.


  In se37 for BAPI_HU_UNPACK, I fill :

  ->  HUKEY = my top HU,

  -> ITEMUNPACK-UNPACK_EXID = my low HU

  -> ITEMUNPACK-HU_ITEM_TYPE = 3

    

The BAPI return the following message : HUGENRAL 308 => Packaging data was saved. Transfer order &1 was created


Message_V1 gave me a number 35140, but the transfer order doesn't exist ...


No change seems have affected my HUs ... is there any commit to do ?

Thank in advance.

Former Member
0 Kudos

Hello,

Yes.. its BAPI.. BAPI_TRANSACTION_COMMIT should be followed .

Cheers,

Nag

former_member408386
Discoverer

Thank you very much. It works fine with the below code :

data : w_ITEMUNPACK like BAPIHUITMUNPACK , w_RETURN like BAPIRET2 occurs 0 .

w_ITEMUNPACK-HU_ITEM_TYPE = '3'.                                        " to extract only the HU
w_ITEMUNPACK-UNPACK_EXID  = '00000000001000435732'.   " my low HU

CALL FUNCTION 'BAPI_HU_UNPACK'
  EXPORTING
    HUKEY               = '00000000002000036103'                             " my top HU
   ITEMUNPACK          = w_ITEMUNPACK
   TABLES   RETURN              = w_RETURN   .

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

Have a good day!

Gregory

Answers (0)