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: 

Number Range Update Interval is not Working

Former Member
0 Kudos

Hello Guru,

I'm currently working on a Function Module using number ranges.

I used the following function as it was saied in many threads :

NUMBER_RANGE_INTERVAL_UPDATE

and

NUMBER_RANGE_UPDATE_CLOSE

naturally with the number_range_enqueue and *dequeue.

The problem that everytime I got in NUMBER_RANGE_UPDATE_CLOSE an Exception "OBJECT_NOT_INITIALIZED', so I tried to use many others function e.g.

*_OBJECT_INIT, *_UPDATE_INIT but nothing seems to work.

So, maybe is something that I forget to set it in the *INTERVAL_UPDATE but I didn't have any error.

So, I'm with my possibility at the end, anyone has a suggestion

Because the Number Range Object and the FM need to work in many system, I can't handle this by doing the interval update manually.

Best Regards,

Kais

6 REPLIES 6

Former Member
0 Kudos

Instead use FM : 'NUMBER_GET_NEXT'

Thanks,

Adi

0 Kudos

Hello Aditya,

Yes, I know Number_get_next but I need to set the interval firstly.

After that then I'll use number_get_next

Denote that I've two different FM, one act as a adminstrator to set the interval once and the other will use number_get_next to get of course the next number (dynamically on user exit)

Regards,

Kais

0 Kudos

Check whether the


  iv-procind    = 'I'.  " <--- will be I not U

  call function 'NUMBER_RANGE_INTERVAL_UPDATE'
         exporting object          = object
         importing error_occured   = error_occured
                   error           = error
         tables    interval        = iv     "<<<----
                   error_iv        = error_iv
         exceptions object_not_found = 1.

0 Kudos

Hello a®s,

Thanks for your responding.

I still have trouble by the number_get_next.

The interval ist set when I use the transaction but for the number_get_next function it not set.

I already commit the changes with the function number_range_update_close.

Should I use later COMMIT.

Regards,

Kais

Edited by: Kais El Kara on Jan 16, 2009 7:10 PM

0 Kudos

> number_get_next function it not set.

>

There is no need to give COMMIT WORK explicitly. if you are using NUMBER_RANGE_INTERVAL_CLOSE system automatically places the commit and result written to database.

nkr1shna
Contributor
0 Kudos

Hi,

SAP Help says after using FM NUMBER_RANGE_UPDATE_CLOSE, you should unlock the changed number range object. Please also check link below

http://help.sap.com/saphelp_40b/helpdata/en/2a/fa0358493111d182b70000e829fbfe/content.htm

With this function module you write changes which have been made to local memory to the database, with NUMBER_RANGE_GROUP_UPDATE and NUMBER_RANGE_INTERVAL_UPDATE. After calling this function module, you should unlock the changed number range object.

Best REgards,

Krishna