Symptom
You notice that objects you created are not getting numbered with sequential IDs.
Environment
-
SAP Cloud for Customer
- SAP Business ByDesign
Reproducing the Issue
This issue can happen in several different system areas in both ByD and C4C. We will use C4C Territories as an example.
The system automatically assigns IDs to territories you create manually or upload via the Excel add-in.
The IDs used below, are example IDs.
-
Logon to any C4C system, with Territory Management scoped, for which territories already exist.
- Go to the Sales work centre.
- Go to the Territories view.
- Click New > New Territory.
- Enter the necessary data and save.
- The new territory you manually created gets ID: 342, although there is already a Territory with ID 350 in the system.
- Use Excel upload for new territories.
- The Excel file has a mandatory ID column, however, the ID you enter here, will not determine the ID the system will allocate (see KBA 2328545).
- In your Excel file, add new territories T 2 and T3 (T2 and T3 represent the name you give your territories).
- Upload the file (use the C4C Microsoft Excel add-in).
- In the system you can see, that T2 and T3, respectively get the IDs: 354 and 355 assigned.
- Create a new territory manually again.
- This territory receives ID 343.
Result: IDs can be assigned which are either above or below the already existing IDs in the system.
Cause
Territory Management (COD_TER), like many other areas in C4C and ByD use a standard Number Range object to get the numbers for IDs.
A main memory buffer of ten numbers was set up for our example: Territory Management (COD_TER).
This is the default for document numbers in C4C/ByD. Based on how such buffering works, this might create gaps when multiple application servers are used. Even to the fact that a lower number is used after a higher number.
For performance and locking reasons, the main memory buffer is highly recommended and used throughout the systems, unless there is a case of legal reasons which require gap-free and strongly sequential numbers.
Resolution
Changes to this behaviour will not be done unless there is a legal case which then has to be checked by the respective Product Management.
The current behavior is a compromise between compliance (a number is used once) and performance (order of numbers not sequential and possible gaps).
See Also
KBA: 2328545 - Territory Uploaded via Excel Does Not Have the Maintained ID
Keywords
Territory Management, ID, sequence, not, skipping, skip, jump number, number range, Gebietsnummer falsch, übersprungen , KBA , number range , LOD-CRM-TM , Territory Management , AP-RC-NR , Number Ranges (SAP Business ByDesign) , How To