Skipping of numbers in the SAP Number Range object

By Sreedevi

Sometimes there might be complaints from the client / consultants that some document numbers are getting skipped.  


For example, customer numbers generated are 4676, 4677, 4681, 4682, 4683 and so on.  The numbers between 4677 and 4681 are missing. What could be the reason? 


This is due to buffering. The Number range object for customer master is DEBITOR. See the following screenshot from the transaction SNRO: 


From the above screenshot, you can observe that the "No. of numbers in buffer" is set to 5. So the first time a number from this number range object is requested, first set of 5 numbers are stored in buffer. Next time, when a number is requested it is fetched from the buffer instead of hitting the database table NRIV. Whenever the buffer is empty, it is refilled with the next set of 5 numbers. 

Now consider that the customer numbers from 4676 to 4680 are stored in the buffer. 4676 and 4677 are utilized for creating customer numbers. Now assume that the buffers have been reset (Transaction SM56). Next time when you request for the customer number, the number 4681 is retrieved and the number 4681 to 4685 are passed to the buffer.  

So when we use number range objects using buffering ON, there are chances for some gaps in the document numbers. So make sure that you do not use buffering for the legal documents.  

Procedure to reset the buffers manually: 

Go to transaction SM56.


Click on NumberRange Buffer --> Reset. 


Following popup would appear: 


Enter the Client and the SAP Number Range object name as required. This would reset the buffers for the particular number range object. 

If you would like to skip the buffer and get the document number directly from the database table, use the option IGNORE_BUFFER in the function module NUMBER_GET_NEXT.  

For SAP help on this, click here.

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image