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

Creating Multiple Number Range

Former Member
0 Likes
1,458

Hi

I am required to create strings of the following format: XXXXYYYYY. A customized program will read in a string of 4 characters (XXXX) and generate a running number (YYYYY) for it. Every unique XXXX has its own running number range. The strings XXXX are stored in the database. More XXXX could be added to the database in the future.

For example,

TA0100001,TA0100002....

SB0200001...

SB0300001...

Is there a function to create the number ranges? Any advice on how I should approach this problem? Thanks!

3 REPLIES 3
Read only

Former Member
0 Likes
912

transaction SNRO. There you need to give the number range object name.

Then create intervals for the same. SNR0 is the function group. and the NUMBER_GET_NEXT is the function module to use.

http://help.sap.com/saphelp_47x200/helpdata/en/2a/fa02e3493111d182b70000e829fbfe/frameset.htm

Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
912

Hi,

I will suggest two idea's for the same.

Create one number range object for YYYYY and then append it to XXXX that is there in database, but here the number of strings that you can generate are limited.

Another Idea is to create say 5 Nmber range objects.

And have it like if XXXX is in range1 to range 2 use Number range object1 to get YYYYY.

And if XXXX is in range 2 to range 3 then use number range object2 (Or interval 2 of the same number range object 1 that is if you want only one number range object and have 5 intervals instead of 5 number range objects.) to get YYYYY. With this you will more options for generating the required XXXXYYYYY.

Transaction for creating number ranges is SNRO.

Regards,

Sesh

Read only

Former Member
0 Likes
912

decided not to use number ranges