02-21-2017 5:11 PM
We have the external number range created and I am able to go into VL32N and enter an external number with the packing material and create and pack the HU.
However, I need to do this programmatically. I am trying to use FM PROCESS_HU_INBOUND_DLVRY, but I get a hard error that V51P - item was not found - process cancelled.
Code is as follows:
*$*$ Setup for create HU
lw_object-object = '03'.
lw_object-objkey = lw_lips-vbeln.
passing the external HU number in p_exidv to the structure
lw_huhdr-exidv = p_exidv.
lw_huhdr-exida = 'F'. " Externally assigned
lw_huhdr-vhilm = pv_packmatnr.
passing the external HU number id to the items structure & to the
I_hu_id export parameter
lw_items-exidv = lv_huid = p_exidv.
lw_items-velin = 1.
lw_items-posnr = lw_lips-posnr.
lw_items-belnr = lw_lips-vbeln.
lw_items-quantity = ls_data_9001-emenge.
lw_items-meins = lw_lips-meins.
lw_items-matnr = lw_lips-matnr.
* lw_items-charg = lw_label_table-charg.
lw_items-werks = lw_lips-werks.
lw_items-lgort = lw_lips-lgort.
* lw_items-vfdat = lw_label_table-vfdat.
APPEND lw_items TO li_items.
CALL FUNCTION 'PROCESS_HU_INBOUND_DLVRY'
EXPORTING
i_hu_id = lv_huid
i_new_hu = 'X'
i_update_db = 'X'
i_create_hu = 'X'
i_reference_object = lw_object
i_hu_header_main = lw_huhdr
i_hu_items = li_items
i_save_step = 'ITEM'
i_pack_activity = 'MAT'
i_delivery_type = '7'
i_packing_activity = 'PACK'
i_pack_type = 'MAT'
Anyone have experience with Externally assigned HU number ranges?
02-22-2017 6:36 PM
I have resolved my issue. You can use BAPI_INB_DELIVERY_CONFIRM_DEC fm to send the externally assigned HU number and it is created and packed.
02-22-2017 6:36 PM
I have resolved my issue. You can use BAPI_INB_DELIVERY_CONFIRM_DEC fm to send the externally assigned HU number and it is created and packed.