‎2009 Jul 23 4:04 PM
Hi,
My requirement is packing delivery items programatically. I am using BAPI_HU_CREATE for creation of handling units,
BAPI_HU_PACK for packing and WS_DELIVERY_UPDATE for updating the delivery. Every thing is fine, but the packing material also getting added as item in delivery after packing. Where if I pack through VL02N its not. So please clear me if any one came across.
Venkat.
‎2009 Jul 23 4:23 PM
Hi,
After you pack the HU, call the following FM HU_HEADER_UPDATE.
For an HU to be assigned to a delivery you have to just change the VEKP-VPOBJKEY and VEKP-VPOBJ field of VEKP.
VPOBJ will be equal to 01 or 03 depending upon inbound or outbound delivery.
VPOBJKEY will hold the delivery number.
Use the FM to change the value of VEKP fields.
Call the FM with 2 additional FMs in sequnce as follows:-
1. HU_GET_HUS.
2. HU_HEADER_UPDATE.
3. HU_POST.
You do not need to call the Fm to update the delivery.
Regards,
Ankur Parab
‎2009 Jul 23 4:23 PM
Hi,
After you pack the HU, call the following FM HU_HEADER_UPDATE.
For an HU to be assigned to a delivery you have to just change the VEKP-VPOBJKEY and VEKP-VPOBJ field of VEKP.
VPOBJ will be equal to 01 or 03 depending upon inbound or outbound delivery.
VPOBJKEY will hold the delivery number.
Use the FM to change the value of VEKP fields.
Call the FM with 2 additional FMs in sequnce as follows:-
1. HU_GET_HUS.
2. HU_HEADER_UPDATE.
3. HU_POST.
You do not need to call the Fm to update the delivery.
Regards,
Ankur Parab
‎2009 Jul 23 4:36 PM
Hi Ankur Parab ,
Everything is happening as expected in my way. Only thing is the packing material used for HU creation is getting added as an item in delivery which I dont want.
Venkat
‎2009 Jul 28 8:09 AM
Hi,
I am trying the way you suggested. But I need to update the items as well saying, so and so item of delivery is packed in so and so item of HU. Plz..provide some code sample or suggestions.
Venkat
‎2009 Jul 28 8:27 AM
Hi,
The code will be too big to provide.
Just try to understand the concept.
First manually pack your items of a delivery in an HU in VL02N transaction for outbound delivery. Incase of inbound it is VL31N.
Check the fields VPOBJ, VPOBJKEY, UNVEL, UEVEL of table VEKP and VEPO.
Then use the FMs appropriately.
Regards,
Ankur Parab