Application Development 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: 

Why this function returns 3 and not assign a number?

Former Member
0 Kudos

Hi all,

 call function 'NUMBER_GET_NEXT'
       exporting
            nr_range_nr             = '01'  
            object                  = 'ZSBMDNUM'
       importing
            number                  = ZMM_TR_STR-dosyano
       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
            others                  = 7.

Thanks.

1 ACCEPTED SOLUTION

JozsefSzikszai
Active Contributor
0 Kudos

hi Deniz,

check in table NRIV if object ZSBMDNUM is there (with NRRANGENR = 01)

ec

5 REPLIES 5

JozsefSzikszai
Active Contributor
0 Kudos

hi Deniz,

check in table NRIV if object ZSBMDNUM is there (with NRRANGENR = 01)

ec

0 Kudos

Hi Cartman,

I still get the error that 'Number Range object ZSBMDNUM is not validated.'

I have entered data to the table and run my program using ZSBMDNUM and get another error stated above.

How can I validate table entry?

Thanks all.

0 Kudos

You have to create ranges as well, not just the object. You can do it in SNUM as well.

matt
Active Contributor
0 Kudos

Number ranges can be buffered. If you insist on not having gaps in the range, as is often the case for financial document numbers, then you need to set the number range to not buffered.

matt

Former Member
0 Kudos

Hi,

follow the below procedure for auto number generation.

From SNRO create a custom no. range object. When creating it specify

Short, long text,Number length domain (Ex: NUM5) and Warning % (Ex:

10.0.).

After creating it maintain the intervals by clicking the button

Number Ranges from the 1st screen and in the next screen press

change intervals and then maintain the intervals (From number, To

number, Current no etc.).

Now u can use this no. range object with the FMs, those I mentioned

in my earlier reply.

You can maitain a number range object from tran. SNRO and can

fetch

the next available no. using the FM 'NUMBER_GET_NEXT'.

Also check the FMs below for further operations on number range.

'NUMBER_RANGE_OBJECT_READ',

'NUMBER_RANGE_INTERVAL_LIST'

'NUMBER_RANGE_OBJECT_LIST'

'NUMBER_RANGE_OBJECT_GET_INFO'

Reward if useful,

Thanks,

Sreeram.