Application Development and Automation 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: 
Read only

SAVE_DOCUMENT_PREPARE update to LIPS issue

former_member194669
Active Contributor
0 Likes
3,594

I am using the BAdi LE_SHP_DELIVERY_PROC and using method SAVE_DOCUMENT_PREPARE and simply writing the following code update for updating LIPS_KVGR1


if sy-tcode eq 'VL02N'.
loop at ct_xlips into wa_lips.
wa_lips-kvgr1 = '01'.
modify ct_xlips from wa_lips transporting KVGR1.
endloop.
endif.

But Its not updating the field when user not changed any fields in VL02N and simple press save.

Or i need to use any other userexit/badi.

My objective is to update LIPS-KVGR1 field thru VL02N

I am using the BAdi LE_SHP_DELIVERY_PROC and using method SAVE_DOCUMENT_PREPARE and simply writing the following code update for updating LIPS_KVGR1


if sy-tcode eq 'VL02N'.
loop at ct_xlips into wa_lips.
wa_lips-kvgr1 = '01'.
modify ct_xlips from wa_lips transporting KVGR1.
endloop.
endif.

But Its not updating the field when user not changed any fields in VL02N and simple press save.

Or i need to use any other userexit/badi.

My objective is to update LIPS-KVGR1 field thru VL02N

11 REPLIES 11
Read only

Former Member
0 Likes
2,153

Hi,

Does the control goes to the code while you save delivery without changing anything ?

Regards

Vinod

Read only

0 Likes
2,153

Control is comes to this badi method

Read only

Former Member
2,153

Try also to set field UPDKZ in the table ct_xlips.

Kind regards.

André Witt

Read only

0 Likes
2,153

I have set the UPDKZ in CT_XLIPS but it getting "update Terminated" while saving.

Read only

0 Likes
2,153

Hi,

Have you set ct_xlips-updkz to 'U' ? Are you getting any short dump ?

Regards

Vinod

Read only

0 Likes
2,153

No short dumps. But update terminated error message

Read only

0 Likes
2,153

The update error should raise a shortdump, could you please check in ST22 and post the error here.

What you could do ist, set a break-point into your programming code, make a change in delivery and check then, how the update-identifier in the different tables are stored. Perhaps you need also to set the update-identifier also in header level.

Kind regards

André

Read only

Former Member
0 Likes
2,153

I dont think that COMMIT WORK will be executed if you dont change anything in VL02N.

That might be the reason why it was not updated.

--

Reddy

Read only

Former Member
0 Likes
2,153

This is a code that i have used previously and worked for all cases....check if it helps

LOOP AT ct_xlips ASSIGNING <lf_lipsvb>

WHERE posnr = lv_posnr

or uecha = lv_posnr.

<lf_lipsvb>-updkz = 'U'.

<lf_lipsvb>-some field= lv_zaott_upsno.

ENDLOOP.

Read only

former_member194669
Active Contributor
0 Likes
2,153

Issue resolved.

We need put entry (old value) in ct_ylips table.

Read only

0 Likes
2,153

Hello,

I am facing the same issue of updating LIPS table. I am trying to update the field LIPS-LGMNG.

Can you please specify, exactly what entry we have to make in ct_ylips Table??

Regards