2012 Aug 21 8:41 AM
Hi,
I need to generate number range automatically starting from AR00000000 to AR99999999. I tried using SNRO, but char values are not accepted..Please help..
2012 Aug 21 9:32 AM
Hello Sooraj,
Try creating FM , which can give you the number .
internally you can append the chars (AR etc,,).. which you want to keep as part of number.
Thanks
~Raj
Hello Sooraj,
Try creating FM , which can give you the number .
internally you can append the chars (AR etc,,).. which you want to keep as part of number.
Thanks
~Raj
2012 Aug 21 9:32 AM
Hello Sooraj,
Try creating FM , which can give you the number .
internally you can append the chars (AR etc,,).. which you want to keep as part of number.
Thanks
~Raj
2012 Aug 21 9:38 AM
Hi
It's not possible with an alphanumeric range: it has to be numeric only.
So just as Raj says, you can create a numeric range and then you can insert AR
Max
2012 Aug 21 10:19 AM
2012 Aug 21 1:58 PM
hi Sooraj,
try to use the below FM to get the number range
DATA: w_range TYPE inri-nrrangenr VALUE '01',
w_serial_no TYPE nriv-nrlevel.
DATA: return TYPE inri-returncode.
CALL FUNCTION 'NUMBER_GET_NEXT'
EXPORTING
nr_range_nr = w_range
object = 'SBUSPID'
IMPORTING
number = w_serial_no
returncode = return.
IF sy-subrc EQ 0.
** MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
** WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
i hope this helps,
thank you,
kata.
2012 Aug 22 6:53 AM
hi sooraj,
are you sorted if you have any issues get me back.
2012 Sep 06 7:46 AM
Hi Sooraj,
Hope this will help you.
First create number range in SNRO as:
Then in SE38, write the following code:
REPORT ZNRO .
DATA : inv_id TYPE i ,
inv1(6) TYPE c VALUE 'AR' ,
inv2(10) TYPE c ,
invid(20) TYPE c .
CALL FUNCTION 'NUMBER_GET_NEXT'
EXPORTING
nr_range_nr = '1'
object = 'ZNRO'
* QUANTITY = '1'
* SUBOBJECT = ' '
* TOYEAR = '0000'
* IGNORE_BUFFER = ' '
IMPORTING
NUMBER = INV_ID
* QUANTITY =
* RETURNCODE =
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
.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
inv2 = inv_id.
CONCATENATE inv1 inv2 INTO invid.
CONDENSE invid NO-GAPS.
WRITE : invid .
Execute it.
- Regards,
Manish Shankar.
2012 Sep 06 8:27 AM
Hi
you cant create a number range with char in snro, creation of alphanumeric number range is not allowed. try creating with numeric values.
2013 Dec 07 7:58 AM
Hello So0,
You can do it like this
No From number To number ext
2 AR00000000 AR99999999 X
2013 Dec 08 5:28 AM
Manish solution should work for you. If not you need to use external as Junhwan suggested.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |