Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
former_member209217
Active Contributor

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

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 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

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

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/content.htm

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


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

  1. 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. 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.

  1. 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

13 Comments