0
votes

I have the following requirement. I need to save some parameters in the table VBAP. I've created additional fields in an append structure for that. Now, when a sales document is being saved, the parameters have to be updated as well.

For this I've been using USEREXIT_SAVE_DOCUMENT in the program SAPMV45A. There I loop over the table XVBAP where I set the fields.

This works as expected for existing positions. When a new position is being added the fields won't be updated and are empty.

What am I missing here? Do I have to use a different user exit for new positions?

Thanks in advance.

1
As far as I remember, you can use "USEREXIT_MOVE_FIELD_TO_VBAP" in MV45AFZZMustafa Hamit
@MustafaHamit After quick debugging this seems to be the place I'm looking for. Thanks for that. I'll let you know once I've implemented my logic there.Alex K
and for your info: always place your code (mcve) when asking a question, what it seems trivial for you may be not trivial in fact, and even in single line one can make drastic errorsSuncatcher
@Suncatcher I'll keep that in mind. Thanks for the reminder.Alex K

1 Answers

2
votes

you can use "USEREXIT_MOVE_FIELD_TO_VBAP" in MV45AFZZ