Slow posting of Item reclass

vicky_dadavicky_dada Member Posts: 106
Hi Guys,

I have noticed a strange behaviour in the system, while posting reclassification journal for Items with Costing method as FIFO and Replinshemnt system as Prod. Order, system is taking 2-3 mins to post the entries. while for other items its working fine.

I am using NAV2009 and other item journals are working fine. What could be the reason ](*,) ? There is no addition customisation done in the codeunits #-o

Comments

  • kapil4dynamicskapil4dynamics Member Posts: 591
    On ur test db try this posting with following setting

    Automatic Cost posting as false and Automatic Cost adjustment as never on inventory posting setup. Plus do u have any analysis view active where u have checked Update on posting as true, if yes set that as false , then try posting.

    Plus it depends how many lines u have on journal as well.

    Costing method (if not average) and Replenishment system has no relation to this issue. U have mentioned no customization in CU but any thing on form, as table is common for Item Journals.
    Kapil Khanna
  • vicky_dadavicky_dada Member Posts: 106
    Hi Kapil,

    Thanks for the reply, I have the same inventory setup as said. Automaatic cost posting no and adjust cost adjmt as Never. The thing is the behavior of the journal is strange, if I post any items other than FIFO, the reclass journal is working fine.

    No analaysis view active. No coding on forms or table related to Items or updations on posting.
  • vicky_dadavicky_dada Member Posts: 106
    Hi,

    I found the reason why it is getting dealyed its maily due to “Item Application Entry” table, while executing the code in the “CheckCyclicFwdToAppliedEntries” trigger the system is executing for a 2-3 mins.

    I want your suggestion on changing the standard code as follows:
    // Standard Code -> Start

    IF EntryIsVisited(FromEntryNo,ItemApplnEntry) THEN
    EXIT(FALSE);

    REPEAT
    IF IsPositiveToNegativeFlow THEN
    ToEntryNo := ItemApplnEntry."Outbound Item Entry No."
    ELSE
    ToEntryNo := ItemApplnEntry."Inbound Item Entry No.";

    IF ToEntryNo = CheckEntryNo THEN
    EXIT(TRUE);
    // standard code comment -> start
    {
    IF CheckCyclicFwdToAppliedOutbnds(CheckEntryNo,ToEntryNo) THEN
    EXIT(TRUE);
    IF CheckCyclicFwdToAppliedInbnds(CheckEntryNo,ToEntryNo) THEN
    EXIT(TRUE);
    }
    // Standard Code comment -> End

    // modified code as follows -> Start
    EXIT(CheckCyclicFwdToAppliedOutbnds(CheckEntryNo,ToEntryNo));
    EXIT(CheckCyclicFwdToAppliedInbnds(CheckEntryNo,ToEntryNo));
    // modified code -> End

    UNTIL ItemApplnEntry.NEXT = 0;
    EXIT(CheckCyclicFwdToInbndTransfers(CheckEntryNo,FromEntryNo));

    // Code -> END

    I check the database, item application is working fine, but I am not sure of any other effects. Please sugest me on how to handle this situation
  • kapil4dynamicskapil4dynamics Member Posts: 591
    I am not a techie so i won't be able to say anything on this. I think some techie from the forum can comment on this.
    Kapil Khanna
  • roshandilrukroshandilruk Member Posts: 51
    Well, as per Kapil's last post I thought of adding few lines.

    Vicky, I'm pretty sure your modification is correct in coding, but the issue is you need to check from whereelse this function is being called in the system, I do not know up to what extent your systems is customised. If you have Nav tool kit, you should be able to get this done within few minutes. However I would rather prefer to not to modity such areas.
  • davmac1davmac1 Member Posts: 1,283
    It will take the first exit. Why are you rmoving the conditions? You will never execute the rest of the code?
  • DenSterDenSter Member Posts: 8,304
    vicky dada wrote:
    // standard code comment -> start
    //  IF CheckCyclicFwdToAppliedOutbnds(CheckEntryNo,ToEntryNo) THEN
    //    EXIT(TRUE);
    //  IF CheckCyclicFwdToAppliedInbnds(CheckEntryNo,ToEntryNo) THEN
    //    EXIT(TRUE);
    // Standard Code comment -> End
    
    // modified code as follows -> Start
    EXIT(CheckCyclicFwdToAppliedOutbnds(CheckEntryNo,ToEntryNo));
    EXIT(CheckCyclicFwdToAppliedInbnds(CheckEntryNo,ToEntryNo));
    // modified code -> End
    
    The standard code only exits if the function returns TRUE. If it returns FALSE it goes into the second function. I don't think it is correct to just exit with the return value. Besides, you might as well get rid of the second function call, because it never executes that way. You also might as well get rid of the entire loop, because it only goes into the function for the first record. No wonder you got rid of the time, because it looks to me like you cut out all of the processing.
  • vicky_dadavicky_dada Member Posts: 106
    Agredd with you guys, let me see any other ways to increase the speed, but I still dont understand why is it so happening ](*,)

    any sugeestings Please?
  • vicky_dadavicky_dada Member Posts: 106
    hi guys,

    what is impact of indexing? can somebody help me in fixing the index in SQL? as per above comments I do not want to change the code, since while reclassification its fixed but performance is the same for Transfer order?
  • vicky_dadavicky_dada Member Posts: 106
    Hi Guys,

    after running SQL Tuning,rebuilding indexing, reorganise indexing, updating statistics, optimising nesscary tables, jobs the time taken to post item reclass/transfer has decreased to 30sec from 3 mins.

    can any one please suggest any other steps to decrease the time less than 30 sec
Sign In or Register to comment.