2017 Aug 09 11:15 AM
Hi Folks,
I am updating KODAT from WS_delivery_update_2 for delivery but not able update in delivery. If anyone know is any field more we have to update in header structure for kodat update in delivery. Below what I have done through this I am able to update picking quantity but not date . Could anyone please suggest.
Loop at gt_datatab into lw_datatab.( data from external file)
WA_VBKOK-VBELN_VL = lw_datatab-vbeln
wa_vbok-posnr_vl = lw_datatab-posnr.
wa_vbok-kodat = lw_datatab-kodat.
SELECT SINGLE vbelv FROM VBFA into l_vbelv WHERE VBELN = WA_VBKOK-VBELN_VL AND posnn = lw_datatab-posnr.
IF SY-SUBRC = 0.
I_VBPOK-VBELN_VL = lw_datatab-vbeln.
I_VBPOK-POSNR_VL = lw_datatab-posnr.
ENDIF.
I_VBPOK-VBELN_VL = lw_datatab-vbeln.
I_VBPOK-POSNR_VL = lw_datatab-posnr.
SELECT SINGLE vbelv posnv FROM VBFA into ( l_vbelv, l_posnv ) WHERE VBELN = WA_VBKOK-VBELN_VL AND posnn = lw_datatab-posnr.
IF SY-SUBRC = 0.
I_VBPOK-VBELN = l_vbelv. " Sales and distribution document
I_VBPOK-POSNN = l_posnv. " Item of an SD document
ENDIF.
I_VBPOK-MATNR = lw_datatab-matnr
I_VBPOK-CHARG = lw_datatab-matnr.
I_VBPOK-PIKMG = lw_datatab-matnr.
APPEND I_VBPOK.
CALL FUNCTION 'WS_DELIVERY_UPDATE_2'
EXPORTING vbkok_wa = wa_vbkok " Header Data
synchron = 'X' commit = 'X'
delivery = lw_datatab-vbeln
update_picking = 'X'
if_database_update_1 = '1'
TABLES vbpok_tab = i_vbpok " Item Data
prot = it_return. " Message Return Table
Endloop.
2017 Aug 11 12:41 PM
Hi,
I got where the issue is it is due to field kzkodat need to set X for KODAT.
2017 Aug 09 12:52 PM
2017 Aug 11 12:41 PM
Hi,
I got where the issue is it is due to field kzkodat need to set X for KODAT.