cancel
Showing results for 
Search instead for 
Did you mean: 

Replace order create with reference with updated CMIR

Former Member
0 Kudos

When an order is created with reference to a quote, the customer material description and code are copied from the quote. I am trying to force the process using user exit MV45AFZZ to read the KNMT table and create the order with updated customer material description and code.

No matter what I try, SAP will copy the values from the quote because it will execute standard code after all the user exists.

Can anyone suggest where it is possible to update the code so that it replaces the SAP standard? The SAP standard code that restores the values is found in the following:

MV45AF0T_TVAP_SELECT

MV45AF0T_TVCPA_SELECT

MV45AF0P_PREISFINDUNG_GESAMT

MV45AFST_STATISTIK_UPDATE.

Thank you,

Bela

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

The user exit was fine, but the logic required a modify xvbap statement for the fields. It is not as simple as just vbap-field or xvbap-field.

The logic was applied in user exit for VBKD, prepare save and save otherwise, SAP would restore the value. It did not work with the user exit for VBAP.

Thank you both for your responses.

Answers (2)

Answers (2)

former_member184080
Active Contributor
0 Kudos

Hi Bela,

Have you tried below ones?

USEREXIT_CUST_MATERIAL_READ in include MV45AFZB

Anyway for more information you can check below thread.

http://scn.sap.com/thread/2121751

Regards, Sai Krishna.

Former Member
0 Kudos

Hi Bela,

Did you tried these two routines in MV45AFZZ.

  USEREXIT_MOVE_FIELD_TO_VBAP

  userexit_save_document_prepare

If that doesn't work try this.

MV45AFZB

USEREXIT_FILL_VBAP_FROM_HVBAP

Thanks,

Siva.