SAP Knowledge Base Article - Public

1475681 - Changing Number Range Settings Does Not Yield the Expected Results

Symptom

As best practice, you should set up a number range at the beginning of a project and keep it that way.  However, in rare occasions, you might have to change the number range to meet certain circumstances. At this point, the result might not be the same as you expect. For example, in your initial setup, you define:

  • External number range: 000001 to 009999
  • Internal number range: 010000 to 099999

After this definition, you created several IDs.  The last ID created was 010009.  Now you re-define the number range as following:

  • External number range: 000001 to 000099
  • Internal number range: 000100 to 099999

However, the latest ID the system generates automatically is 010010 and not 000101 as you expected.

Environment

  • SAP Cloud for Customer
  • SAP Business ByDesign

Cause

 This is the standard system behavior.

Resolution

When working with number ranges, you need to keep the following guidelines in mind:

  • The system generates a new ID in the current internal number range.
  • The new ID is always larger than the last ID used.  It won't go back to a smaller ID number because you lowered beginning number of the internal number range.

We still use the above example to demonstrate these guidelines:

Example 1: After changing the beginning number from 010000 to 000100, the system will take a note of it.  However, whenever a new ID is generated, it looks for the last ID number. In your case, it is 010009.  Since this number is in the range of 000100 to 099999, so the next ID should be 0100010, not 000101 as you expected.

Example 2: If the original number ranges of 000001 to 009999 for external number and 010000 to 099999 for internal number have never been used, and you make a change, then the first ID it generates will be 000101 instead of 010001.

Example 3: If your new internal number range is 000100 to 000999, it won't work. Because the last ID number of 010009 is already larger than your maximum number of 000999.  The next ID has to be larger than 010009.

Example 4: If your new internal number range is 100000 to 999999, and the last ID is 010009, the new generated ID should be 100001.

In conclusion, the number range should be defined before any ID has been generated. If a change is absolutely needed, you need to understand above guidelines and accept its consequences.

Keywords

number range, change, beginning number, current number range , KBA , AP-RC-NR , Number Ranges (SAP Business ByDesign) , How To

Product

SAP Business ByDesign all versions ; SAP Cloud for Customer add-ins all versions