Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Regarding Number Range Object

Former Member
0 Likes
1,053

Hello All

I have query regarding F.M CALL FUNCTION 'NUMBER_GET_NEXT'.

We are creating Material master using Z development and attaching materials to Request Number generated by F.M- NUMBER_GET_NEXT.

As per observation nowadays I found lots of numbers are missing generated by the F.M. NUMBER_GET_NEXT.

System is open to all users who can create materials. Upon clicking the SAVE button F.M. NUMBER_GET_NEXT is called.

e.g. current number is :0000001233 next number generated is :0000001239 i.e . in between 7 numbers are missing why it happens so ?

F.M with foll settings:

Main memory buffering: Ticked

No. of numbers in buffer: 10

CALL FUNCTION 'NUMBER_GET_NEXT'

EXPORTING

nr_range_nr = '01'

object = 'ZREQ_NO'

IMPORTING

number = wa_req_header-req_no

EXCEPTIONS

interval_not_found = 1

number_range_not_intern = 2

object_not_found = 3

quantity_is_0 = 4

quantity_is_not_1 = 5

interval_overflow = 6

buffer_overflow = 7

OTHERS = 8.

1 ACCEPTED SOLUTION
Read only

alex_cook
Active Participant
0 Likes
736

Hi,

Refer to the following note for more information:

https://websmp210.sap-ag.de/~form/handler?_APP=01100107900000000342&_EVENT=REDIR&_NNUM=62077&_NLANG=...

The advantage of using number range buffering is improved performance on the application server.

The disadvantage (as you've found) is that you will often not have continuity in the number range. If this is important (eg Financial documents which need to have continuous document numbers for audit) then you should bypass the buffering.

Cheers

Alex

4 REPLIES 4
Read only

Former Member
0 Likes
736

Hi Mahesh,

" Share How did you resolved it, so that this thread will be useful for others who search for similar Issue

In SNUM Tcode Make No Numbers in buffer 0(Zero) and in Function Module Call set IGNORE_BUFFER = 'X'.
CALL FUNCTION 'NUMBER_GET_NEXT'
EXPORTING
nr_range_nr = '01'
object = 'ZREQ_NO'
ignore_buffer = 'X' " Add this and take F1 help on this parameter in SE37
IMPORTING
number = wa_req_header-req_no
iEXCEPTIONS
interval_not_found = 1
number_range_not_intern = 2
object_not_found = 3
quantity_is_0 = 4
quantity_is_not_1 = 5
interval_overflow = 6
buffer_overflow = 7
OTHERS = 8.

Regards

Ram

Read only

alex_cook
Active Participant
0 Likes
737

Hi,

Refer to the following note for more information:

https://websmp210.sap-ag.de/~form/handler?_APP=01100107900000000342&_EVENT=REDIR&_NNUM=62077&_NLANG=...

The advantage of using number range buffering is improved performance on the application server.

The disadvantage (as you've found) is that you will often not have continuity in the number range. If this is important (eg Financial documents which need to have continuous document numbers for audit) then you should bypass the buffering.

Cheers

Alex

Read only

Former Member
0 Likes
736

Hi Mahesh,

In Transactions where you are supposed to get a continuous sequential number you are not supposed to use the buffering so please make the no. of records in buffer as 'ZERO'.

'No. of numbers in buffer = 0.

This should solve your issue.

Regards,

Abhijit G. Borkar

Read only

Former Member
0 Likes
736

Hello All

First of all "Thanks a lot for prompt response"

I checked it in SAP service marketplace and found the note (0000449030 and 0000062077) related to this issue wherein SAP says it's a drawback of Number range object. More If anyone is more concerned about sequence of number range object then you must not user "Buffering" but on account of this you have to compromise with performance which is not recommended.

One imp thing I came to know that whenever your application sever is restarted or shut down then numbers in the buffers get flushed off.

Thanks.

Mahesh