中国·壹定发-WWW.EDF130.COM|品牌官网

[Decision Expert Column] Article 89: SAP Financial Accounting - How does the system read the annual voucher number range?
Time: 2025-10-31
Views: 132


 

[Foreword]


Decision has been deeply involved in the SAP field for more than 19 years and has been praised by many customers. In order to better help customers implement digital projects, the "Decision Expert Column" is completely free and open source, paying tribute to Musk's open source spirit!

Based on the senior capabilities of Decision's expert consultant team with more than 20 years of SAP experience, combined with Decision's 1,000+ successful project cases, this article summarizes and publishes the corresponding research experience and suggestions of enterprises in promoting ERP project implementation, and continues to escort the SAP implementation and delivery of enterprises.

 

[Problem description]


How does the system read the range of annual voucher numbers? In the system, some companies use annual voucher numbers, while others use cross-year voucher numbers. What logic does the system use to retrieve the range of voucher numbers?
 

[Problem Analysis]


1. Let's take a financial FI voucher as an example to illustrate the system's logic for retrieving voucher number ranges.

2. Transaction code OBA7 shows the corresponding voucher number range for each voucher type. Taking a DZ voucher as an example, the number range is 14.

3. Transaction code FBN1 shows that the FI voucher number object is RF_BELEG.
 


 

As you can see, the 14th segment maintains entries for 2023, 2024, and 9999.

4. If the voucher posting year is 2023 or 2024, the system automatically matches the corresponding year's voucher number range based on the posting date.
If the voucher is posted to 2025, and the system cannot find it in the 2025 range, it will search for voucher numbers in the 9999 range.

5. Transaction code FBN1 FI voucher number object is RF_BELEG, which supplements the maintenance of the 14th segment for 2026.
If the posting date is 2025, will the system search for vouchers in the 9999 range or in the 2026 range?
 


 

In this situation, reading the 2026 or 9999 code is possible.
This is because the system needs to check whether the last buffer for retrieving the same key voucher number stopped at the 2026 code or before reading the 9999 code.
 


 

After reading the BUFFER.
 


 

After reading the BUFFER.
 


 

6. Continuing the previous example.

Assumption 1: The system maintains voucher numbers from year 9999, and these vouchers have already been posted in 2025, using the 9999 voucher number. If 2026 vouchers are subsequently added and posted in 2025, the 9999 voucher number (from the buffer) will still be used.

Assumption 2: The system maintains voucher numbers from year 2026, and these vouchers have already been posted in 2025, using the 2026 voucher number. If 9999 vouchers are subsequently added and posted in 2025, the 2026 voucher number (from the buffer) will still be used.

Assumption 3: The system maintains both 2026 and 9999 voucher numbers. During the first posting in 2025, the system automatically uses a voucher number greater than or equal to 2025, and will automatically retrieve the 2026 voucher number. The following is the code in the program.
 


 

7. If the 2025 posting already used voucher number 9999, and we now need to maintain voucher numbers for 2026 or 2025, how should we proceed?
Procedure: Clear the buffer.
Transaction code SM56
 


 

[Summarize]


1. When posting financial FI vouchers, the system defaults to reading the voucher number for the year of the posting date.

2. If no voucher number is maintained for the posting year, the system searches for voucher numbers in subsequent years. For example, if posting for 2025, and no voucher number range is found for 2025, the system searches for the range for 2026, and so on, up to the range for 2027, and so on, until the range for year 9999 is found.

Once found, the annual voucher number range is stored in the buffer.

3. Subsequent postings for 2025 will read the annual voucher number range from the buffer in the previous step.

4. If the cache is cleared or the server is restarted, the system will re-follow steps 1 and 2 above to read the voucher number range.
 

Attached:

Find next voucher number function NUMBER_GET_NEXT
2469364 - Locks in table NRIV
359907 - Buffering of RF_BELEG/number assignment in FI
449030 - FB01: Deactivation of number range buffering at interval level
Disable BUFFER at the segment level: sample module SAMPLE_PROCESS_00001170
2200503 - FAQ Number ranges (BC-SRV-NUM component)
445575 - Report for determining the highest assigned address number
2611178 - How to use the Number Range Trace
2289523 - How to activate number range System log
3408587 - How to use transaction SNUM_SERVICE for Support



【Service Guide】
For more information on SAP courses, project consultation and operation and maintenance, please call Decision's official consultation hotline: 400-600-8756


【About Decision】
Global professional consulting, technology and training service provider, SAP gold partner, SAP software partner, SAP implementation partner, SAP official authorized training center. Nineteen years of quality, trustworthy! 

Online
Wechat
Phone
400-600-8756
XML 地图