Skip to Content
author's profile photo Former Member
Former Member

Number range

I have created a number range object Z*** .

i want to use this number range object to get new task ID . Can any one please guide me in this regard.

I have find a function module.

CALL FUNCTION 'NUMBER_GET_NEXT'

will it be sufficient?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Dec 04, 2007 at 08:02 AM

    Hi,

    Define the interval ranges and then,create a table with the primary key as the field with same domain or data element, and before saving use this function module to get the current number and insert it in the table.

    regards,

    Santosh Thorat

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 04, 2007 at 08:06 AM

    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.

    Regards

    Anji

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 30, 2008 at 08:55 AM

    Thanks every one

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.