- SAP Community
- Groups
- Interest Groups
- Application Development
- Discussions
- number ranges

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.

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

number ranges

Former Member

Options

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

03-03-2008 9:45 AM

1,049

Hi all

which function module you will use for number ranges?

- SAP Managed Tags:
- ABAP Development

1 ACCEPTED SOLUTION

Former Member

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

03-03-2008 10:02 AM

202

hi,

NUMBER_RANGE_DEQUEUE Number range: Unlock object

NUMBER_RANGE_ELEMENT_LIST Number range: Provide elements for a number range

NUMBER_RANGE_ELEMENT_TEXT_LIST Number range: Number range element texts

NUMBER_RANGE_ENQUEUE Number range: Lock object

NUMBER_RANGE_GROUP_LIST Number range: Provide element and group text

NUMBER_RANGE_GROUP_UPDATE NUmber range: Create, change, delete gr

NUMBER_RANGE_INTERVAL_LIST Number range: Provide number range inte

NUMBER_RANGE_INTERVAL_LOCAL Provides numbe range intervals (local s

NUMBER_RANGE_INTERVAL_UPDATE Number range: Create, change, delete nu

NUMBER_RANGE_INTERVAL_UP_LOCAL Entering, changing and deleting number

NUMBER_RANGE_OBJECT_GET_INFO Number range: Provide information on ob

NUMBER_RANGE_SUBOBJECT_LIST Number range: Provide sub-objects for a

NUMBER_RANGE_SUBOBJ_GET_INFO Number range: Provides information on t

NUMBER_RANGE_UPDATE_CLOSE Number range: Close number range change

NUMBER_RANGE_UPDATE_CLOSE_LOC Saves all number range changes in the d

NUMBER_RANGE_UPDATE_INIT Number range: Initialize number ranges

SNR2 Maintenance of number range objects

NUMBER_RANGE_OBJECT_CLOSE Number range: Close objects on the data

NUMBER_RANGE_OBJECT_DELETE Number range: Delete object and/or its

NUMBER_RANGE_OBJECT_INIT Number range: Inititalize object

NUMBER_RANGE_OBJECT_LIST Number range: Provide objects and objec

NUMBER_RANGE_OBJECT_MAINTAIN Number range: Maintain objects (with di

NUMBER_RANGE_OBJECT_READ Number range: Read object

NUMBER_RANGE_OBJECT_UPDATE Number range: Insert or change object

NUMBER_CHECK Number range: Checks whether number lies in the number interval

NUMBER_GET_BUFFER

NUMBER_GET_INFO Number range: Provides information for a number range number

NUMBER_GET_NEXT NUmber range: Assigns next free number

NUMBER_GET_NEXT_V1 Assigns next free number(s)

The function modules below r used to generate numbers between the number range u give,

QF05 Random number generators

QF05_RANDOM Random number generator

QF05_RANDOM_INTEGER Random (whole) number

Hope this helps u,

Regards,

Arunsri

Edited by: Arunsri on Mar 3, 2008 11:10 AM

- SAP Managed Tags:
- ABAP Development

6 REPLIES 6

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

03-03-2008 9:57 AM

202

HI,

first you have to set the number range using SNRO transaction and in your program use the function module

NUMBER_GET_NEXT to generate the number range

Regards

shibu

Edited by: shibuettickal on Mar 3, 2008 10:57 AM

- SAP Managed Tags:
- ABAP Development

Former Member

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

03-03-2008 10:02 AM

203

hi,

NUMBER_RANGE_DEQUEUE Number range: Unlock object

NUMBER_RANGE_ELEMENT_LIST Number range: Provide elements for a number range

NUMBER_RANGE_ELEMENT_TEXT_LIST Number range: Number range element texts

NUMBER_RANGE_ENQUEUE Number range: Lock object

NUMBER_RANGE_GROUP_LIST Number range: Provide element and group text

NUMBER_RANGE_GROUP_UPDATE NUmber range: Create, change, delete gr

NUMBER_RANGE_INTERVAL_LIST Number range: Provide number range inte

NUMBER_RANGE_INTERVAL_LOCAL Provides numbe range intervals (local s

NUMBER_RANGE_INTERVAL_UPDATE Number range: Create, change, delete nu

NUMBER_RANGE_INTERVAL_UP_LOCAL Entering, changing and deleting number

NUMBER_RANGE_OBJECT_GET_INFO Number range: Provide information on ob

NUMBER_RANGE_SUBOBJECT_LIST Number range: Provide sub-objects for a

NUMBER_RANGE_SUBOBJ_GET_INFO Number range: Provides information on t

NUMBER_RANGE_UPDATE_CLOSE Number range: Close number range change

NUMBER_RANGE_UPDATE_CLOSE_LOC Saves all number range changes in the d

NUMBER_RANGE_UPDATE_INIT Number range: Initialize number ranges

SNR2 Maintenance of number range objects

NUMBER_RANGE_OBJECT_CLOSE Number range: Close objects on the data

NUMBER_RANGE_OBJECT_DELETE Number range: Delete object and/or its

NUMBER_RANGE_OBJECT_INIT Number range: Inititalize object

NUMBER_RANGE_OBJECT_LIST Number range: Provide objects and objec

NUMBER_RANGE_OBJECT_MAINTAIN Number range: Maintain objects (with di

NUMBER_RANGE_OBJECT_READ Number range: Read object

NUMBER_RANGE_OBJECT_UPDATE Number range: Insert or change object

NUMBER_CHECK Number range: Checks whether number lies in the number interval

NUMBER_GET_BUFFER

NUMBER_GET_INFO Number range: Provides information for a number range number

NUMBER_GET_NEXT NUmber range: Assigns next free number

NUMBER_GET_NEXT_V1 Assigns next free number(s)

The function modules below r used to generate numbers between the number range u give,

QF05 Random number generators

QF05_RANDOM Random number generator

QF05_RANDOM_INTEGER Random (whole) number

Hope this helps u,

Regards,

Arunsri

Edited by: Arunsri on Mar 3, 2008 11:10 AM

- SAP Managed Tags:
- ABAP Development

Former Member

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

03-03-2008 10:05 AM

202

hi,

Using the function module NUMBER_RANGE_INFO_GET_ALE will allow you to get the current number .

regards,

sreelakshmi

- SAP Managed Tags:
- ABAP Development

Former Member

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

03-03-2008 10:05 AM

202

Hi,

Create the Number Range Object using SNRO tcode

and define/maintain the number ranges for that object using SNUM tcode

and then use the fun module NUMBER_GET_NEXT in the code to get the next continuous numbers for that field

see the sample code

CALL FUNCTION 'NUMBER_GET_NEXT'

EXPORTING

nr_range_nr = '01'

object = 'ZDOCNUM'

QUANTITY = '1'

SUBOBJECT = ' '

TOYEAR = '0000'

IGNORE_BUFFER = ' '

IMPORTING

number = v_docno

QUANTITY =

RETURNCODE =

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

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.

- SAP Managed Tags:
- ABAP Development

Former Member

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

03-03-2008 10:08 AM

202

hi,

to add to my above.

NUMBER_CHECK

Check if number is within a number range (see tcode SNRO)

NUMBER_GET_INFO

Get info about number range (see tcode SNRO)

regards,

sreelakshmi

- SAP Managed Tags:
- ABAP Development

Former Member

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

03-03-2008 11:05 AM