Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

KODAT is not updating through WS_DELIVERY_UPDATE_2

former_member486356
Participant
0 Kudos
865

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.

1 ACCEPTED SOLUTION

former_member486356
Participant
0 Kudos
232

Hi,

I got where the issue is it is due to field kzkodat need to set X for KODAT.

2 REPLIES 2

Lakshmipathi
Active Contributor
0 Kudos
232

If you are not a functional consultant, better discuss with them as it depends on various parameters. You can also search Google as to how the Pick Date is flowing.

former_member486356
Participant
0 Kudos
233

Hi,

I got where the issue is it is due to field kzkodat need to set X for KODAT.