cancel
Showing results for 
Search instead for 
Did you mean: 

Question to calculation procedure

Former Member
0 Kudos

Hello,

my customer provided me an excel sheet with the calculation procedure he would like to have implemented in his SAP system.

It will be the calculation procedure for SD sales order documents.

My problem now is:

In the calculation procedure some of the condition types will be percent conditions. The EUR value of them must be calculated on the base value of the total item value (but not the total item value just in front of the current percent condition, but the total value at the bottom of the calculation procedure).

Example:

Input price 100000 EUR per 1 Piece.

Then some of this percent conditions will follow (e.g. Provision, Bank costs, Margin, etc.) . The user can enter a % value from 1 to 100%.

In the normal calculation procedure behavior the EUR base value will be the 100000 EUR, as they are the total sum in front of the percentages.

After I entered 10% Provision the total item's price will raise to 110000 EUR.

The Provision of 10% should be calculated with the EUR base value of 110000 now, and not 100000.

I thought I could use the base formula 2 (use the net value as base value) for these percentage condition types. But this formula will also only use the current net value from before the current condition type.

So my problem is:

How am I able to calculate these 10 condition types with percentage values on the base of the total item's net EUR value.

And the other problem is: If I change a % value in one of these condition types, the total net value of the item changes too -> The calculation of all the other condition types must be automatically updated with the new values too.

I hope you understand, what I'm trying to explain.

I tried to save the total item's net EUR value to the KZWI6 sum field and use the base formula 21 (using KZWI6 as base value) for these percentage conditions. But the value was always 0?

Thank you for any ideas.

Regards

Patrik

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Patrik.

  I would handle this one of two ways.

  1) If there is already a condition in the princing procedure that adds up all the values needed (taxes, provisions, etc.) then I would add a new condition to the pricing procedure AFTER this one and use its value as the base.

  2) If there is no sinlge condition that adds up all the necessary values, I would first check all the conditions that needed to be added and inclue a new condition AFTER the last one and then use a custom base formula to add up all the others.

  The key thing here is that if you need a total to use as base for a calculation, the condition where this is calculated must be after all the conditions that make up this total. When I say 'after" I mean that is has to be lower down in the pricing procedure.

Hope this helps.

Former Member
0 Kudos

Hello Edson,

thank you for your help.

Quote:

The key thing here is that if you need a total to use as base for a calculation, the condition where this is calculated must be after all the conditions that make up this total. When I say 'after" I mean that is has to be lower down in the pricing procedure

And this is my problem.

The total, that I would add as a new condition and use as the base value for the percentage conditions, will be calculated INCLUDING the EUR values of these percentage values.

It must be calculated in the hundred.

For example:

I build a new condition ZTOT for the total value and position it most down in the calculation procedure, right in front of the taxes (MWST).

My pricing procedure will calculate a current value, "more to the top" in the pricing procedure than the following percentage conditions. The current value will be let's say 1000 EUR and is stored in a condition ZCUR.

Now the percentage conditions will follow.

I got the condition ZPRP for the Provision in % somewhere top of ZTOT and below ZCUR.

I enter 5% as the value.

Below this we got the margin condition in % ZMAP. I enter 10% as the value.

We have to accumulate these percentage conditions ZPRP and ZMAP now.

5% + 10% = 15%.

This 15% are taken away from 100% and we got 85%.

The EUR value stored in ZCUR are these 85%!

ZTOT will be the 100%!

So the base value of ZPRP must now be:

EUR value of ZCUR (1000 EUR) * Percentage entered in ZPRP (5%) / current value percentage in ZCUR (85 %)

The base value of ZMAP must now be:

EUR value of ZCUR (1000 EUR) * Percentage entered in ZMAP (10%) / current value percentage in ZCUR (85 %)

So how can I build this in the calculation procedure?

Thank you very much.

Former Member
0 Kudos

Hi Patrik,

It seems based on standards pricing option you can not make this requirement working.

We had similar type of requirement in one of the project and we had to use Condition Base Values and Calculation Type routines widely.

If I simplify your requirement it will look like below :

Condition Type          Value     Sign  

ZCUR                        1000     EUR

ZPRP                         5          %  (Calculation of Base Value = 1000*5/85=58.8235)

ZMAP                        10         %  (Calculation of Base Value = 1000*10/85=117.6470)

ZTOT                         Logically will be 100 % with total of above.

Now, first Unclear point is the use of your word Base Value. This means you will count your 5% and 10% of the Base Values of the respective Condition type... is it correct?

Store Value of all 3 Condition type in 3 different Sub Total. (i.e. ZCUR =a , ZPRP= b, ZMAP=C)

Prepare a Routine for Condition Base Value calculation by Using above Subtotals.

(a * Conditions Subtotal)/(100-b-c)

Assign the Condition Base value to ZPRP and ZMAP. This should settle your requirement.

Regards,

Mahendra Jani