4.0 Upgrade step 2 error

BokkBokk Member Posts: 138
I am upgrading from 3.10 to 4.0 and am at step 2 of converting the data. I pulled up their form from the Upgr Toolkit and ran the Data Transfer function. I got a division by zero error (Division by zero. 1/0 ) which appears to be occuring in their codeunit 104049 in the SplitValueEntries function when SetFactor is called. The Valued Quantity coming from the Value Entry table is 0.

Does anyone know if this is a validation oversight on Navision's part in the code or is "0" not a valid value for the Valued Quantity field in the Value Entry table? Or is there a reasonable work around? I tried putting in a condition to avoid division by zero, but I think it sends it into a loop or something as the program goes into Not Responding mode.

Thanks!
SGM

Comments

  • wheresjustinwheresjustin Member Posts: 26
    I have encountered this issue also. Any help would be useful.

    Cheers,

    Justin
  • BokkBokk Member Posts: 138
    We have completed our upgrade and it appears we were able to get the data in correctly. We did get some assistance from MBS support, but they didn't eliminate the Divison by Zero error. We ended up going through the code and made the following adjustment based on our assessments of the process:

    CodeUnit 104049
    Function:SplitValueEntries(....)

    ...
    "Valued Quantity" := TempItemTrkgEntry.Quantity;
    "Invoiced Quantity" := 0;
    END;

    //Our change - condition the SetFactor function
    IF TEMPNonDistrValueENtry."Valued Quantity" <> 0 THEN
    SetFactor(ABS("Valued Quantity" / TEMPNonDistrValueEntry."Valued Quantity"))
    ELSE
    SetFactor(0);
    //End of change

    Just a heads up - there were inventory costing issues based on extra Item Application table entries created in 3.10 and showed up when running the Adjust Cost - Item Entries batch job in 4.0. We are still doing some clean up for this. If you can catch them before the upgrade or prior to running that batch job if it is an area used by your client, it will save you some headaches.

    Hope this helps you out!
    SGM
  • wheresjustinwheresjustin Member Posts: 26
    Justin
  • wheresjustinwheresjustin Member Posts: 26
    I have found another issue with this codeunit where there is a call to:

    TempItemTrkgEntry.TESTFIELD(Quantiy, ItemLedgEntry.Quantity);

    Currently, the TITE::Quantity is 2, whilst the ILE::Quantity is 1.

    Taking a look at the data in the Temp Item Tracking Entry table for this entry it actually has a quantity of 1. However, further investigation in the code has found the line:

    TempItemTrkgEntry.Quantity := TempItemTrkgEntry.Quantity + TempItemTrkgEntry2.Quantity;

    The filtering on TempItemTrkgEntry2 does not appear to exlude the entry for TempItemTrkgEntry, meaning that the quantity gets add to itself.

    Any light shed would be appreciated.

    Justin
  • wheresjustinwheresjustin Member Posts: 26
    The previously mentioned issue with the TESTFIELD is not an issue with the upgrade toolkit. It was infact a mysterious data entry in the Item Tracking Entry table.
  • wheresjustinwheresjustin Member Posts: 26
    Hi,

    I have received MBS support for this issue and they say the following:

    This error in the upgrade toolkit is in fact due to an error in the 3.10 application.

    In the 3.10 version, codeunit 22 – function InsertValueEntry contains the following code

    IF ValueEntry."Entry Type" = ValueEntry."Entry Type"::Rounding THEN BEGIN
     ValueEntry."Valued Quantity" := 0;
     ValueEntry."Invoiced Quantity" := 0;
     ValueEntry."Cost per Unit" := 0;
     ValueEntry.Amount := 0;
     ValueEntry."Cost per Unit (ACY)" := 0;
    END ELSE BEGIN


    In version 4.00, codeunit 22 - function InsertValueEntry has been corrected has followed:

    IF ValueEntry."Entry Type" = ValueEntry."Entry Type"::Rounding THEN BEGIN
     ValueEntry."Valued Quantity" := ItemLedgEntry.Quantity;
     ValueEntry."Invoiced Quantity" := 0;
     ValueEntry."Cost per Unit" := 0;
     ValueEntry."Sales Amount (Actual)" := 0;
     ValueEntry."Purchase Amount (Actual)" := 0;
     ValueEntry."Cost per Unit (ACY)" := 0;
     ValueEntry."Item Ledger Entry Quantity" := 0;
    END ELSE BEGIN


    In the 3.10 version, the value entries of type “Rounding” are assigned 0 as “Valued Quantity”. But they should be assigned the quantity of the corresponding Item Ledger Entry. The solution is to correct the value entries before running codeunit 104049 of the upgrade toolkit.
Sign In or Register to comment.