‎2005 Apr 26 3:31 PM
How do I unpick a delivery using the above function module ?
‎2005 Apr 27 9:28 AM
Hi Bala,
I got this from one of my collegue.
The following is a test function module will unpack a specific Delivery Line \Quantity from an existing HU.
The import parameters are the Delivery, Delivery Item, the Dest
HU that you want to pack onto, and the quantity that should be
unpacked from the Source HU.
The unpacked quantity that is to be is turned into a negative number, by this function module, which causes the unpacking to happen. So it assumes that the unpack qty is passed in as a postive number.
*********************************************************
Data Declarations
*********************************************************
DATA:
lv_error_1 TYPE XFELD,
lv_error_2 TYPE XFELD,
lv_error_3 TYPE XFELD,
lv_error_4 TYPE XFELD,
lv_error_5 TYPE XFELD,
lv_error_6 TYPE XFELD.
DATA:
ls_vbkok like vbkok,
li_verko like verko occurs 0 with header line,
li_verpo like verpo occurs 0 with header line.
DATA:
ls_tmeng like vepo-vemng.
*********************************************************
Pack the lower level handling unit onto the higher level one
The packing is done through FM WS_DELIVERY_UPDATE.
*********************************************************
CLEAR: li_verpo, li_verko, LS_VBKOK.
REFRESH: li_verpo, li_verko.
Fill the HU Header
CLEAR: li_verko.
REFRESH: li_verko.
li_verko-exidv = ls_exidv.
INSERT TABLE li_verko.
Fill the HU items.
CLEAR: li_verpo.
REFRESH: li_verpo.
li_verpo-exidv_ob = ls_exidv.
li_verpo-vbeln = ls_vbeln.
li_verpo-posnr = ls_posnr.
li_verpo-tmeng = ( ls_unpack_qty * -1 ).
INSERT TABLE li_verpo.
CALL FUNCTION 'WS_DELIVERY_UPDATE'
EXPORTING
vbkok_wa = ls_vbkok
commit = 'X'
delivery = ls_vbeln
IMPORTING
ef_error_any_0 = lv_error_1
ef_error_in_item_deletion_0 = lv_error_2
ef_error_in_pod_update_0 = lv_error_3
ef_error_in_interface_0 = lv_error_4
ef_error_in_goods_issue_0 = lv_error_5
ef_error_in_final_check_0 = lv_error_6
TABLES
verko_tab = li_verko
verpo_tab = li_verpo
EXCEPTIONS
error_mesage = 9
others = 10.
ENDFUNCTION.
<u><b>IMPORTING</b></u>
LS_VBELN LIKE LIPS-VBELN Delivery
LS_EXIDV LIKE BAPIHUKEY-HU_EXID External Handling Unit Identification
LS_POSNR LIKE LIPS-POSNR Delivery item
LS_UNPACK_QTY LIKE VEPO-VEMNG Base Quantity Packed in the Handling Unit Item
Hope this helps you out.
Thanks & Regards,
Judith.
‎2005 Apr 27 9:28 AM
Hi Bala,
I got this from one of my collegue.
The following is a test function module will unpack a specific Delivery Line \Quantity from an existing HU.
The import parameters are the Delivery, Delivery Item, the Dest
HU that you want to pack onto, and the quantity that should be
unpacked from the Source HU.
The unpacked quantity that is to be is turned into a negative number, by this function module, which causes the unpacking to happen. So it assumes that the unpack qty is passed in as a postive number.
*********************************************************
Data Declarations
*********************************************************
DATA:
lv_error_1 TYPE XFELD,
lv_error_2 TYPE XFELD,
lv_error_3 TYPE XFELD,
lv_error_4 TYPE XFELD,
lv_error_5 TYPE XFELD,
lv_error_6 TYPE XFELD.
DATA:
ls_vbkok like vbkok,
li_verko like verko occurs 0 with header line,
li_verpo like verpo occurs 0 with header line.
DATA:
ls_tmeng like vepo-vemng.
*********************************************************
Pack the lower level handling unit onto the higher level one
The packing is done through FM WS_DELIVERY_UPDATE.
*********************************************************
CLEAR: li_verpo, li_verko, LS_VBKOK.
REFRESH: li_verpo, li_verko.
Fill the HU Header
CLEAR: li_verko.
REFRESH: li_verko.
li_verko-exidv = ls_exidv.
INSERT TABLE li_verko.
Fill the HU items.
CLEAR: li_verpo.
REFRESH: li_verpo.
li_verpo-exidv_ob = ls_exidv.
li_verpo-vbeln = ls_vbeln.
li_verpo-posnr = ls_posnr.
li_verpo-tmeng = ( ls_unpack_qty * -1 ).
INSERT TABLE li_verpo.
CALL FUNCTION 'WS_DELIVERY_UPDATE'
EXPORTING
vbkok_wa = ls_vbkok
commit = 'X'
delivery = ls_vbeln
IMPORTING
ef_error_any_0 = lv_error_1
ef_error_in_item_deletion_0 = lv_error_2
ef_error_in_pod_update_0 = lv_error_3
ef_error_in_interface_0 = lv_error_4
ef_error_in_goods_issue_0 = lv_error_5
ef_error_in_final_check_0 = lv_error_6
TABLES
verko_tab = li_verko
verpo_tab = li_verpo
EXCEPTIONS
error_mesage = 9
others = 10.
ENDFUNCTION.
<u><b>IMPORTING</b></u>
LS_VBELN LIKE LIPS-VBELN Delivery
LS_EXIDV LIKE BAPIHUKEY-HU_EXID External Handling Unit Identification
LS_POSNR LIKE LIPS-POSNR Delivery item
LS_UNPACK_QTY LIKE VEPO-VEMNG Base Quantity Packed in the Handling Unit Item
Hope this helps you out.
Thanks & Regards,
Judith.
‎2005 Apr 27 4:11 PM
Hi Judith,
Thanks for your immediate response. Your suggestion will help in unpacking.
What I need is UNPICKING. We are actually evaluating the RFID processing. The pack/unpack will be done by the RFID processes from the Aii system.
In R3 I am looking for a fucntion module to pick, unpick, incremental and decremental picking. I tried this ws_delivery_update by manipulating the field as follows.
vbpok-plmin = '-' ; All our items are batch managed.
This function module creates LIPS records & VBFA records
with +ve & -ve quantities which cause the VL03N to abend
while displaying multiple batch data in picking view.
Thanks
-bala
‎2005 May 11 6:19 PM
Hi Bala,
I have the same problem.Are you able to figure out how you create the batch split line items using this bapi.
Can you please help me with this.
Thanks for your help.
Raj
‎2005 May 19 5:45 PM
I couldn't use this BAPI directly. I developed a work around to manipulate the input data for this BAPI by reading the existing data from LIPS & VBFA tables. It worked for my process increment / decrement picking.