Sie sind auf Seite 1von 10

1/29/2018 Number Ranges-Things to Keep in Mind | SAP Blogs

Products
Products Industries
Industries Support
Support Training
Training Community
Community Developer
Developer Partner
Partner

About
About

 
Home / Community / Blogs + Actions

Number Ranges-Things to Keep in Mind


May 29, 2015 | 3,736 Views |

Lakshmana Srini
more by this author

ABAP Development
buffer | buffernumberrange | nriv | number | numberrange | rz20 | snro

share
0 share
0 tweet share
0

Follow

Enterprises which have a global presence do a lot of business across the


world in various countries bound by the rules of that particular country.

Take an example of a typical manufacturing company

https://blogs.sap.com/2015/05/29/number-ranges-things-to-keep-in-mind/ 1/10
1/29/2018 Number Ranges-Things to Keep in Mind | SAP Blogs

Its daily operations and business include Procurement of material, sales of


goods and services, Product Manufacturing, Financial Transactions and a lot
more to put on. SAP ERP system is the right solution for all these kinds of
business transactions. Every Business
Transaction/MASTER/TRANSACTIONAL data is recorded in SAP system with
a unique identifier (Some number or alphanumeric characters). The good thing
about this is that we can make a choice of how the number range should start
from, end with, whether it should be internal or external. It’s not only restricted
to a particular entity like sales order/purchase order, it can be used to
configure for any kind of business transaction and even could be used to
generate a unique sequence number for custom data(Like Z transactions to
store data in Z tables etc.,)

However there should be careful monitoring on these number ranges and


mere negligence would lead to dire consequences especially in Production
system.

I have prepared some list of points where we should keep an eye in particular
in Production Systems.

Important Repository objects to Keep in Mind while working with Number


Ranges

SNRO – Number Range Transaction Code

NRIV – Number Range Intervals Database Table

SNUM –Number Range Object Maintenance

Function Modules

NUMBER_GET_BUFFER To Read Buffer information

NUMBER_GET_INFO Number range: Provides information for a


number range number

NUMBER_GET_NEXT NUmber range: Assigns next free number

NUMBER_GET_NEXT_V1 Assigns next free number(s)

Buffering Problem

Here you can observe Main Memory buffering enabled for Material Number
Range Object and Number of numbers in buffer as 10.This means that if

https://blogs.sap.com/2015/05/29/number-ranges-things-to-keep-in-mind/ 2/10
1/29/2018 Number Ranges-Things to Keep in Mind | SAP Blogs

you’re calling the number range object for the first time the starting number will
be picked up(Say Material Number Range starting from 1000 to 2000).

Material Number 1000 will be created and subsequent numbers 1001,


1002,1003,1004,1005 up to 1010 will be stored in memory buffer. Upon calling
the number range object for the next time the sequence that is present in the
buffer will be used instead of querying backend database table.

This could give a better performance but will lead to problems if someone
erase the memory buffer Clearing memory buffer can be done using SM56
and one should be able to understand about the consequences of this activity.
This often leads to skipping of number ranges and we could end up with
documents which are no longer in sequence

Monitor Number Range utilization

If the number range reaches the upper limit and if it’s not changed before the
next document gets created, system will raise an exception which would lead
to SM13 update failure and subsequently ST22 dump like below. If we are
performing the transaction on a foreground then system will be able to issue a
warning when the number range utilization reaches the warning percentage.

Now Let’s Say the documents are created through a Batch Job, unless we
monitor the system /incorporate auto alert mechanism to notify about this
failure, we will not be aware of this issue.If it occurs in Production system and
If we don’t take the necessary action it could lead to bad consequences and
effects enterprise business as well

https://blogs.sap.com/2015/05/29/number-ranges-things-to-keep-in-mind/ 3/10
1/29/2018 Number Ranges-Things to Keep in Mind | SAP Blogs

Interval Rolling

This feature given by SAP can be seen below as check box and this
Functionality comes into picture when Number Range is completely
exhausted. So, In continuation with the previous sub topic of number range
utilization, Upon reaching the upper limit we can decide whether the document
numbering starts from the beginning again by not enabling the check box.
While this seems to be a pretty good option, care should be taken that
previous documents already created must be archived/deleted periodically

Otherwise we would encounter the same ST22 Duplicate Records error which
we discussed in the previous topic

https://blogs.sap.com/2015/05/29/number-ranges-things-to-keep-in-mind/ 4/10
1/29/2018 Number Ranges-Things to Keep in Mind | SAP Blogs

Keep an Eye on Number ranges for which changes are to be done in


Golden client“000”

Generally we have restricted number limit for spools and if it gets used up we
will be getting SPOOL_INTERAL_ERROR occurs and system will no longer be able to
generate the spool.

The Spool number range should be changed only in golden client “000” and the changes

done in any other client wouldn’t be effective

We need to change the SPO_NUM number range , set the upper limit to 99,999

and its good practice to delete the spools regularly so the system uses the
number range from the beginning again once it reaches the upper limit

The spool retention period by default is 8 days and spools can be deleted by using

RSPO1041 which can be scheduled as a background job using SM37. Below link from

help.sap will explain you further details in brief .

Please read through

http://help.sap.com/saphelp_nw74/helpdata/en/4e/a0576140a97118e10000000a42189e/co

ntent.htm

Standard SAP transaction which can be used to check the spool utilization is RZ20

https://blogs.sap.com/2015/05/29/number-ranges-things-to-keep-in-mind/ 5/10
1/29/2018 Number Ranges-Things to Keep in Mind | SAP Blogs

You can follow the below path RZ20 àSAP CCMS Monitor templatesàSpool system

You can observe the percentage utilization and color legend showing as green which
implies that “All is Well”

Never Transport Number Ranges to Production System

Generally any SAP System has a typical landscape of 4 systems

A. SandboxàDevelopmentàQualityàProduction

While Sandbox and Development systems are purely used for implementation
of Repository objects and Unit testing from a developer perspective, Quality
system is used for Business User Acceptance testing

The Data in quality system gets refreshed from that of production often but not
on a daily basis. In Production Business transactions happen every day and in
huge numbers and therefore the data is out-of-sync with a quality system.

https://blogs.sap.com/2015/05/29/number-ranges-things-to-keep-in-mind/ 6/10
1/29/2018 Number Ranges-Things to Keep in Mind | SAP Blogs

Even though we maintain the same number ranges across the two systems
Initially ,the current number used will not always be the same .

Hence it’s not a good practice to transport number ranges to production. If


done so system will trigger SM13 update errors and ST22 Dumps

Unauthorized Access to SNRO transaction

Granting access rights to unauthorized SAP users might lead to


inconsistencies in number ranges if they aren’t sure of how to handle number
ranges. Suppose if someone changes it by mistake , we can still retrieve the
original series using change documents.

A. This can be accessed using the next screen of SNRO (i.e. once you
press the display button on initial screen) .Then follow the menu path
GotoàNumber Ranges

Please Note We have an option “Change Documents available on menu and


on tool bar itself, but it only reads the change data of Number range Object
attributes (Like Text change or Checkbox change).In order to see the Interval
range change documents you need to follow the below path

From the change documents screen you’ll get to know the user , timestamp,
old value and new value etc.,. This is the beauty of change documents in SAP

https://blogs.sap.com/2015/05/29/number-ranges-things-to-keep-in-mind/ 7/10
1/29/2018 Number Ranges-Things to Keep in Mind | SAP Blogs

Alert Moderator

6 Comments
You must be Logged on to comment or reply to a post.

Lakshman N Post author

May 29, 2015 at 2:23 pm

Will Add more points if I come across any

Best Regards,

Lakshman

Rushaa D

September 3, 2015 at 4:34 am

https://blogs.sap.com/2015/05/29/number-ranges-things-to-keep-in-mind/ 8/10
1/29/2018 Number Ranges-Things to Keep in Mind | SAP Blogs

Hello,

I wanted to know if I change Number range for a material, will it have any
consequences? And if any, what are they?

Thanking you in advance.

Regards,

Rushaa

Lakshman N Post author

September 3, 2015 at 5:07 am

It’s not advisable to change Number Ranges often unless suggested by


Business.

Also they shouldn’t be transported as well

Manjunath Basappa

February 9, 2016 at 2:46 pm

Hello

Anyone has idea for RK_BELEG Number range CCMS alert ?

Warm Regards

Manjunath

Rushi Moreshwar

April 28, 2017 at 6:27 am

Hi

https://blogs.sap.com/2015/05/29/number-ranges-things-to-keep-in-mind/ 9/10
1/29/2018 Number Ranges-Things to Keep in Mind | SAP Blogs

I am having an issue with the client.

It is like while creating 10 codes the system took intial


two codes as 9 & 10 and then rest codes was numbered from 1 to 8.

what may be the reason?

Shailesh Rajan

May 24, 2017 at 7:18 am

Hi Lakshman,

Very useful blog, wanted to check with you the approach to take if the number range for
AENDBELEG is as below, and can expire soon, what options are available if archiving is
ruled out.

Regards

Shailesh

Share & Follow


Privacy Terms of Use Legal Disclosure Copyright Trademark Sitemap Newsletter

https://blogs.sap.com/2015/05/29/number-ranges-things-to-keep-in-mind/ 10/10

Das könnte Ihnen auch gefallen