Hello guys,
DB in question is NAV 2009 SP1 (classic version).
I am currently running the inventory adjustment batchjob report on the clients DB, and for one specific item during the "actual cost" calculation in table 5820 - "Cost Element Buffer" the value is computed as :
"141,502,760,062,080,928,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000" - (NO decimal points)
Now,evidently the "Actual cost" field which is a decimal data type cannot hold such a huge decimal type. The system is throwing the Decimal overflow error.
ERROR: "An Integer is too large.
141,502,760,062,080,928,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000"
I am trying to dubug the "Inventory Adjustment" codeunit to find the reason for this computation. The costing method used is "Average". In the mean time just wanted the experts out there to give me any kind of suggestions to overcome or workaround this issue.
NOTE: The batch job is working fine for all the items in the Db (1500 odd items except for this)
Regards,
Prash
0
Comments
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
i think it's caused by the fact that decimals can't be stored with complete accuracy, and that somewhere along the line you DO get a tiny discrepancy.
a common fix for this is look up where the division is made. It wil probably have a check right before it to see if the value divided by isn't zero. Just before that, round the value to something that is a bit more sane, but still has quit a few decimals ( to avoid errors due to the rounding )