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

Can I generate Number Range Type automatically?

Former Member
0 Likes
1,693

Hi everybody,

is it possible to generate number range automatically, instead of using transaction 'snro'?

Here 'automatically' means to call certain FM.

Thanks in advace!

Regards,

Liying

Hi everybody,

is it possible to generate number range automatically, instead of using transaction 'snro'?

Here 'automatically' means to call certain FM.

Thanks in advace!

Regards,

Liying

10 REPLIES 10
Read only

Former Member
0 Likes
1,522

Hi,

'NUMBER_GET_NEXT' -


Creates Next Number Range for the object

Read only

Former Member
0 Likes
1,522

Yes.

NUMBER_GET_NEXT

rEGARDS,

RAVI

Read only

0 Likes
1,522

No, I mean I want to create a Number Range Object, not the next number.

Read only

Former Member
0 Likes
1,522

Hi,

Unless you create a object in SNRO you cannot use the function module NUMBER_GET_NEXT to get the next serial number. If you are talking about this, an object in SNRO is mandatory and you can use the function in your program to get the next number.

If you want to generate your own serial number, you need to keep track of what was the last number, interval, min and max numbers etc.

Regards,

Ravi

Note : Please mark the helpful answers

Read only

0 Likes
1,522

Yes, I want to generate mein own serial number,

"you need to keep track of what was the last number, interval, min and max numbers etc."

Yes, I want to do this via FM,is this possible?

regards,

Liying

Read only

0 Likes
1,522

Hi,

If you want to do all this by yoruself, then I guess you will have to build your own custom tables as well the code for that.

I don't think there are any functions that SAP Provides for the same.

Regards,

Ravi

Read only

0 Likes
1,522

Hi,

I found FMs:

NUMBER_RANGE_OBJECT_MAINTAIN

NUMBER_RANGE_OBJECT_READ

are they correct ones,somehow?

Regards,

Liying

Read only

0 Likes
1,522

and also

NUMBER_RANGE_OBJECT_INIT

Read only

0 Likes
1,522

The problem is, this function NUMBER_RANGE_OBJECT_MAINTAIN also is capable of maintaining the number range object is a dialog program, so throws the screens where in the user can edit the data of a specific number.

It still doesn't create a number range.

NUMBER_RANGE_OBJECT_READ - just gets you the details of the object.

Look at the documentation, they are very clear

NUMBER_RANGE_OBJECT_INIT - This just intializes the memory of the project.

Regards,

Ravi

Note : Please mark the helpful answers

Message was edited by: Ravikumar Allampallam

Read only

Former Member
0 Likes
1,522

HI,

Create a Number range Object in <b>SNRO</b> t.code.

Use the Function module <b>'NUMBER_GET_NEXT'</b> to get the next number.

  CALL FUNCTION 'NUMBER_GET_NEXT'
    EXPORTING
      nr_range_nr = '01'
      object      = <No range object which you created in SNRO>
    IMPORTING
      number      = <you will get the next no here>.

Thanks

Sudheer