Question

WO Number Generation

  • 2 March 2020
  • 5 replies
  • 409 views

Userlevel 5
Badge +10

Hello,

When we started with IFS, we started PPM WO numbering from 600,000.

We are now up to 500,000 from service requests.

So, I’m assuming when we get past 599,999 IFS will find the next available number to use, however, if we are generating new PM WOs and a work order is logged at the same time, will both processes fight for the next number?

Where is the number sequencing controlled for work orders in IFS Apps 8?

Regards

Shaun


5 replies

Userlevel 4
Badge +8

Hi @SHAUN_KERSLAKE 

The two oracle sequences that control the Work Order number and Preventative Maintenance work orders are 

PCM_COUNTER_WO_SEQ 
PCM_COUNTER_PMWO_SEQ

You can monitor these using the following query, including viewing the next number.

Select SYS.ALL_SEQUENCES.SEQUENCE_NAME,

       SYS.ALL_SEQUENCES.SEQUENCE_OWNER,

       SYS.ALL_SEQUENCES.MIN_VALUE,

       SYS.ALL_SEQUENCES.MAX_VALUE,

       SYS.ALL_SEQUENCES.INCREMENT_BY

  From SYS.ALL_SEQUENCES

 Where SYS.ALL_SEQUENCES.SEQUENCE_NAME In

       ('PCM_COUNTER_WO_SEQ', 'PCM_COUNTER_PMWO_SEQ')

 

In our environment the PCM_COUNTER_WO_SEQ has a max value of 599999 and the PM starts at 600000 as i expect is the same in your environment. It would appear that this is to prevent a Primary Key violation on the ACTIVE_WORK_ORDER_TAB. The PCM_COUNTER_WO_SEQ has the CYCLE_FLAG set to N so i believe this will error when you reach the MAX_VALUE.

In a test environment you could try and simulate reaching the Max Value, but probably one to discuss with IFS Support.

Regards

Harley

Userlevel 5
Badge +10

There are only a handful of sequences in IFS that start at a number other than 1, so i would assume there is a good reason for this, and IFS will fail to work in this area for you beyond 599999 service requests. Good that you have spotted it.

I imagine a case needs to be raised with support on this one, where they will create a new sequence for you. Would be dangerous to second guess how we think it could be resolved. I agree with @Harley , would be good to see how IFS deals with this in a test environment.

Thanks for raising. It has forced me to check our sequence numbers. :)

Userlevel 7
Badge +21

Hi,

Our sequence settings are as follows (and most likely yours as well as this seems to me as the default of IFS):

I would make a change to the max_value of the PMWO value and decrease it to something like 999999 (which gives a window of roughly 300000 preventive maintenance WOs. Next to this I would prepare an event that would inform me (or at least the DB Admin) when the max_value in the pcm_counter_wo_seqis nearly reached (so when new wo number reaches it with lets say 500 still to go). Just before the limit is reached, I would set the next number of the sequence to 15000000 so it makes a jump to a higher number. If not done, the user will get an error when reaching 600000 which might be in use already. That might stop the WO entering process. I would communicate the jump of the number in advance to the users, so they will be aware of the situation.

Success,

Steve 

Userlevel 7
Badge +21

On second thought:

Why an event that will email/stream or whatever. Is it not better to make the change to the sequence automatically? It would give a security issue as an end user is most likely not allowed to make the change to the sequence in an event. Maybe via a deferred job and a new api that runs under IFSAPP credentials?

In this manner you could even think of an automated setting per year and give each year a range (although I don’t like giving a meaning to parts of a key field)

Userlevel 5
Badge +10

I would be mindful of adding an additional numeric to a sequence number, only in that the length could be restricted in code elsewhere.

If you have support, raise the ticket, and let us know ;)

Reply