The purpose of this page is to clarify the understanding of the system logic of the Number Range in Accounting Documents
The number range is responsible for generate the document number (BELNR) and is defined by document type. It can be year depended or as well as buffered or no.
Defining Number Ranges in Financial Accounting
The number range is linked to a company code and document type. The intervals are year depended or no. So, the document numbers begin of each year or no. For non-year dependent intervals should be used year ‘9999’.
Please note that the same Number Range (51 in this example) can be used for more than one document type. This depends of the business requirement.
The bellow screen can be reached by transaction FBN1 or SNRO also:
The above screen informs that the actual document number for number range 01 in 2013 for company code 1000 is 5100000151. This values refers to field BELNR in FI tables (BKPF, BSEG, BSIS, BSIK, BSID …).
Table and Number Range Object
Accounting documents uses Object Type RF_BELEG.
Transaction SNRO or SNUM:
NRIV table stored the number range intervals. The document number is assigned in chronologically ascending order based on the table NRIV. For this, the table NRIV is locked until the COMMIT WORK or ROLLBACK is done. This lock guarantees a chronologically ascending assignment of the document number without gaps.
After a COMMIT WORK and the document number is assigned permanently. In the case of a rollback, the document number that was just used is not assigned and is available for the next posting in NRIV again.
But the NRIV lock could cause performance problems (SAP Note 678501). The performance problem occurs specially in the case of parallel batch processes. Buffering was creating as a solution for this scenario.
There are two solutions for this:
- No parallel processing
- Buffering of the number range object RF_BELEG
Related SAP Notes/KBAs
678501: System stoppage, locks on table NRIV
1019692 - NRIV: Incorrect numbers, incorrect year
1522367 - Document number gap reason and analyzing method
1513587 - How to analyze an update termination