2006 Feb 20 10:33 AM
Hallo guys,
I have questions on number range.
the FM 'NUMBER_GET_NEXT' has an import parameter:NR_RANGE_NR
what it means.I checked the transaction 'SNRO',but still not clear about this.
Furthermore,is there any FM that can get the defined number range information:such as 'NR_RANGE_NR','from number', 'current number' etc.
Thanks!
Best Regards,
Liying
2006 Feb 20 10:45 AM
'NR_RANGE_NR' is the number range that must be maintained in tcode SNUM.
CHECK THIS .. FOR MORE DETAILS http://www.sap-img.com/ge003.htm
'NR_RANGE_NR' is the number range that must be maintained in tcode SNUM.
CHECK THIS .. FOR MORE DETAILS http://www.sap-img.com/ge003.htm
2006 Feb 20 10:36 AM
2006 Feb 20 10:42 AM
Hi liying,
1. OBJECT -
> Number Range
One---> Many
2. This is the hierarcy
3. For each object, there can be multiple
number ragne.
4. IN SNRO,
click on edit,
a new screen will come,
click on 'Number Ranges'
then press 'Intervals'.
5. U will be able to see all intervals.
This interval needs to be / may need to be
hardcoded in the program
depending upon the scenario.
regards,
amit m.
Message was edited by: Amit Mittal
2006 Feb 20 10:52 AM
Hi,
thanks for your info.
To max bianchi,
actully I want to get parameter 'NR_RANGE_NR' as output.The FM you gave is the one requirs this parameter.So it is not the one I want:-(
To Amit Mittal ,
what did you mean ?Actually I want to know what is 'NR_RANGE_NR'(Number range number:what does this mean),what the value '01' or '02' mean?How can I get the value of this parameter via any FM,or if it possible?
Any ideas?
Thanks
B.R.
Liying
2006 Feb 20 10:56 AM
Thanks Vijay Babu Dudla and Ashok Kumar Prithiviraj ,
I think I get the point!
2006 Feb 20 10:58 AM
Hi
If you want to know NR_RANGE_NR you give us more informations.
That parameter depends on the process you're analyzing, so you have to know the object of number runge.
For example:
If you want to know the number range for FI document, you need read the master table of FI type document (field T003-NUMKR).
So there isn't a fm can have that parameter as output.
You can try to read directly NRIV table.
Max
2006 Feb 20 11:07 AM
Hi Max,
so that means the value for 'NR_RANGE_NR' can not be set freely,it depends on process.
If I set the value '01' to it instead of the correc one '02',what will happen?
I have little idea about this.
Actually I just want to assign a sequence field for my table,in order to let it be unique I use number range.
Thanks
B.R.
Liying
2006 Feb 20 11:21 AM
Hi
Not exactly!
See the key of NRIV table:
- OBJECT: it means the process where a certain number range has to be used. For example: RV_BELEG is for sales orders.
- SUBOBJECT: it means the other object to allow several ranges for the same process.
For exaple in FI: it can define several number ranges in order of company code.
OBJECT = RF_BELEG
SUBOBJECT = Company code
So you have to know these two data because they define the process where your range has to be used.
After you can freely define NR_RANGE_NR.
If you need to use an your own number range, you have to create an your object and, if it needs, subobject.
Max
2006 Feb 20 11:35 AM
Hi Wang,
'NR_RANGE_NR' is the key which determines what number range u want to pick up ur number from.
eg, goto transaction SNRO, enter RV_BELEG as object -->Number Range --> Intervals --> u ll see a screen with some ranges. The first column ( No. ) is the NR_RANGE_NR value that this function module takes as input. U also see From number, To number & Current number. These values are attributed to this particular no. So, the current number holds the latest no. in the number range and when u call this FM NUmber_get_next with the 'NR_RANGE_NR' value, it throws up the next number.
hope i explained u a bit abt the concept.
Regards,
Bikash
2006 Feb 20 10:44 AM
Hi,
In FM documentation it is clearly Mentioned ...
please read the FM documentation..
Number range number
The number range number clearly identifies a number range interval for an object/sub-object. For types 1 and 4, the number range number is allocated manually via the maintenance dialog. For types 2, 3 and 5 to 8, the allocation is automatic: The number range number is assigned to the elements via the group table.
DATA: RC LIKE INRI-RETURNCODE,
NUMBER(10) TYPE C.
CALL FUNCTION 'NUMBER_GET_NEXT'
EXPORTING OBJECT = 'HUGO'
NR_RANGE_NR = '01'
IMPORTING RETURNCODE = RC
NUMBER = NUMBER.
CASE RC.
WHEN ' '.
* everything o.k.
WHEN '1'.
* the assigned number lies in the critical area.
WHEN '2'.
* this was the last number, next time the first number
* will be assigned
ENDCASE.Regards
vijay
2006 Feb 20 10:45 AM
'NR_RANGE_NR' is the number range that must be maintained in tcode SNUM.
CHECK THIS .. FOR MORE DETAILS http://www.sap-img.com/ge003.htm
2006 Feb 20 11:17 AM
Hello Liying,
NR_RANGE_NR is used when u have multiple number ranges running for different intervals. For e.g
u have diferent customer account groups like sold to party, Bill to party etc. For each customer account group you can have a separate number range running. So 01 for sold to party 02 for bill to party etc... so when u are generating next number u will have to specify whichnumber range to use and thia is where this field is used.. so if you are creating next number for Sold to party u will pass 01 to this field in FM.
Abhijit
2006 Feb 20 11:49 AM
If u want to use it for ur own number range what u can do is create an entry in SNRO with ur own object name and create Number range for 01. You can then pass this number to the FM.
2006 Feb 20 12:01 PM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |