Table CRTX contains IDs which do not seem to have been issued by the
user. The result of this is that some new records of CRTX receive
some of these already existent IDs ie duplicate IDs
The number range object has a current number below the highest ID
already resident in CRTX (Number Range Object CR_ARBPL, range 01)
Apparently the situation is one in which the object ids being
issued by the system have a value below those already resident on the
DB - those seen via the SE16 function. A system automatic number
generator assigns numbers for the IDs in ascending order. As a result
of this, a number which has been issued in the past, and is resident
on the DB, will never be issued again. The result of this is that
all records assoctiated with a new ID are assured that their ID
is unique.
In the case of the error one has IDs on the DB which are greater in
number than the new ones being issued - which leads to problems.
The automatic number range generator operates with a number range
object and one of the latters time intervals. In this case the object
has the name 'CR_ARBPL' and uses interval '01'. Maintenance of the
the object is possible via the transaction 'SNRO'. From here one reaches
the maintenance of the number range via:
menu: 'GoTo' -> 'Number ranges' ,
function: 'Change intervals'
To manipulate the current number itself (IMPORTANT) one then
does.
menu: 'Interval' -> 'Change status'
Solution to the problem
=======================
There are 2 possible ways to solve the problem, of which the 2nd (see
below) is the quickest.
Possibilty 1.
------------
One writes a report to eraze records from table CRTX records which do
do not have associated records in table CRID. In addition, one
should check whether the number range object 'CR_ARBPL', interval '01'
has in its current value reached the highest value of the field
OBJID with object type A. If not then change the current value
of the number range object to be equal to this highest value.
This will result in the next ID which is issued being above the highes
one previously issued - ie. the ID will be unique.
Possibilty 2 - The quickest solution
------------------------------------
This solution differs from 1 in that it does not entail erazing any
'old bad' data on the DB. It just ensures that all future IDs are
unique ie avoids 'bad data' in future.
For this, one first discerns (via SE16) the highest ID issued for CRTX
One then sets the current value of interval '01' for the number range
object 'CR_ARBPL' to be equal to this highest value. This will result
in the next ID which is issued being above the highest one previously
issued - ie. the ID will be unique.
Key word: IDs in CRTX
No comments:
Post a Comment