Skip to Content
0
Former Member
Sep 23, 2010 at 07:32 AM

Extension2 to be used in BAPI_OUTB_DELIVERY_CHANGE

893 Views

Hi,

I am using the bAPI BAPI_OUTB_DELIVERY_CHANGE to update two zfields in table LIPS but am unable to update the same using the extension table. I have searched for this post but did not get a satisfying answer for the same.

I found that the BADI SMOD_V50B0001 needs to be implemented which will then update the structure. Also i have tried using the exit wherein the header table LIKP gets updated but the LIPS table does not. my code for your reference is as below.

read table extension2 with key param = 'LIKP'

row = 1

field = 'LIFEX'.

if sy-subrc = 0.

cs_vbkok-lifex = extension2-value.

endif.

endif.

  • Update the LIPS table through theVBPOK structure

DATA: ls_extension1 TYPE bapiextc,

ls_extension2 TYPE bapiext,

ls_vbpok TYPE vbpok,

lv_tabix TYPE sy-tabix..

IF extension2[] IS NOT INITIAL.

LOOP AT ct_vbpok INTO ls_vbpok.

READ TABLE extension2 INTO ls_extension2

WITH KEY param = 'LIPS'

row = ls_vbpok-posnr_vl

field = 'ZECCN'.

IF sy-subrc = 0.

ls_vbpok-zeccn = ls_extension2-value.

MODIFY ct_vbpok FROM ls_vbpok TRANSPORTING zeccn.

ENDIF.

READ TABLE extension2 INTO ls_extension2

WITH KEY param = 'LIPS'

row = ls_vbpok-posnr_vl

field = 'ZLINSYM'.

IF sy-subrc = 0.

ls_vbpok-zlinsym = ls_extension2-value.

MODIFY ct_vbpok FROM ls_vbpok TRANSPORTING zlinsym.

ENDIF.

ENDLOOP.

ENDIF.

Please give your valueable suggesstions.

Thanks.

Rasika