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

Problem using FM NUMBER_RANGE_INTERVAL_UPDATE

Former Member
0 Likes
2,050

Hello,

I'm trying to create number range using FM NUMBER_RANGE_INTERVAL_UPDATE but it doesn't work.

First I lock my object using FM NUMBER_RANGE_ENQUEUE:

CALL FUNCTION 'NUMBER_RANGE_ENQUEUE'

EXPORTING

OBJECT = lo_object

EXCEPTIONS

FOREIGN_LOCK = 1

OBJECT_NOT_FOUND = 2

SYSTEM_FAILURE = 3

OTHERS = 4

Then I call FM NUMBER_RANGE_INTERVAL_UPDATE:

CALL FUNCTION 'NUMBER_RANGE_INTERVAL_UPDATE'

EXPORTING

OBJECT = lo_object

  • IMPORTING

  • ERROR =

  • ERROR_OCCURED =

  • WARNING_OCCURED =

TABLES

ERROR_IV = lt_intervals_err[]

INTERVAL = lt_intervals

EXCEPTIONS

OBJECT_NOT_FOUND = 1

OTHERS = 2

In my in intervals table (lt_intercals) I set the field PROCIND to 'I' for 'INSERT'.

Then I call the FM NUMBER_RANGE_UPDATE_CLOSE to commit database:

CALL FUNCTION 'NUMBER_RANGE_UPDATE_CLOSE'

EXPORTING

OBJECT = lo_object

EXCEPTIONS

NO_CHANGES_MADE = 1

OBJECT_NOT_INITIALIZED = 2

OTHERS = 3.

When calling this FM I have the exception NO_CHANGES_MADE. I cannot understand why. If I go to the debugging mode I see that internal table XNRIV is empty.

If someone see what the problem is, please tell me.

Thanks,

Joseph.

2 REPLIES 2
Read only

former_member194669
Active Contributor
0 Likes
1,034

May be check the program RSSNR300

a®

Read only

Former Member
0 Likes
1,034

Thanks a®s, your answer was very helpfull. The problem was the overlapping of my number ranges.