Skip to Content
0
Former Member
Jul 25, 2013 at 01:04 PM

Pick quantity not updated in delivery

186 Views

Hi All,

I am attaching serial numbers using 'BAPI_OUTB_DELIVERY_CHANGE'..but some how its not updating pick quantity

so using ''SD_DELIVERY_UPDATE_PICKING_1' fm to update pick quantity..

but this also fails to update pick quantity.

below are the parameters passed to this FM

Please let me know if i am missing something???

SELECT SINGLE vgbel vgpos FROM lips INTO (w_vbeln_s , w_posnn_s)
WHERE vbeln = w_100_rf-vbeln.
IF sy-subrc NE 0.
SELECT SINGLE ebeln ebelp FROM ekbe INTO (w_vbeln_s , w_posnn_s)
WHERE belnr = w_100_rf-vbeln.
ENDIF.

wl_vbkok-VBELN_VL = w_100_rf-vbeln.
wl_vbkok-vbeln = w_vbeln_s.
wl_vbkok-vbtyp_vl = 'J'.
LOOP at t_itm_data INTO wa_itm_data.
wl_vbpok-vbeln_vl = w_100_rf-vbeln.
wl_vbpok-posnr_vl = wa_itm_data-deliv_item.
wl_vbpok-vbeln = w_vbeln_s.
wl_vbpok-posnn = w_posnn_s.
wl_vbpok-matnr = wa_itm_data-material.
wl_vbpok-werks = w_100_rf-werks.

wl_vbpok-taqui = 'X'.

wl_vbpok-lianp = c_x.
wl_vbpok-lgmng = wa_itm_data-dlv_qty.
wl_vbpok-pikmg = wa_itm_data-dlv_qty.
wl_vbpok-lfimg = wa_itm_data-dlv_qty.

wl_vbpok-umvkz = 1.
wl_vbpok-umvkn = 1.

wl_vbpok-charg = wa_itm_data-batch.
APPEND wl_vbpok to tl_vbpok.
CLEAR wl_vbpok.

wl_prot-vbeln = w_100_rf-vbeln.
wl_prot-posnr = wa_itm_data-deliv_item.
wl_prot-matnr = wa_itm_data-material.
wl_prot-lfimg = wa_itm_data-dlv_qty.
APPEND wl_prot TO tl_prot.
ENDLOOP.

CALL FUNCTION 'SD_DELIVERY_UPDATE_PICKING_1'
EXPORTING
vbkok_wa = wl_vbkok
* SYNCHRON = ' '
NO_MESSAGES_UPDATE_1 = 'X'
tables
vbpok_tab = tl_vbpok
PROT = tl_prot
* IT_PACKING =
.
READ TABLE tl_prot INTO wl_prot WITH KEY msgty = c_e.

IF sy-subrc NE 0 OR tl_prot[] IS INITIAL.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
ENDIF.