Number Range Exhaustion Alert Program (Email)
Short answer: A custom background program that checks the utilization of document, material and other number ranges every night and reports by email the intervals above the threshold, as well as objects that have no interval for the next year before year end. Mornings where nothing can be posted because a number range ran out are prevented in advance.
- Estimated effort
- S · 2–3 working days
- System
- ECC and S/4HANA
- Tables
- 2
- Scope
- Global
- Built by
- NeKuDos Teknoloji
- Last updated
Why is the standard not enough?
SNRO and the application screens show the current status of a number range one object at a time; the warning percentage of the object only produces a message when a number is drawn in dialog, and nobody sees that message for background postings. There is no standard monitor that scans all objects at once and reports a missing next-year interval before year end. The custom program does this check every night and sends an email only when there are findings.
Who uses it? BASIS administrators, FI/MM/SD application support teams and those responsible for year-end closing.
Closest standard alternatives
- SNRO Number Range Objects. Shows the intervals and current level of one number range object; there is no automatic alert that scans all objects.
Tables used
The tables the program reads and updates. ECC and S/4HANA differences are marked separately.
BAPIs and functions used
- SO_NEW_DOCUMENT_ATT_SEND_API1SAPoffice: Send New Document with Attachments. Sends the findings list to the BASIS team as an Excel attachment
Selection screen parameters
| Parameter | Description | Type | Reference field | Required | Example |
|---|---|---|---|---|---|
| S_OBJECT | Number range object | Range / multiple | NRIV-OBJECT | No | RF_BELEG, MATERIALNR, RV_BELEG |
| S_SUBOBJ | Sub-object (for example company code) | Range / multiple | NRIV-SUBOBJECT | No | 1000 |
| P_PCT | Warning threshold (%) | Single value | — | Yes | 85 |
| P_NEXTYR | Check next-year interval | Checkbox | — | No | X |
| P_MAIL | Email recipient | Single value | — | No | [email protected] |
| P_ONLYF | Send email only when there are findings | Checkbox | — | No | X |
Result list columns
| # | Column | Source |
|---|---|---|
| 1 | Object | NRIV-OBJECT |
| 2 | Sub-object | NRIV-SUBOBJECT |
| 3 | Interval | NRIV-NRRANGENR |
| 4 | To year | NRIV-TOYEAR |
| 5 | From number | NRIV-FROMNUMBER |
| 6 | To number | NRIV-TONUMBER |
| 7 | Current level | NRIV-NRLEVEL |
| 8 | Utilization % | Calculated (NRLEVEL − FROMNUMBER) ÷ (TONUMBER − FROMNUMBER) × 100 |
| 9 | Remaining numbers | Calculated NRIV-TONUMBER − NRIV-NRLEVEL |
| 10 | Object warning % | TNRO-PERCENTAGE |
| 11 | Buffering | TNRO-BUFFER |
| 12 | Finding | Calculated Threshold exceeded or next-year interval missing |
Sample result list
| Object | Sub-object | Interval | To year | From number | To number | Current level | Utilization % | Remaining numbers | Object warning % | Buffering | Finding |
|---|---|---|---|---|---|---|---|---|---|---|---|
| RF_BELEG | 1000 | 01 | 2026 | 0100000000 | 0199999999 | 0191250340 | 91.30 | 8,749,659 | 90 | X | Threshold exceeded |
| RF_BELEG | 2000 | 01 | 2026 | 0100000000 | 0199999999 | 0123408812 | 23.40 | 76,591,187 | 90 | X | No interval for 2027 |
| MATERIALNR | 01 | 0000 | 000000000100000000 | 000000000100999999 | 000000000100912004 | 91.20 | 87,995 | 10 | Threshold exceeded | ||
| RV_BELEG | 18 | 9999 | 0090000000 | 0099999999 | 0098700101 | 87 | 1,299,898 | 90 | X | Threshold exceeded |
How does the program work?
- The intervals of the selected objects are read from NRIV; external intervals (EXTERNIND = X) are skipped because the number is given by the user.
- Utilization % = (NRLEVEL − FROMNUMBER) ÷ (TONUMBER − FROMNUMBER) × 100; remaining numbers = TONUMBER − NRLEVEL. Intervals from which no number has been drawn yet (NRLEVEL = 0) count as zero utilization.
- Threshold: the general threshold on the selection screen or the warning percentage defined for the object in TNRO (PERCENTAGE), whichever is lower.
- For year-dependent intervals (TOYEAR filled), with “Check next year” selected, a next-year entry is searched for every sub-object and interval number used this year; if none exists, a finding is written.
- Buffering information (TNRO-BUFFER, NOIVBUFFER) is added to the finding; for buffered objects it is noted that actual usage can be a few numbers ahead.
- Findings are written to an ALV list and the application log; if there is at least one finding, an email with an Excel attachment is sent with SO_NEW_DOCUMENT_ATT_SEND_API1.
Performance notes
NRIV and TNRO are small tables; the program finishes in seconds. Run it every night; enabling the next-year check only from October to December avoids unnecessary warnings.
Features
- Runs as a background job
- Line-by-line result and error log
- ALV list (sort, filter, subtotals)
- Send the result by email An email with an Excel attachment is sent only when there are findings.
- Export to Excel
Authorization objects
- S_NUMBERDisplay authorization for number range objects (activity 03)
Frequently asked questions
Does the program change number ranges?
No. The program only reads and reports. A new interval or next-year interval is created by an authorized person in SNRO or in the application's own screen (for example FBN1).
Is the utilization correct for buffered objects?
For buffered objects the application servers reserve numbers in packages, so the level in NRIV is slightly ahead of actual usage. This means the warning comes early; the finding line shows the buffering setting.
Can an exhaustion forecast (days left) be added?
Yes. Because the program writes the level to the log in each run, an estimated exhaustion date can be calculated from the consumption of the last 30 days. This extension takes about one day.
Packages that include this solution
Basis Daily System Check Pack
A five-component pack that turns the Basis team's morning check into one list: cancelled and long-running background jobs, scheduled jobs running …
Related reports
Cancelled and Long-Running Background Jobs Report
A custom ALV report that lists background jobs that were cancelled, are still running or finished far above their usual runtime, with the step …
Let us build this program for your system
Briefly describe your system and expectations. We will clarify the scope and come back with an effort and price quote.