Page tree
Skip to end of metadata
Go to start of metadata

Gaps in Number Range for Accounting Documents



The purpose of this page describe the primary tasks that can be checked to identify a number range gap in Accounting Documents providing a description about the possible causes and linking with the available SAP notes available.


Function NUMBER_GET_NEXT is responsible for generate the next number range. If this function is called and a commit work is not performed in the database this number is lost.

For these reason an unexpected update termination or dump before the commit work can results in number range gaps.

Custom codes should avoid call Function NUMBER_GET_NEXT without commit work or rollback.

Steps to identify gaps in number range:

  1. Check Update Terminations in SM13:
    This is the most likely cause of number range skipping. If an update termination occurs before the number is already assigned (commit work already performed) and the accounting document was not stored in FI tables, this document number will be lost. In this case the SM13 will display the update termination for analyzing. For more details please check SAP note 1513587. Please check also transaction ST22 to check whether short dump occurred.
  2. Custom Code: 

    -> If inside a custom code NUMBER_GET_NEXT is called and after this a commit is performed the number range cannot revert anymore in a rollback a scenario.

    -> A common use of this is User exit USEREXIT_NUMBER_RANGE in program RV60AFZZ. Other point to be checked is source codes in BTE 00001030.

    -> If document number gap occurs because of an implicit COMMIT between the document number assignment and COMMIT WORK. Please check the source codes between document number assignment and COMMIT WORK for finding if an implicit COMMIT is triggered. For preventing an implicit COMMIT triggered after document number assignment before COMMIT WORK in SAP standard program, all E-messages between document number assignment and COMMIT WORK have been changed to A-messages via standard correction in SAP notes: 428391, 1259205, 1420715

  3. Buffering:

    If you have activated buffer.  You can check if you have buffer activated in SNRO transaction.

    -> If a buffering type is activated and year-dependent number ranges are defined, the document number gap may occur at the end of a fiscal year. In this case Please check the values in To number field and current document number field of the table(NRIV_LOKAL or NRIVSHADOW) for finding last buffered document number, and the current document number, then check the document numbers updated in table BKPF via transaction SE16 for judging whether the gap occurred at the end of the fiscal year. If yes, the document number gap occurred is a standard system behavior. 

    *NRIV_LOKAL: local buffer

    *NRIVSHADOW: parallel buffer 



                -> If 'Main memory buffering' is used check whether you have shut down the system. In this case the buffered numbers that were not used will be lost.

If the document number buffering type is switched you  can check whether buffering type was changed and who changed it via Tcode SNRO-> Object RF_BELEG-> Goto-> change documents.  Check which value is saved in field 'old value' and field 'New value' (space means 'No buffering', 'P' means 'Local buffering with process ID', 'S' means 'Parallel buffering').


              4. Check System Logs: 

                  Check the system logs for all servers in Tcode SM21 via menu: System log ->Choose->Central system logs. Here you can try to find the information which might be relevant for the document number gap.

For example, whether a dialog or a background work process was cancelled, whether a update termination occurred etc. Then you can analyze this dialog work process log in Tcode ST11, the background work process log in SM37 and the update termination in Tcode SM13.


              5. SAP Modification Note:

                 If the document number gap occurs regularly in your Production system without any helpful information, such as NO short dump, NO update termination, NO system log, and you even don't know in which transaction code the document number gap occurs. SAP offer a modification Note 1259909 to collects some header information which are used for restricting the concerned transactions, programs, users, time intervals. The note's results should shows where you have to check the program logic.  But as it is a modification note, SAP should release it to the customers.


Reports to Identify Gaps in Number Range

-       RFBNUM00N:  This report displays these document number gaps for the number range object RF_BELEG.To make documentation more secure you could run RFBNUM00 once a month.

-       RSSNR0A1: Local buffering with process ID". For more details please check SAP note 179224

-       RFVBER00: document number gap caused by update termination

Related Documents

Number Range Buffers in Financial Accounting

Number Range In Financial Accounting

Related SAP Notes/KBAs


SAP Note 1522367: Document number gap reason and analysing method
SAP Note 1513587: How to analyze an update termination
SAP Note 428391: Inexplicable document number gaps in FI (II)
SAP Note 1259205: FI: Document number gaps in FI documents due to error msgs
SAP Note 1420715: FBV1: Gaps in doc number assgmt in parking due to error msg
SAP Note 179224: for unbuffered number ranges
SAP Note 175047:  Causes for FI document number gaps (RF_BELEG)