2014 Aug 06 3:21 PM
Good Morning Gurus.
Im working with a program developed by other company.
That program creates a number of sequential contract with 4 digits to be concatenate after.
The program uses a Ztable fields.
field 1 = sequency = 00
field 2 = letter 1 = A0
result concatenate 00A0
Then when the program performs the sequence is:
field 1 = sequency = 01
field 2 = letter 1 = A0
result concatenate 01A0
to the limit:
field 1 = sequency = 99
field 2 = letter 1 = Z9
result concatenate 99Z9
Then the people created a new field Letter 2 in table :
Then when the program performs the sequence is:
field 1 = sequency = 01
field 2 = letter 2 = A0
But reversed the order of the 'concatenate' to generate new code.
result concatenate A001
however when it reaches the limit: Z999 its necessary create a new field .
There is a logical solution to keep creating new codes with four digits infinitely without touching the program in the future as it has?
Because now the user wants to reverse the order of digits (A1 to 1A) to create new ones, but I do not think it is useful because it limits too and need to change the program in the future again.
THanks.
2014 Aug 06 3:31 PM
yes you are right, the numbers will "run out" someday
you have to evaluate how many different numbers you need and how many different numbers this solution provides.
If you need more numbers as provided, you have to think about an other solution
regards
Stefan Seeburger
2014 Aug 06 3:31 PM
yes you are right, the numbers will "run out" someday
you have to evaluate how many different numbers you need and how many different numbers this solution provides.
If you need more numbers as provided, you have to think about an other solution
regards
Stefan Seeburger
2014 Aug 06 3:55 PM
Hi Ronaldo,
the total number of distinct combinations with 4 alfa digits is 1.679.616 which is quite a lot, but not unlimited.
You can of course, create different rules for combining your 4 digits in different routines and decide dynamically, which one to use.
or you could simply advance consequently each digit from 0 to Z, whilst skipping those, that matches previous rules.
The former will keep the pattern at least for a while, but is far more complex to build, where the latter will break the pattern, but is easy to accomplish.
Best regards - Jörg