12-26-2005 3:41 AM
Hello,
is the number range buffer an own buffer like the single record buffer for instance? I mean, does an application server reserve a part of its ram for the number range buffer?
How can a number range buffer be cleared?
To my knowledge, in case of a shutdown of the appl. server, the number range buffer is cleared as well.
What happens if the number range buffer overlfows?
As far as I know, objects will be swapped...
Is the number range buffer linked to any other buffer or anything else?
I did not find any detailed information about that, either in OSS nor ins SAPHELP...
thx,
holger
12-26-2005 5:38 AM
Hi again,
Please award points if any answer was useful.
regards,
amit m.
12-26-2005 4:13 AM
Dear Holger,
Two techniques apply for the buffering in the case of Number Range.
a. No buffering - In this case number is directly fetched from NRIV table. This technique adds overhead though no. will be coming serially.
b. Buffering - Each application server will keep its own buffer space, say 10 no.s. Hence when the appl. reboots or buffer exhausted, it will fetch first 10 no.s available from NRIV table. This technique cuts down overhead but no. may not be in sequence.
Regards,
Deva.
12-26-2005 4:24 AM
Hi Holger,
1.
is the number range buffer an own buffer like the single record buffer for instance
Somewhat like it.
The concept of number range buffer
is not the one like a table / record buffer.
Its concept is useful for mult-user concurrentusers
live environment.
Whenver a new number is request,
and if BUFFERING is allowed in the number range,
first the buffer is searched for.
If the buffer is full, it is writtten to the database,
buffer is cleared, and a new number is generated
till the next limit gets full.
Even if we test run any FM to fetch a new number,
it will get updated in NRIV Table.
2. How can a number range buffer be cleared?
I don't think it cannot be cleared.
3. What happens if the number range buffer overlfows
The programs trying to fetch
the new number, will recieve an eror
ie. sy-sburc <> 0.
Hence, the programs should take care of this.
4. Is the number range buffer linked to any other buffer or anything else
No there is no link.
I hope it helps.
Regards,
Amit M.
Message was edited by: Amit Mittal
12-26-2005 4:49 AM
thx amit!
if many numbers are lost what can be the reason?
Maybe, numbers are used by many accounting areas?
What do you think?
12-26-2005 4:52 AM
Hi again,
1. The one reason is :
many users are working on that
transaction
and probably
everybody doesnot save that document.
2. So what happens,
the program calls standard FM
for getting next number range,
and this new number gets booked.
(Even if such number is asked for
testing, no saving etc, then also,
this number gets saved as the last number)
3. Due to this, gaps arise.
4. Maybe, numbers are used by many accounting areas?
Yes, absolutely.
regards,
amit m.
12-26-2005 5:38 AM
Hi again,
Please award points if any answer was useful.
regards,
amit m.
12-26-2005 6:12 AM
hi amit,
thanks very much. I have one more question...
An application server teks 10 numbers for example. In the database, these numbers are declared 'used'. If these number are used for testing purposes (may) a gap of numbers my occur later on.
Only if a document is saved, numbers are declared 'used'?!?
Are there any other reasons for gaps?
What is about different accounting areas?
holger
12-26-2005 6:17 AM
Hi again,
1 .If these number are used for testing purposes (may) a gap of numbers my occur later on
Whether testing or actuals,
the NUMBER is USED UP.
It won't be available in any way
in the future.
2. Only if a document is saved, numbers are declared 'used'?!?
No. Even if the document is not saved,
the number is USED UP.
3. Are there any other reasons for gaps?
No, this is the only reason for gap.
4. What is about different accounting areas?
I did not understand the context !
Are u talking about a specific transaction
where accounting area is used ?
Accounting areas are customized !
I hope it helps.
regards,
amit m.
12-26-2005 6:27 AM
What I mean by accounting area:
I can get statistics about used numbers. I have to get all used numbers, corresponding to all affected accounting areas. If I get statistics about used numbers of only a few accounting areas, I will find a gap as well...
But why do people use the numbers for testing purposes?
What happens if an application server is shut down?
-> Numbers (already booked on the database) get lost?
---> A gap occurs? Numbers are 'given' back to the database?
thx, holger
Message was edited by: Holger Schmidt
12-26-2005 6:45 AM
Hi Holger
Reseting Number range Buffers
Transaction SM56 is used for the administration of the number range buffer.
Reset Buffer
To delete entries from the buffer, choose Number Range Buffer ® Reset. This happens automatically when an interval is changed or deleted in transaction SNR0 (or in the application-specific number range maintenance). This mechanism prevents any incorrect numbers still in the buffer from being assigned. You can also perform this action manually from the above menu path. A dialog box appears where you can specify which records you want to reset. If you select the indicator Global reset, the buffer entries on all application servers will be deleted. If the indicator is not selected, only the buffer entries on the current application server will be deleted.
For further details refer the following link :
http://help.sap.com/saphelp_nw04s/helpdata/en/7b/6eb2aa7aed44ea92ebb969e03081fb/frameset.htm
Gap Creation:
The system can assign a number from the buffer, provided the following conditions are satisfied:
· You want to assign one number to one object using the function module NUMBER_GET_NEXT
· The main memory buffer is activated for the number range object.
· The parameter IGNORE_BUFFER is not set.
The number range buffer proceeds as follows:
It checks whether it already has an area in the buffer for the number range interval required and whether this area is not yet full. If both conditions are satisfied, the current number level in the buffer is increased by the required number and the caller notified of the assigned numbers. Immediately afterwards a new process can assign a number from the same interval. If there is a rollback, the numbers are lost they are not returned to the buffer.
If there is a rollback, it creates a gap in the document numbers. Applications that do not want any gaps (or not allowed gaps for legal reasons) should not use the number range buffer.
If the number range interval you want is not in the buffer or the number stock is exhausted, the number range buffer must fetch new numbers from table NRIV in the database. The mechanism used is called number range server.
For further details check the following url:
http://help.sap.com/saphelp_nw04s/helpdata/en/95/3d5540b8cdcd01e10000000a155106/content.htm
I hope this helps.
Dont forget to reward pts if its useful ;>)
Regards
Rakesh
12-26-2005 6:51 AM
Hi again,
1 What happens if an application server is shut down?
-> Numbers (already booked on the database) get lost?
---> A gap occurs? Numbers are 'given' back to the database?
Numbers DO NOT Get Lost.
The numbers are updated in NRIV Table.
So the next calling will be in sequence.
2. Gap does not occur.
Numbers are NOT Given back to the database.
3. Please note that
whenever a number is asked for by any program,
that number is booked
and nobody can get it back.
This is SAP mechanism for multi-user environment
and avoid clashes of numbering ranges.
HAD IT NOT BEEN LIKE THIS,
All SAP Customers would have run
into a emergency production problem.
Please reward points if u find any answers helpful.
regards,
amit m.
Message was edited by: Amit Mittal
Message was edited by: Amit Mittal