cancel
Showing results for 
Search instead for 
Did you mean: 

User exit MV45AFZZ

Former Member
0 Kudos

Hello,

We have a requirement that only can be met through user exit MV45AFZZ. We need the system to assign some values in the items in the sales order. When we create (insert) the items, the exit works fine. But when we try to change any items it doesn´t work anymore.

Is there an user exit for item changing instead of item creatiion besides MV45AFZZ?

Thanks in advance.

Adriano Cardoso

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

In the exit move_flied_to_vbap in MV45AFZZ,, check for the type of action you perform...whether update(change) or insert.this should solve your problem. let me know if you need any further information.

Thanks

Answers (2)

Answers (2)

Jelena
Active Contributor
0 Kudos

There are not enough details in the original post - what are you trying to do exactly?

In general, USEREXIT_MOVE_FIELD_TO_VBAP is the correct user exit for this purpose. You haven' mentioned if the problem is that the user exit is not triggered or that the code is not working.

There should be no coding by sy-tcode. These user exits also work with BAPIs ad other sales documents (e.g. VA41...3 for contracts). There are other fields that may be used if it's necessary to code differently for creation/update. However, this doesn't even seem to be the case here, as far as I understand.

Former Member
0 Kudos

Hi,

I am not sure which Form are you using in MV45AFZZ.

But try USEREXIT_MOVE_FIELD_TO_VBAP.

If it dosent work try USEREXIT_SAVE_DOCUMENT or USEREXIT_SAVE_DOCUMENT_PREPARE

If you want to control it according to the Transaction Codes also, you can use conditions like

IF sy-tcode = 'VA01' OR sy-tcode = 'VA02'.

ENDIF.

Hope it helps.

Thanks.

Best Regards,

HP