BASIS Program Custom development Background program

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.

TableRoleAccessSystem
NRIVNumber Range IntervalsNumber range intervals: sub-object, year, from, to and current levelReadECC + S/4
TNRODefinition of Number Range ObjectsWarning percentage, year dependency and buffering of the objectReadECC + S/4

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

ParameterDescriptionTypeReference fieldRequiredExample
S_OBJECTNumber range objectRange / multipleNRIV-OBJECTNoRF_BELEG, MATERIALNR, RV_BELEG
S_SUBOBJSub-object (for example company code)Range / multipleNRIV-SUBOBJECTNo1000
P_PCTWarning threshold (%)Single value—Yes85
P_NEXTYRCheck next-year intervalCheckbox—NoX
P_MAILEmail recipientSingle value—No[email protected]
P_ONLYFSend email only when there are findingsCheckbox—NoX

Result list columns

#ColumnSource
1ObjectNRIV-OBJECT
2Sub-objectNRIV-SUBOBJECT
3IntervalNRIV-NRRANGENR
4To yearNRIV-TOYEAR
5From numberNRIV-FROMNUMBER
6To numberNRIV-TONUMBER
7Current levelNRIV-NRLEVEL
8Utilization %Calculated (NRLEVEL − FROMNUMBER) ÷ (TONUMBER − FROMNUMBER) × 100
9Remaining numbersCalculated NRIV-TONUMBER − NRIV-NRLEVEL
10Object warning %TNRO-PERCENTAGE
11BufferingTNRO-BUFFER
12FindingCalculated Threshold exceeded or next-year interval missing

Sample result list

ObjectSub-objectIntervalTo yearFrom numberTo numberCurrent levelUtilization %Remaining numbersObject warning %BufferingFinding
RF_BELEG100001202601000000000199999999019125034091.308,749,65990XThreshold exceeded
RF_BELEG200001202601000000000199999999012340881223.4076,591,18790XNo interval for 2027
MATERIALNR01000000000000010000000000000000010099999900000000010091200491.2087,99510Threshold exceeded
RV_BELEG189999009000000000999999990098700101871,299,89890XThreshold exceeded
A view built with fictional sample data; not real system data.

How does the program work?

  1. The intervals of the selected objects are read from NRIV; external intervals (EXTERNIND = X) are skipped because the number is given by the user.
  2. 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.
  3. Threshold: the general threshold on the selection screen or the warning percentage defined for the object in TNRO (PERCENTAGE), whichever is lower.
  4. 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.
  5. 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.
  6. 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 Package Custom

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 …

5 components · v1.0

Related reports

BASIS Report Custom ALV report

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 …

TBTCO · TBTCP · TRDIRT

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.

Related report: Number Range Exhaustion Alert Program (Email)