cancel
Showing results for 
Search instead for 
Did you mean: 

How to trigger Re-pricing in SAP SD Orders?

prince_joshi
Explorer

Hello Everyone,

I have below doubts regarding SAP SD pricing:

  1. How can we make sure re-pricing should happen whenever there is any change in sales order.
    Consider a scenario where user is creating as Sales Order using 'VA01'. User has provided Sold to party, Ship to party, Incoterms, Line items details(Material, quantity, item category) when user clicks enter Pricing gets trigger, during that transaction itself user changes "Ship to party" or user changes "Incoterm" or change of any field at invoice line we wanted pricing should re-trigger.
    I tried using the available user exists "USEREXIT_NEW_PRICING_VBAP" or "USEREXIT_NEW_PRICING_VBKD" but these only triggers either for change in invoice line item or customer group/price group. I wanted a userexist/badi/enhancement point if anything in Sales order(header/line item/customergroup/price group) is changing we wanted to trigger re-pricing.
  2. Also, could you please suggest how we can re-trigger pricing by code? I read some previous queries where people suggested to use standard subroutines using pricing types("B" or "C") but still not sure which subroutines and is that the best practice to re-trigger pricing?

I have this requirement because we are calling some external API during sales order create/change using that API response we are showing an POP up screen to user to select one of the condition type that will be used for pricing.

So, we don't want user to see multiple pop up screens if user changes multiple fields Ship to party from header, quantity from line item or incoterm. We wanted to club the changes and trigger single API call so to show only single popup screen.

Could you please help/suggest how can I achieve above.

Just for information: I didn't work much on SAP SD before. So not aware of these details but will be thankful for your suggestions.

Regards,
Prince

Accepted Solutions (0)

Answers (1)

Answers (1)

Lakshmipathi
Active Contributor

For sale order header, you can consider USEREXIT_PRICING_PREPARE_TKOMK and for any item level change, try USEREXIT_PRICING_PREPARE_TKOMP which is there in MV45AFZZ

Now coming to repricing, since your requirement is during sale order creation, validating copy controls won't meet your requirement. You need to check table T685A where if the field KMANU is set to C, you continue your user exit just by taking this value, else, consider C. Most importantly, if you use any custom field for pricing, please see that the same is inserted in table T681F; else, it won't work. Any custom field has to be filled inside the exists I referred above