Skip to main content

Number Ranges in dab Nexus

Overview​

SAP number ranges define intervals from which identifiers are assigned to business objects and documents.

In dab Nexus, Real-Time Objects monitor the current level of configured SAP number range intervals to detect newly assigned document numbers. For each relevant interval, Nexus reads the current NRLEVEL counter from SAP and compares it with the value from the previous run.

If the counter has increased, Nexus determines the newly assigned numbers between the previous and current counter values and writes them to the configured target repository. Tables that depend on this repository can then use these document numbers to load the corresponding records.

The number range context can include:

  • Number Range Object
  • Number Range Number
  • Subobject, if applicable
  • Fiscal Year, if applicable

The required dimensions depend on the SAP Number Range Object and its configuration.

1. Number Range Structure​

A Number Range Object can contain one or more intervals. Each interval defines the range from which SAP can assign numbers.

A number range context can be represented as:

Number Range Object + Number Range Number + Subobject (if applicable) + Fiscal Year (if applicable) = Unique Number Range Context

For example, an FI accounting document interval can be identified by:

Number Range Object: RF_BELEG
Number Range Number: 18
Subobject: 1000
Fiscal Year: 2026

2. Number Range Numbers Are Not Number Prefixes​

The Number Range Number identifies an SAP number range interval. It does not represent the leading digits of the document numbers within that interval.

For example, the SAP Number Range Object KONV can contain the following intervals:

Number Range Number From To
01 0000000001 0999999999
02 1000000000 1999999999

Here, 01 and 02 are the identifiers of the number range intervals. The actual values belonging to each interval are determined by their From and To limits.

For example:

0000197101

belongs to interval 01 because it lies between:

0000000001 ≤ 0000197101 ≤ 0999999999

The Number Range Number 01 itself is therefore not a prefix that Nexus expects to find in the document number.

Note: Nexus assigns a document number to an interval based on the interval limits in SAP (From/To), not based on its first digits.

3. Number Range Context in Nexus​

Nexus considers all number range dimensions that are mapped in the repository dependency.

Depending on the Number Range Object, the following information can be relevant:

DependencyDescriptionExample
NumbersNumber Range Number18
SubobjectAdditional separation of the number rangeCompany code 1000
Fiscal YearFiscal-year-specific number range context2026

For example, the complete context for RF_BELEG can be:

RF_BELEG
+ Number Range Number
+ Company Code as Subobject
+ Fiscal Year

If Subobject or Fiscal Year is mapped in the repository dependency, Nexus must include these values when resolving the appropriate interval.

The Number Range Number alone is not sufficient in such cases. Not every Number Range Object requires all three dimensions. The required context depends on the SAP Number Range Object and its configuration.

Example: RF_BELEG​

RF_BELEG is the SAP Number Range Object for FI accounting documents.

For RF_BELEG, the subobject represents the company code and the interval can also be fiscal-year dependent. The Number Range Number 18 is not the accounting document number.

Instead, 18 identifies the SAP interval from which the actual accounting document number is assigned. If Number Range Number, Company Code, and Fiscal Year are mapped in Nexus, the complete context must therefore be considered.

An interval with the same Number Range Number but a different company code or fiscal year represents a different number range context.

4. How Number Ranges Are Used by Real-Time Objects​

Real-Time Objects use SAP number ranges to detect newly assigned document numbers.

For each configured number range interval, Nexus reads the current NRLEVEL counter from the SAP table NRIV. For buffered number ranges, Nexus additionally considers the corresponding value from NRIVSHADOW.

Nexus compares the current counter with the value from the previous run. If the counter has increased, Nexus generates the document numbers between the previous and current counter values.

For example:

Previous NRLEVEL: 1900000000
Current NRLEVEL: 1900000003

New document numbers:
1900000001
1900000002
1900000003

The Number Range Object determines which SAP number range is monitored. Depending on the Number Range Object, Nexus can additionally use the Subobject and Fiscal Year to resolve the applicable interval.

When the corresponding SAP number range advances, the Real-Time Object can determine the newly assigned document number and provide it to its target repository.

Connection to Dependent Tables​

A table that depends on a repository populated by a Real-Time Object receives the relevant document numbers through its dependency.

For the dependent table, these document numbers are applied as an IN filter.

For example:

BELNR IN ('1900000001', '1900000002', '1900000003')

The values in this expression are document numbers. Because the dependency already specifies the documents that need to be loaded, Nexus loads the table for those document numbers. The dependent table itself does not need to be loaded by iterating through the corresponding number range intervals.

5. Smart Extraction​

Smart Extraction applies when Nexus loads SAP tables using the built-in SAP read module. Nexus can use SAP metadata and number range information to optimize how the table is read.

A field can be recognized as number-range relevant when:

  1. The field is part of the primary key.
  2. The field uses a data element known to represent a Number Range Object.
  3. SAP table NRIV contains corresponding number range information.

This allows Smart Extraction to use known SAP number range intervals when determining how the table should be loaded.

Reference​