Former Member

# Sales order quantity in MD04

Hi Gurus,

This is my problem -

51 links (Base UoM) = 2.5 feet (Sales & Production UoM)

In VA01 -> when I entered Sales order = 12 feet system automatically rounded it to 12.990 feet.

I also received a pop up showing "Item 10 rounded to 265 lk. Rounding reasons 1,2,8 -> long text"

In MD04 -> when I look at the Sales order quantity = 264.996 links.

Ran MRP and the planned order quantity = 265 links

There is a surplus inventory of ------------> 0.0004 links

Settings in CUNI: (due to business reasons - Links can NOT be in Decimals. Feet has to be in decimals)

CUNI Decimal places Decimal rounding Link 0 0 Feet 3 3

10|10000 characters needed characters exceeded

### Related questions

Former Member
Posted on Apr 08, 2014 at 06:22 PM

Praneeth,

Let me try to talk through what I think is going on and see if it helps.

The base UOM is LK (links)

The Sales UOM is FT

The relationship between FT & LK is: 2.5 FT = 51 LK, or in whole numbers, 25 FT <> 510 LK

The delivery unit is 53 LK.

When you enter 12 FT in the sales order, SAP first calculates that 12 FT = 244.800 LK. Since this is ~4.169 delivery units (244.800 / 53 = 4.16886… ) SAP adjusts the quantity up to exactly 5 delivery units or 265 LK. And 265 LK = 12.990 FT. That all looks right. The fact that the planned order quantity is also 265 LK, again looks right.

Now for a question: when you say that in MD04 the sales order quantity is 264.996 LK, where exactly are you looking? (i.e. Are you sure it’s the sales order, and not the net requirments? A screen shot would be helpful.) Also, when you look at the saved sales order, what quantity do you see on the order? I suspect that you may be looking at the net requirements which have been reduced by 0.004 LK because of existing inventory (decimal dust), but I can not say for certain.

I do not think there is a problem with the UOMs because everything else seems to check out just fine, but again, I can't rule that out just yet either.

I hope this at least gives you a few clues you can chase down.

Dave

10|10000 characters needed characters exceeded
• Former Member Former Member

Praneeth,

Here's what's happening:

The key thing to remember is that SAP does all of the math in the base UOM (LK) and then converts back to the alternate UOM (FT). To repeat a little, when you first entered 12 FT in the sales order, SAP converts to the base quantity and calculates that 12 FT = 244.800 LK. Since this is ~4.169 delivery units (244.800 / 53 = 4.16886… ) SAP adjusts the quantity up to exactly 5 delivery units or 265 LK. And 265 LK = 12.990 FT. The problem is, when you enter 12.990 FT, SAP will convert that to the base UOM and 12.990 FT x (510 LK / 25 FT) rounded to 3 decimals is 264.996 LK.

To show you what is going on it helps to view the numbers without rounding. If we carried out the LK to FT conversion without rounding we would find that 265 LK = 265 x 25 / 510 = 12.99019608 FT. If SAP could hold that much precision then the reverse calculation would also come out fine (i.e. 12.99019608 x 510 / 25 = 265.000 LK), but SAP can only deal with 3 decimal places, and 12.990 x 510 / 25 = 264.996 LK. (The source of the problem is called residual error and in the number 12.99019608 the residual error is everything right of the third decimal place. Here is a paper that explains residual error and how to resolve it: http://scn.sap.com/docs/DOC-51334 )

Based on the UOMs you have established, the result you see is actually the expected result.

Here's how to avoid the issue:

As outlined in the above mentioned paper, in order to avoid this issue you will need to adjust the UOM so that 265 LK equals exactly 12.99000000 LK (i.e. eliminate the residual error and both forward and reverse conversions will yield identical results). If you adjust your UOMs to 1299 FT <> 26500 LK then this should resolve your issue.

CAUTION: Changing UOMs on a material with inventory and open orders can be a very messy thing, so it is usually easier to create a new material and move the inventory over. As always, I also suggest you test this out and prove to yourself that this does indeed fix your issue.

Please let me know how it goes.

Thanks,

Dave

• Posted on Apr 03, 2014 at 01:37 PM

Hi

Check the following note on this issue

453347 - Sales unit and rounding profile

549413 Quantity rounding in the sales order

492453 BOM: Rounding for subcomponents

434290 Qty optimization: Inactive rounding functions in sales order

Regards

JH

10|10000 characters needed characters exceeded
• Former Member Caetano Almeida

Hi Caetano,

Physically- a link is a circular loop. when you tie all the links together that makes a chain.

53 links makes a perfect sellable chain. You can break a chain but by breaking a link, you'll end up with scrap of metal pieces.

If I change 'Links to decimals' in SAP.

For example: SAP tells - you have 264.996 links. But physically you'll either have 264 or 265 links.

Result: Huge Inventory discripency (cummulation of all those 0.996 links).

This is our current problem. Every week we are doing manual inventory adjustment.

• Former Member
Posted on Apr 25, 2014 at 03:39 PM

Exactly...this is the reply I get from everyone.

" ................................................. ABSOLUTE S I L E N C E ............................................................................"

10|10000 characters needed characters exceeded
• Former Member

Praneeth,

Hang on... I haven't given up, but I was away on vacation until today. I will look at it soon and reply (but I need to catch up a bit first).

Dave

• Former Member
Posted on May 19, 2014 at 08:24 PM

Praneeth,

Any feedback from my May 2nd post?

Dave

10|10000 characters needed characters exceeded
• Former Member
Posted on Jun 10, 2014 at 12:11 AM

Hi Dave,

Thanks a lot. I can not believe all that work on UoM. Great document.

I was on vacation to India for a month. Sorry for the delay in replying.

I just started testing it out. I'll need some time.

Thanks,

10|10000 characters needed characters exceeded
• Former Member Former Member

Praneeth,

Very good. I'm glad I was able to help. Let me know if you have any additional questions.

Dave