Hi,
We have a customer that has never run the Adjust Cost report (R795 -> CU5895). Now we need to run it, but even though we have set a filter on a single Item No. the codeunit takes forever to run, due to a massive amount of Item Ledger Entries on that specific Item No. (DB is 160 GB, T32 = 27GB).
My idea is to limit the number of entries to process by setting a filter on Posting Date on Item Ledger Entry in function:
AdjustItemAppliedCost
That way we can run the Adjust Cost report over several days...
Has anyone tried that before? Are there any pitfalls I should be aware of?
/zeon
Answers
You will need to uncheck the flag cost is adjusted on Item card.
Another option is uncheck Applied entry to adjust in ILE for the set of entries and run adjust. Then check a range and then run adjust cost.
That way you don' t have to modify adjust cost routine.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Inventory on the balance sheet is perpetual method. So you have to calculate inventory from the beginning of time or else your cost will not be correct.
Just let it run with a filter on Item Category or Item No.
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
Just filter by item no, and if you want to change anything, modify the routine to run faster. Also make sure to tun off auto post to GL.
I am already running on just a single item no., so that option is out of the question.
Modify the routine to run faster?? Hmm, could be just as risky as trying to incorporate a filter on Posting Date as far as I see it - at least if it involves changing the code...?!! Or am I missing something?
@ara3n - could you pls confirm that I have the right understanding of your suggestion...
So, e.g I have 1000 records for Item No.=1000, with "Applied entry to adjust"=True. Uncheck "Applied entry to adjust" on e.g the last 500 rec's. Run adjust cost on the first 500 rec's. After that completes, then check "Applied entry to adjust" on the last 500 rec's and run adjust cost again to adjust these entries?
I like the fact that I don't have to modify the routine if using this approach..
Btw, the customer is running 2009 R2, and costing method is FIFO.
Right now we have ~100.000 records for a single item no. with "Applied entry to adjust"=True. The Adjust Cost routine takes around 3-5 sec pr. ILE entry to complete (in their test environment - prod is probably a little faster). With 100.000 entries to process this will last close to 6 days #-o
Thanks again...
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n