2012 May 03 8:47 AM
Dear Experts,
I have created a number range object "ZDEMO" with the following properties.
1. Subobject - J_1IEXGRPS(Excise Group)
2. To year - 'X'
3. Number length domain - NUM4
4. No interval rolling - 'X'.
5. No buffering.
Then created a interval only for the year 2012 and ExciseGroup(sub object) - 10 as
No Year From To CurrentNo
01 2012 0001 9999 0
After creating, i called the number range through report program using the FM - "NUMBER_GET_NEXT".
For the year 2012, number range is working fine. But when i call the same number range for the year 2011, instead of throwing an error, the number range
is generated from the interval created for 2012. Year validation is not happening.
Please help me to resolve this issue.
Regards
Anand
2012 May 03 9:18 AM
Seems to be the standard behavior, SAP look for the first range with year greater or equal to the requested year (so the "TO YEAR" name of the field)
-> Your created range is valid til 2012 so valid for 2012, 2011, 2010, etc. but not for 2013, 2014.
* From include LSNR3F01 / in NUMBER_GET_NEXT FG
select * from nriv where object = p_object
and subobject = p_subobject
and nrrangenr = p_nr_range_nr
and toyear >= p_toyear
order by primary key. "#EC PORTABLE
g_found = yes.
exit.
endselect.
If you want to prohibit 2011 (and previous years) create range for 2011 with no free interval, (set current number equal to maximum number)
Regards,
Raymond
Dear Experts,
I have created a number range object "ZDEMO" with the following properties.
1. Subobject - J_1IEXGRPS(Excise Group)
2. To year - 'X'
3. Number length domain - NUM4
4. No interval rolling - 'X'.
5. No buffering.
Then created a interval only for the year 2012 and ExciseGroup(sub object) - 10 as
No Year From To CurrentNo
01 2012 0001 9999 0
After creating, i called the number range through report program using the FM - "NUMBER_GET_NEXT".
For the year 2012, number range is working fine. But when i call the same number range for the year 2011, instead of throwing an error, the number range
is generated from the interval created for 2012. Year validation is not happening.
Please help me to resolve this issue.
Regards
Anand
2012 May 03 8:58 AM
2012 May 03 10:10 AM
On removing the To year check box, the year option gets removed while creating the Number range interval.
2012 May 03 9:18 AM
Seems to be the standard behavior, SAP look for the first range with year greater or equal to the requested year (so the "TO YEAR" name of the field)
-> Your created range is valid til 2012 so valid for 2012, 2011, 2010, etc. but not for 2013, 2014.
* From include LSNR3F01 / in NUMBER_GET_NEXT FG
select * from nriv where object = p_object
and subobject = p_subobject
and nrrangenr = p_nr_range_nr
and toyear >= p_toyear
order by primary key. "#EC PORTABLE
g_found = yes.
exit.
endselect.
If you want to prohibit 2011 (and previous years) create range for 2011 with no free interval, (set current number equal to maximum number)
Regards,
Raymond
2012 May 03 10:27 AM
Thanks for the reply. As you suggested, problem solved when the previous years was set to the maximum current number. But please do clarify, on whether this is the right way or the only solution to overcome this problem.
2012 May 03 10:39 AM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |