Adjust Cost - Item entries - limit with Posting Date?

zeonzeon Member Posts: 130
edited 2012-05-22 in NAV Three Tier
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

  • ara3nara3n Member Posts: 9,256
    Which costing method and what version?


    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.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • Alex_ChowAlex_Chow Member Posts: 5,063
    Don't do it!

    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.
  • David_SingletonDavid_Singleton Member Posts: 5,479
    I agree with Alex, there is a small chance that filtering on date might work, and an even bigger chance it wont. For it to work you would have to be absolutely certain that there are no back dated or incomplete item chains in the range you filter, and if you have that many entries on one item, then I would say you have a very slim chance of that happening.

    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.
    David Singleton
  • zeonzeon Member Posts: 130
    Thanks for your input!
    Just let it run with a filter on Item Category or Item No.
    I am already running on just a single item no., so that option is out of the question.
    Just filter by item no, and if you want to change anything, modify the routine to run faster.
    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?
    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.
    @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...
  • ara3nara3n Member Posts: 9,256
    that's correct. you will have to modify the cost is adjusted on item card also.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
Sign In or Register to comment.