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: 

Regarding the userexit "Userexit_save_document "

Former Member
0 Kudos

Hi There,

My requirement is to update the VBAP-KWMENG by Y value in the exit userexit_save_document .

While debugging I can see the updated value 'Y'. But after execution, sales order item qty still shows the 'X' value which is not updated value 'Y'.

Could anyone tell me how to commit the VBAP table in the exit userexit_save_document .

Thanks in advance...

Regards,

Geetha

7 REPLIES 7

Former Member
0 Kudos

Here you have to use XVBAP Structure otherwise data will not update.

Thanks

Seshu

0 Kudos

Yes I did...Here is my code...

if tkomp-prsok = 'X'.

xvbap-kwmeng = v_kwmwng(which is a qty value).

xvbap-updkz = updkz_update.

vbap-kwmeng = xvbap-kwmeng.

endif.

xvbap-kwmeng and vbap-kwmeng values are updating with v_kwmwng value while debugging. After executing, vbap-kwmeng is not updating the v_kwmwng value.

Regards,

Geetha

0 Kudos

Can you write same code at

USER_EXIT_SAVE_DOCUMENT _PREPARE or

USEREXIT_MOVE_FIELD_TO_VBAP

Thanks

Seshu

0 Kudos

I copied the same code in "userexit_save_document_prepare". But it didn't help...Still table is not updating the VBAP qty field.

Any more suggestions?

Regards,

Geetha

0 Kudos

Hi Geetha,

Did you find any good solution to update xvbap?

I have the same sitution where xvbap is not getting update.

Your reply is much appreciated.

Banu

Former Member
0 Kudos

Updated the value in exit

userexit_move_field_to_vbap

Former Member
0 Kudos

I'm having the same problem. How did you finally get it to work? I'm trying to change the gl account only on the debit memo request if it's a certain project type. It updates when I put it in debug, but it's getting overwritten because of the material record moving corresponding fields to vbap and we're not changing the actual material gl account in the master table.