Inventroy Adjustment

aman_mbsaman_mbs Member Posts: 158
Hi All,

I am running the item Cost adjustment on Nav 4 sp1 i have modified the codeunit 5895 such that my the process runs based on item category.. so when i run the process for the category with the least entries in ILE still its taking 1.5 days and nt complete the process... There are in all 12 entries in the ILE for that category.. Plz suggests me some way out...

Regards,
Aman
Aman Kumar Gupta

Comments

  • Alex_ChowAlex_Chow Member Posts: 5,063
    aman_mbs wrote:
    Hi All,

    I am running the item Cost adjustment on Nav 4 sp1 i have modified the codeunit 5895 such that my the process runs based on item category.. so when i run the process for the category with the least entries in ILE still its taking 1.5 days and nt complete the process... There are in all 12 entries in the ILE for that category.. Plz suggests me some way out...

    Regards,
    Aman

    Are you sure there are no bugs in your modification? Have you tried running the process without any modifications and see how long it ran?

    FYI, the adjust cost process has been improved in version 5.0 so you can run adjust cost per period. That should cut up your batches into a more managable size.
  • aman_mbsaman_mbs Member Posts: 158
    Hi,
    I have just made a small change in the function
    MakeSingleLevelAdjmt() stated below

    ***********************************************************
    MakeSingleLevelAdjmt()
    LevelNo[1] := LevelNo[1] + 1;
    Window.UPDATE(1,LevelNo[1]);

    WITH ItemLedgEntry DO BEGIN
    SETCURRENTKEY("Item No.");
    // Modify
    SETRANGE("Item Category Code",'Alloy');
    // Modify
    IF FIND('-') THEN
    REPEAT
    GetItem("Item No.");
    Window.UPDATE(2,Item."No.");
    SETRANGE("Item No.",Item."No.");
    REPEAT
    LevelExceeded := FALSE;
    AdjustItemAppliedCost;
    UNTIL NOT LevelExceeded;

    AdjustItemAvgCost;
    PostAdjmtBuf;
    UpdateItemUnitCost;

    FIND('+');
    SETRANGE("Item No.");
    UNTIL (NEXT = 0) OR LevelExceeded;
    END;
    *************************************************************
    Secondly i cannot upgrade the existing system to nav 5 so is there any other way out..
    Aman Kumar Gupta
  • vanrofivanrofi Member Posts: 272
    Check in Item table if you don't have an item with No. = '' (empty)

    This gives same problem
  • jreynoldsjreynolds Member Posts: 175
    aman_mbs wrote:
    There are in all 12 entries in the ILE for that category.Aman

    With this few entries it should be a simple matter to use the debugger to see what is happening.
  • Alex_ChowAlex_Chow Member Posts: 5,063
    You've set the key to Item No. but you're filtering on Item Category on the Item Ledger??? No wonder your process takes 1.5 days.

    You may want to create a key with Item Category, Item No. then try your process again.
Sign In or Register to comment.