SQL Server DB & Navision DB

bill_carsonbill_carson Member Posts: 8
edited 2004-05-05 in Navision Attain
Hello! Could anybody help me? I've a such problem: We have Navision 3.6 with database on SQL Server 2K. When i want to Write-off an item which i have on my warehouse, i get a message, that there is not enough quantity, but it's not true. In Item Ledger i have such operations: (Positive Adjmt., Quantity - 115, Remaining Quantity - 15, Open-TRUE),("Purchase", Quantity - 500, Remaining Quantity -500, Open TRUE), (Negative Adjmt., Quantity- -100, Open FALSE). Total Remain is 515. But then i Write-off more then 15 and try to Post, i have an Error than there is not enough quantity. And the most interesting thing, that then i do a local copy of database (on Navision server) this works correctly. Why? Maybe anybody has such problem and can help me. Thank u for advance. P.S. Sorry for my bad English.

Comments

  • nicklaslnicklasl Member Posts: 10
    Try to rebuild the indexes in the SQL server.

    //Nicklas
  • SavatageSavatage Member Posts: 7,142
    do you have any open orders or po's for this item?
  • bill_carsonbill_carson Member Posts: 8
    Yes. There are 2 open orders for this item. I've found in Application Developer Guide that this trouble maybe in difference of calculating SumIndexFields in Navision DB & SQL Server DB... I'll try to rebuild indexes in SQL, according Nicklas's advice, and in index property there is position "MaintainSIFTIndex", try to check off it... Thank you.
  • chadharajanchadharajan Member Posts: 9
    This is the problem with the Sql Server database, try using attain database and u won't find any problem.


    Rajan
    Rajan Chadha
  • RabeRabe Member Posts: 27
    Hello Bill,

    Is it possible that all the stock is not in the same wharehouse and are you using lot / serial tracking on this item?

    Best Regards
    Rabe
  • KubiKubi Member, Microsoft Employee Posts: 2
    I had a similar problem when posting a consumption journal. For some reason the SQL cursor seems to loose focus on a record. Try to change the following in Codeunit 22 (LastEntryNo is a new global integer variable). Maybe it helps...

    ApplyItemLedgEntry(...)
    ...
    IF NOT ItemLedgEntry2.FIND(EntryFindMethod) THEN
    EXIT;
    END ELSE BEGIN

    LastEntryNo := ItemLedgEntry2."Entry No.";
    ItemLedgEntry2.GET(LastEntryNo);


    CASE EntryFindMethod OF
    '-':
    IF ItemLedgEntry2.NEXT = 0 THEN
    EXIT;
    '+':
    IF ItemLedgEntry2.NEXT(-1) = 0 THEN
    EXIT;
    END;
    END;
    OldItemLedgEntry.COPY(ItemLedgEntry2)
    END;
    ...
Sign In or Register to comment.