cancel
Showing results for 
Search instead for 
Did you mean: 

Pricing Procedure Routines

Former Member
0 Kudos

Hi,

I am looking how to calculate and store values in the pricing procedure and then pass these values to a userexit when saving the sales order.

I know I can perform calculations in the alternate calculation routine and store the value in the subtotal XWORKH etc.

I ca use the requirement type to trigger those calculations.

What I need to know is how can I pass these values to the Save Document user-exit or any other user-exit at that level.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Thank you Amit for helping.

I think I kind of got a handle on it but please feel free to add to it.

I am going to pass calculaed values from pricing procedure to zvariables that will be defined in the KONP and KOMG structure.

I want to do this because at the save document level I want to do some validations based on these values that were calculated at the pricing procedure level.

Former Member
0 Kudos


Thanks Saad -

You are going in right direction, you can handle it by adding  variable in KOMG structure and do vallidations.

or

you can also think of doing calculation in pricing procedure by

  • Adding a new step in pricing procedure
  • Reference this step from Original pricing condition type using (From and to Column in Pricing  Procedure)
  • perform your calcualtions using Alt calculation formula.
  • Store your result in Subtotal 1-6 ( Carry over your value to KOMP-KZWI1- KZWI6)
  • Put your validation and compare your pricing by checking subtotals in requirement column  and control the document the way you want to control it.

Try any solution and let us know if you face an issue.

Thanks & Regards

Amit Gupta

Answers (2)

Answers (2)

Former Member
0 Kudos

So I need to add new variables to pricing structure KONP, KOMK etc

Can you please explain the steps?

Former Member
0 Kudos

Hello -

If you explain your business process in more detail or tell us what exactly you want to achieve then we can help you in better manner.

Thanks & Regards

Amit Gupta

Former Member
0 Kudos

Hi -

You can call your logic in User exit MV45AFZZ under following forms -

      1.   FORM USEREXIT_PRICING_PREPARE_TKOMK                          
     This userexit can be used to move additional fields into the 
    communication table which is used for pricing:               
                                                                 
                                                                         

     2. FORM USEREXIT_PRICING_PREPARE_TKOMP                          

      This userexit can be used to move additional fields into the 
      communication table which is used for pricing:               
                                                                 
      

Let us know if it helps for your scenario.

Thanks & Regards

Amit Gupta