Skip to Content
author's profile photo Former Member
Former Member

Distributed Condition Based on Total Value w/ Calculation Routine

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!

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • Posted on Jan 10, 2014 at 08:49 AM
    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

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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!

  • Posted on Jan 11, 2014 at 06:52 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 11, 2014 at 10:24 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 11, 2014 at 05:12 PM

    HI,

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

    first u clear ur concept , very good logicall thinking

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.