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: 

Extension2 to be used in BAPI_OUTB_DELIVERY_CHANGE

Former Member
0 Kudos

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

4 REPLIES 4

Former Member
0 Kudos

Hi,

Hope you had implemented the above code in enhancement V50B0001, component EXIT_SAPLV50I_010. After ENDLOOP statement check whether the internal table CT_VBPOK is holding the updated data.

Regards

Vinod

0 Kudos

yes.after the loop it upates the table vbpok but somehow it does not get updated in the LIPS table. Am not sure how this will update the LIPS table though

VBELN_VL POSNR_VL ZECCN ZLINSYM

1 0000054513|000010 |EAR99 |TEST_LICENSE_1 |

2 0000054513|000020 |0A001 |TEST_LICENSE_2 |

______ ___________________________________________________________________________

0 Kudos

Hi,

Check Line number 105 (Include lv50sfz1.) of Function module WS_DELIVERY_UPDATE_2 which called from the BAPI for updation of delivery.

Documentation of include LV50SFZ1 reads

* This include can be used for customer projects and IS-specific
* enhancements
* Location: After reading the delivery before any update is done

Check whether the updated value is appearing in structure VBPOK_TAB inside this include.

Regards

Vinod

0 Kudos

In lv50sfz1,put the Z fields value to xlips