Skip to Content
0

KODAT is not updating through WS_DELIVERY_UPDATE_2

Aug 09, 2017 at 10:15 AM

59

avatar image
Former Member

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.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
avatar image
Former Member Aug 11, 2017 at 11:41 AM
0

Hi,

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

Share
10 |10000 characters needed characters left characters exceeded
G Lakshmipathi
Aug 09, 2017 at 11:52 AM
0

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.

Share
10 |10000 characters needed characters left characters exceeded