overflow in calculation of 2147480000 + 10000

wakakawakaka Member Posts: 57
Dear Experts,

When I run the phys. Inventory Journal, error message popped up "overflow in calculation of 2147480000 + 10000".
Why the message popped up? How to solve the problem?
Please advice.

Comments

  • ChinmoyChinmoy Member Posts: 359
    Enable the debugger and find out which statement is generating this error.
  • Torben_R.Torben_R. Member Posts: 99
    The problem is the line no. in the journal.

    It's an integer field and the maximum value is 2,147,483,647.
  • wakakawakaka Member Posts: 57
    Torben R. : Can you be more specific? As I am new to NAV, i cant find the line no. in phy. inventory journal.
    Would you telll me which table and which field?? that have overflow?
    Thank you

    I try to run the debugger, but it takes more than half hour and which still not yet finish running the code.
  • mohana_cse06mohana_cse06 Member Posts: 5,504
    Phys. Inventory Journal uses Item Journal Line table...
    You will get Line No. Field in Item Journal Line table..

    In Order fix, please set Item No. filter or Location Filter while running Calculate Inventory function..
  • wakakawakaka Member Posts: 57
    Is there a way to enlarge the maximum value of the line no. field???
    Does Microsoft have any batch or solution to solve the problem?
  • SogSog Member Posts: 1,023
    Instead of trying to "fix" this, you might want to actually post the journal lines.
    If that is not an option then you can use a different batch so you can start back from 10000.

    But don't go change the line number because you've reached the max value of an integer.
    And please, if you don't understand why it can't go above 2147483647. search around for data types and integers.
    |Pressing F1 is so much faster than opening your browser|
    |To-Increase|
  • wakakawakaka Member Posts: 57
    Even though i filter out one location, the error still happens.
    I did not encounter this problem before even though i have not filter out the location.

    Is there a way to change ( "line no." := "Line No." + 10000) to ("Line no." := "Line no." + 1000)? Where can i find the code?
    Please advice.
  • einsTeIn.NETeinsTeIn.NET Member Posts: 1,050
    There are only two reasons why your Line No. could reach the limit.
    1. You're trying to create more new lines than possible. In that case you should apply an additional filter to reduce the amount of lines that will be created.
    2. Your Line No. isn't reset after you used that Journal last time. Possibly there's already an existing (empty) line with a very high Line No. in your Journal. In that case NAV would start creating new lines based on that very high Line Number. Please check if it's possible to delete that line. That should reset the Line No. to 10000.
    "Money is likewise the greatest chance and the greatest scourge of mankind."
  • krzychub83krzychub83 Member Posts: 120
    Yes, you can increase default set size. To do it you would need to decrease default step, which is made for calculation of new "Line No.", as you suggested in the last reply. However:
    1. This will decrease NAV ability to automatically split key (or fully disable it, if you would go to NextLineNo := NextLineNo + 1;).
    2. Still it will be only a temporary solution. Maybe yours company internal work processes require creation of hundreds new items each week... Thus this problem may get back to you in the future.

    Instead of that you should listen to all previous replies!
    mohana_cse06:
    In Order fix, please set Item No. filter or Location Filter while running Calculate Inventory function..
    Sog:
    If that is not an option then you can use a different batch so you can start back from 10000.
    So once again... Split items across different locations/Item Categories/Product Categories (or whatever you want) into separate Item Journal Batches. There is no need to kip everything together.
  • ara3nara3n Member Posts: 9,256
    If you have more than 214748 item/location/bin records, you'll need to modify the report to increment the line no by 1.
    Ahmed Rashed Amini
    Independent Consultant/Developer


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