Hello SAP S/4HANA Cloud Community,
I work on the LO-MD-BP component for SAP S/4HANA Cloud and I wanted to share some information on a topic for which I have seen a couple of incidents. The topic of this blog is on why do we sometimes see skips in the number range for Business Partners so I thought that I'd share the information for the benefit of our community. In this blog, I'll explain how buffering works and the reasons behind it being active for the creation of Business Partners.
In a S/4HANA Cloud system for the creation of Business Partners the number range object is "BU_PARTNER" and this number range object has Buffering enabled with the numbers being loaded into the buffer is 10.
When the system buffers a number range object, it does not update numbers individually in the database but reserves a preset group of numbers (depending on the number range object) in the database the first time a number is requested and makes these numbers available to the application server in question.
For explanation purposes I've added an example of how the system could load the numbers into the buffer in that 10 numbers when we are creating a Business Partner(s), the system takes 10 numbers (let us assume 10000005 - 10000014) and keeps them in a buffer. Now if we keep creating BPs in the same session, no gaps will occur. It will take the numbers one by one from the buffer and create the BP, meaning it will create the ten BP's as 10000005, 10000006, 10000007, 10000008, 10000009, 10000010, 10000011, 10000012, 10000013 and 10000014.
If however, you leave the session without using up all of the numbers which have been loaded into the buffer or when different users try to create BP at the same time. Then you might see gaps in the number range e.g. 10000005, 10000006, 10000007, 10000015, 10000027 etc.
This is the SAP standard number assigning behaviour for the Business Partner.
The benefits of buffering are as below:
1. Buffering the number range objects has a positive effect on performance because the system no longer has to access the database (number range table NRIV) for each posting. The number interval buffer is in the Shared Memory of the application server. Each buffer is used to store the external number intervals and a certain number (subinterval) of the internal number intervals.
2. Database accesses are always subject to the database transaction mechanism. Once an application has assigned a number for one user, a second user cannot assign a number until the first user has executed a commit operation on the database. The application blocks further assignment, and the second user has to wait until the commit has been executed.
3. A serialisation of this table (database locking) is prevented to a large extent so that posting procedures can be carried out in parallel.
For these reasons, we have not delivered an SSCUI which allows the deactivation of number range buffering for Business Partners in SAP S/4HANA Cloud. There is also an old SAP On-Premise note 62077 also explains the same reasonings.
SAP S/4HANA Cloud Product Support