cancel
Showing results for 
Search instead for 
Did you mean: 

How to calculate @ per unit when computing amount from total amount (in pricing)

Former Member
0 Kudos

Dear all,


Here is my previous discussion Conditoin type ZMRP becomes negative value at time Statistics

I have a problem on calculation @ per unit in pricing,the following scenario is.........

In Sales Order I have used

ZMRP   100   (STATISTICS)Maintain condition record

ZMOS----10% (STATISTICS),Maintain condition record

ZSP0--    90   100 % Sales Price.Maintain condition record

Example 1

Condn type                              Price           Qty            value

ZMRP MRP Price                   135.00          755        101,925.00

ZOMS Margin & scheme           45.489 %                   46,364.66-( the discount calculated is 101,925.00 system is taking 45.489%)

ZSP0(100 % Sales Price)                                           55,560.34   ERL

Net value                                                    755          55,560.34

@per unit =55,560.34/755=73.59 inr (as per SAP)

Now see above the per price is showing  @ RS.73.59 inr

But actually in physical calculation @ Rs.73.59 x 755 unit=55,560.45

here is difference between 55,560.34 and 55,560.45.

Our Management/client don't want to see this discrepancy. He wants to see the amount 55,560.45.

Kindly help how to configure the above scenario.

Scree shot provided for your reference.

 

Accepted Solutions (0)

Answers (2)

Answers (2)

shashi_thakur
Contributor
0 Kudos

Hi Manik,

You can add a Rounding Condition type (say ZRND), which will calculate the difference between the calculations and update the Prices accordingly.

In your example,

Condn type                              Price           Qty            value

ZMRP MRP Price                   135.00          755        101,925.00

ZOMS Margin & scheme           45.489 %                   46,364.66-

ZSP0(100 % Sales Price)                                           55,560.34 

Rounding                                                                    (55560.45 - 55560.34 = 0.11)-Add AltCalculation and derive

Net value                                                    755          55,560.45

Regards,

Shashi Thakur

jobis
Contributor
0 Kudos

Hi,

I feel, rather than complicating this, it will be better to go for increasing the decimal places.

Just do a debugging and find out the values which are undergoing the calculations in this. make a uniformity of decimal places for all. larger the decimal places, more accurate the value you get.

Thanks

Jobi

Former Member
0 Kudos

Hi Jobi,

Yes this would be the ideal solution, but suppose if we increase the decimal places upto 3, then the 4th place decimal will create the difference.

Former Member
0 Kudos

Hi Manik,

This is because of the rounding issue in your sales price which is upto 2 decimals.

You can do the follwoing:

1. Increase the decimal places in you system, or

2. Write a rounding routine for condition type ZSP0 to calculate the rounding value as SAP i.e. 73.59 multiply with qty 755 and display the new value.

I would go for the second option as in later cases you can have values in different decimals places.

Former Member
0 Kudos

Hi yadav,

Suppose I will use rounding up for the condition type ZSP0, then my system will calculate the condition value for ZSP0 = 55,560.30, but it will keep the per price as 73.59.

Here also my calculation will be wrong. It does not fit my requirement.

I just want to show the net value will be like as 755 X 73.59 = 55560.45.

Former Member
0 Kudos

Hi Manik,

I mean to say:

Write an ABAP routine and assign that to condition ZSP0, and the logic should be:

take the Sales price, say S = 55,560.34

Now divide it with quantity, say X = 55,560.34/755 = 73.5898534....

Do rounding for X upto 2 digits = 73.59

Now ZSP0 = multiply X to Qty = 73.59 * 755 = 55560.45

This will handle any problem with any number of digits you have in future.