‎2007 Jan 24 3:33 AM
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!
‎2007 Jan 24 4:05 AM
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
‎2007 Jan 24 4:24 AM
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
‎2007 Apr 03 1:18 AM