Development > Utilities > Miscellaneous > Sequence number values 

The sequence number counters are used to number those documents containing an incremental numeric segment, the current value of this segment can be unique or depend on the site, company, month, period, an additional code or a combination of these setups, according to the case.

When a sequence number counter is newly created, or when it has never issued a number (for a combination of setups defined by the context), the first number allocated is by default 1. But by using this function it is possible to define an initial value using another number to start the numbering sequence.

This function is particularly useful in case of data recovery, so that the system restarts the number sequence with the number after the last one used.  

Warning, the modification of this sequence must be locked during normal exploitation by users, and is used only in the initial phase of recovery.

Screen management

Entry screen

Presentation

The entry is carried out in a window: first of all, the code of the sequence number counter has to be entered and depending on the sequence number counter, it may be necessary to enter one or several additional setups. Those setups that are not relevant to the sequence number counter are greyed out.

Once this entry is made, the next value that will be used to number the elements linked to the sequence number counter in the given context is displayed in the field Next value. If no value has been allocated, this field contains 1.

It is then possible to modify this value. An increase in the value suggested does not in principle cause any problem. A decrease in the value should not be made except in a well defined technical context, because elements may already have been numbered with the numbers that the system is looking to re-allocate. This will result in errors, because it will not be possible to create the elements in question.

Close

 

Fields

The following fields are present on this tab :

Block number 1

This code identifies a counter which is referenced when generating an automatic number for a document. A counter is an alphanumeric field of between 1 and 20 characters. It comprises a series of components which are concatenated from left to right to form the counter value.

Block number 2

Wen a sequence number counter is defined by company, there is a sequence number counter per company code. The company code is therefore part of the key that determines the record of the table where the current chrono number is stored.

Wen a sequence number counter is defined by site, there is a sequence number counter per site code. The site code is therefore part of the key that determines the record of the table where the current chrono number is stored.

  • Year (field YEA)

 

  • Month (field MON)

This is the Month, represented in a maximum of 2 digits.

  • Fiscal year (field EXE)

 

Accounting financial year number.

  • Additional info (field CMP)

This is a Component of the sequence number.

Block number 3

  • Next value (field VAL1)

This field initially displays the next value that the system will assign to the related transaction or document. It may be changed to a new value of the Sequence Number as is appropriate to the situation.

Generally, incrementing the number should create no problems beyond the obvious "gap in the series" that will result. But decrementing the number should be avoided except in very well-defined technical contexts, since collisions will result between the new sequence numbers and ones that already exist in the database (e.g., two sales orders with potentially the same number).

Close

 

Error messages

In addition to the generic error messages, the following messages can appear during the entry :

No value of sequence number counter for a numbering of DB type sequence

When a sequence number counter takes its chronological numbers from a database sequence, this is obviously the sequence that gives the chronological numbers. There is then no possibility to enter the next number.

It should be noted that no control is possible on the additional code value.

Tables used

SEEREFERTTO Refer to documentation Implementation