Precisely Speaking
May 21, 2012, 07:31:19 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: So what's news with you?  Tell us about it in "Getting To Know You"!
 
   Home   Help Calendar Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Next Generated S/O number  (Read 391 times)
DonQuixote
Rock Star
*****
Posts: 108


To Dream the Impossible Dream...


« on: July 25, 2011, 05:04:15 PM »

The next generated S/O number are kept in CONTROL file ' 001ORD#090'  where 090 is the warehouse.
The S/O number correctly comes up as 09099999
If I am allowing alpha's.  Before the rollover the record looks like:
1>  99999
2>  00001
3>  99999
4>  090
...
after the roll
1>  100000              (this is wrong... too many digits)
2>  00001
3>  99999
4>  090
...
when asking for the next number, it does come up correctly  090A0001
and the record is correctly changed to
1>  2
2>  0001
3>  9999
4>  090A
...
my problem is that some users are stopped at this point with an error message that there are too many digits; which is true.  Prelude is having problems understanding the problem. (fighting windmills. LOL)
As for me... I'm having a problem finding the code that generates this roll to the next S/O.  Any ideas? 
Logged
Tom Pellitieri
Rock Star
*****
Posts: 171


Tom Pellitieri - Toledo, Ohio


« Reply #1 on: July 26, 2011, 05:49:43 AM »

The code to update and rollover the counters is PROGS NUM.ASSIGN.EVAL - we don't use Alphas, so I can't advise beyond that.

Please note that Invoice numbers are updated elsewhere.
Logged
DonQuixote
Rock Star
*****
Posts: 108


To Dream the Impossible Dream...


« Reply #2 on: July 27, 2011, 08:07:48 AM »

Yes, NUM.ASSIGN.EVAL is used to assign the next number in all cases.  I search the DEVPROCESS and found the same routine is called for Orders, PO, Quote, Transfers, and Work Orders.
The code validates the current number (<1>) in CONTROL record  001ORD#xxx where xxx is the warehouse number.  Then increments the number and writes the record.  This works for every instance except for the rollover where the max may be 9999 but it will save 10000 as the next number.  That next number then has too many digits.
It should either increment first or validate and roll the next number to the next Alpha before it writes the control record.
This issue has been problematic for us; requiring manually resetting the control record.
Thanks again!
fyi. The alpha flag will roll from numeric to one alpha; from one alpha to two alpha's; and finally from two alpha's back to numeric.  For example the order number for warehouse 111 would change from:
00111199999   to   001111A0001
001111Z9999   to   001111AA001
001111ZZ999   to   00111100001
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!