05-06-2009 10:40 AM
Hi All,
I want to UNASSIGN (not delete) a handling unit from an outbound delivery. Is there any Function module or BAPI? Please help.
Thanks,
S S K
05-06-2009 10:48 AM
Yes u can update the delivery by calling
WS_DELIVERY_UPDATE.
Before that call FM
HU_PACKING_AND_UNPACKING
and pass ur material and packing no. and other relevant data in the parameter structure of function module.
05-06-2009 11:07 AM
HU_PACKING_AND_UNPACKING is not my requirement. I just want to unassign the HU and the HU should remain intact.
Coming to WS_DELIVERY_UPDATE which I have tried, but it does not work .
Thanks,
S S K
05-06-2009 12:06 PM
Hi,
You can achieve this using 3 FM.
1. 'HU_GET_HUS'
2. V51F_HU_HEADER_UPDATE
3. HU_POST
In the first FM give the HU number.
This will fill the global tables needed by the 2nd FM.
Using V51F_HU_HEADER_UPDATE, change the value of field VEKP-VPOBJKEY.
This field will contain the link between HU and a delivery.
Then call HU_POST.
This will help you to unassign the HU from the delivery.
Regards,
Ankur Parab
10-06-2009 9:48 PM
>
> Using V51F_HU_HEADER_UPDATE, change the value of field VEKP-VPOBJKEY.
> This field will contain the link between HU and a delivery.
If we want to unassign the HU from the outbound delivery we would need to change both VPOBJ and VPOBJKEY. I would want VPOBJ to be '12' for "Non-Assigned Handling Unit". How do I know what value to give to VPOBJKEY?
Thanks,
Rocky
11-13-2014 5:20 PM
Hey Rockford,
Did you ever find out how to do this?
I have a requirement where I need to do the same thing!
I tried with BDC but it brings different messages all the time... so that was a no go!
Appreciate it!
12-09-2014 9:28 PM
Hi Fernanda,
Try the following FM's, in this order:
1. HU_PACKING_REFRESH - initialize internal HU data
2. HU_GET_HUS - get HU numbers and initialize internal data
3. V51P_DELETE_RELATIONSHIP - delete assingnment from delivery. Fill parameter it_hus with it_venum from previous FM
4. HU_POST
Commit work after HU_POST.
12-09-2014 9:36 PM
Thanks for the reply... I ended up being able to do it with BDC and it worked fine...
I tried the FMs before and I kept getting a message that is a warning in VL02N but it showed as error in the FM!
Really appreciate the help!