cancel
Showing results for 
Search instead for 
Did you mean: 

Distributed Condition Based on Total Value w/ Calculation Routine

Former Member
0 Kudos

Hello All,

I have an interesting pricing procedure requirement and I'm wondering if anybody else has had this issue.

I have a pricing condition that's currently maintained as a Manual Header Condition, that is a complex calculation based on a subtotal within my pricing procedure.  The calculation cannot happen based on the Item Value of this subtotal, but instead based on the total of the order.

Once the value is calculated, it must be distributed to the Sales Order Items based on value.

That's all working as expected, manually.

I would like to now automate this calculation, however because Header Conditions do not support calculation routines, how can I write a Calculation Routine and assign to the item, and have it calculate based on the header value, and distribute correctly at each item on the order?

Header:                        Subtotal $300

----

Item 10                         Subtotal $100

Item 20                         Subtotal $200

Based on $300, Calculate the total value (i.e. Header) via Calc Routine - which includes scaling, subtraction, etc. within ABAP, determine the result, distribute it to Item 10 and Item 20 proportionately.  Unfortunately the calculation cannot be accomplished via Scales and Pricing Tables in a standard fashion.

Any Thoughts?

Thanks!

Accepted Solutions (0)

Answers (4)

Answers (4)

0 Kudos

HI,

U understand one thing, hedder condition can't support calculations routins

first u clear ur concept , very good logicall thinking

Former Member
0 Kudos

I am hoping that you can sheer more details on the  calculations.  Nevertheless, you might want to refer to OSS 844141 - FAQ on Cumulated Conditions.

phanikumar_v3
Active Contributor
0 Kudos

I am not clear on your requirement--If Total Value is 300$--On this 300 what you want to give at the header level?(discount/Surcharge!!!!!)

Phanikumar

Lakshmipathi
Active Contributor
0 Kudos
Header Conditions do not support calculation routines

Your understanding is wrong.  You can very well create a new routine in VOFM, add the required logic and assign it in pricing procedure under Calculation Type or Base Type.

G. Lakshmipathi

Former Member
0 Kudos

Does anybody have any sort of documentation on the basics of how to code a Calc Routine specifically for a header condition, based on header values?

As pricing fires at the item level, how do you prevent the routine from firing on every line of the sales order? And how do you force it to calculate only based on the header value of pricing procedure?

Unfortunately our calc cannot happen at the item level because it is based on the value of the whole order.

Just looking for some direction.

Thanks!