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

number range object assignment

Former Member
0 Likes
666

i have created number range object - internal for serial number

also defined the interval

now how do i assigna the number range object to the field of database table SR_NO.

1 ACCEPTED SOLUTION
Read only

Sm1tje
Active Contributor
0 Likes
636

I'm not quite if I understand, but if you have created a number range for the serial numbers (and used the correct Number range object), than you are done. Next time a serial number is created the system will check the next available number and use it from the number range you created.

4 REPLIES 4
Read only

Sm1tje
Active Contributor
0 Likes
637

I'm not quite if I understand, but if you have created a number range for the serial numbers (and used the correct Number range object), than you are done. Next time a serial number is created the system will check the next available number and use it from the number range you created.

Read only

Former Member
0 Likes
636

Hi,

if var is not initial.
              call function 'NUMBER_GET_NEXT'
                exporting
                  nr_range_nr             = '01' 
                  object                  = 'ZGPNO'
                importing
                  number                  = gexno
                exceptions
                  interval_not_found      = 1
                  number_range_not_intern = 2
                  objec
                  t_not_found        = 3
                  quantity_is_0           = 4
                  quantity_is_not_1       = 5
                  interval_overflow       = 6
                  buffer_overflow         = 7
                  others                  = 8.
              if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
              endif.

Rerward if usefull

Read only

0 Likes
636

i have generated new number, no issues.

i am confused what will be the data element and domain for the field SR_NO in my table. how do the system know that the field (SRNO) will be automatically generated by the system..

Read only

Former Member
0 Likes
636

use the FM NUMBER_GET_NEXT

regards

pk