SNRO sap transaction code to Create and Maintain ABAP number ranges

The SAP transaction code SNRO allows you to create and maintain number ranges for use with you ABAP programs. Below shows you the simple steps required to create a number range. In-order to access the next number in the range from within your ABAP code simply call function module NUMBER_GET_NEXT with the relevant details.

Step 1 - SAP number range transaction
Execute tcode SNRO and enter a name for your new number range (i.e. ZNRANGE)



Step 2 - Number range object details
Press the create button and fill in the number range object details screen, now press save. Read popup message and click yes if happy with selected method of buffering.



Step 3 - Actual Number ranges
Now press the 'Number Ranges' button to maintain intervals associated with this object.



Step 4 - Number range interval(s)
Press the change intervals button(pencil) to create a new interval and maintain any existing ones



Step 5 - Add number range interval
Press the + interval button to add a new number range to your object.


Fill in the appropriate details such as the from and to number, then Press the insert button (+) to add the interval to the number range object.

Also please note the id(No) will except 01 or 1 and when you execute FM NUMBER_GET_NEXT you will need to pass the exact id you enter here, also make sure you create them the same on each system (i.e. DEV, QAS, PRD etc) otherwise it will work on some and not the others.


Step 6 - Created interval
The number range interval should now have been added. Press save, read information message and then press the green tick. Your number range has now been created.


Use function module NUMBER_GET_NEXT in your ABAP code to get next number in your number range

Also just for information the Number range details are stored in the following tables:
TNRO - Numnber ranges
NRIV - Number range intervals


Related Articles

Internationalization in SAP
PPOM_OLD sap transaction code
PPOSE sap transaction code to view all people and org units
SM01 allows you to lock any SAP transaction so users can't use it.
SAP transaction codes (tcodes) useful for ABAP development and customization
SAP Table maintenance transaction codes
SAP Application specific transaction codes
SAP BW development transaction codes such as RSA1, RSA5, SBIW..
SAP HR transaction codes
SAP PI XI and RFC Maintenance transactions
Useful Workflow transaction codes such as SWDD, PFTC, SWO1, SWEC...