NUMBER_GET_NEXT

Hi i am  using the FM number_get_next.
can u plss tell me waht are the essential things that i need to give to this function module.
like waht should be passed in nr_range_nr
                                            object
quantity
subobjecttoyear
and most importantntly number
do i need to declare something to be passed to number heer

CALL FUNCTION 'NUMBER_GET_NEXT'
                EXPORTING
                  NR_RANGE_NR             =  var
                  OBJECT                        =  'ZGPNO'
                IMPORTING
                  NUMBER                      = GEXNO
                EXCEPTIONS
                  INTERVAL_NOT_FOUND      = 1
                  NUMBER_RANGE_NOT_INTERN = 2
                  OBJEC
                  T_NOT_FOUND        = 3
                  QUANTITY_IS_0           = 4
                  QUANTITY_IS_NOT_1       = 5
                  INTERVAL_OVERFLOW       = 6
                  BUFFER_OVERFLOW         = 7
                  OTHERS                  = 8.
-> Here "var"  is nothing but if u go to transaction SNRO give the  object name(ZGPNO)  and click "number ranges" ,before "from number" and "to number" column u will find a column named "NO" ,VAR is the value we specify there.
-> "GEXNO" IS THE OUTPUT VARIABLE WHERE THE NEXT NUMBER FLOWS AUTOMATICALLY WHEN THE FUNCTION MODULE EXECUTES....
Reward if Usefull
Regards,
V.Balaji

Similar Messages

  • Internal error - NUMBER_GET_NEXT call error while craeating new company address

    Dear Team,
    In solution manager while we going to create company address through tcode SUCOMP and during saving the record error message occur as "Internal error -NUMBER_GET_NEXT call error".
    Please suggest for solution
    Regards,
    Ajay

    Dear Mr. Rafikul,
    There is no ABAP dump but in SM21 there are error message:-
    "Documentation for system log message D0 1 :
    The transaction has been terminated.  This may be caused by a
    termination message from the application (MESSAGE Axxx) or by an
    error detected by the SAP System due to which it makes no sense to
    proceed with the transaction.  The actual reason for the termination
    is indicated by the T100 message and the parameters.
    Additional documentation for message E0                  022
    EDI: Error process code '&' is not available
    &CAUSE&
    A syntax error was identified while processing an inbound
    <DS:GlOS.IDoc>IDoc. There is no entry with the key &v1& in 'Error
    process codes'. However, this process code was determined from the
    table of status values (TEDS1).
    &WHAT_TO_DO&
    Please check the 'Error process codes'.
    IF &DEVICE&='SCREEN'
    <DS:TRAN.WE40>Execute function
    ENDIF
    One document format shows more"
    Now my one of problem solved. When i have go to SU01 and checked in address tab, its work now. Earlier its was not work.May be executed the report Z_OSSNOTE_445575 in system, its should be working. Thanks for your answer.
    But till m facing in SUCOMP for creating company address.
    Regards,
    Ajay Asawa

  • Problem with generating of numbers NUMBER_GET_NEXT

    Hi,
    I need to generate numbers for Project-Id. I've created a number range object (SNRO) NR_PROID (Settings: number length domain: numc10, No. of numbers in buffer: 10) with interval 01: 0000000001 - 9999999999, current number 100.
    I use it in the FM NUMBER_GET_NEXT:
    CALL FUNCTION 'NUMBER_GET_NEXT'
        EXPORTING
          NR_RANGE_NR = '01'
          OBJECT = 'NR_PROID'
          IMPORTING
            NUMBER = PROJID_TEMP
            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.
    But I always get numbers from 0 to 9, and then 0, 1, ...9 again. Each time increases the current number of the object's interval (10 numbers).
    However if I test the FM NUMBER_GET_NEXT with my object NR_PROID (SE37) it works fine.
    Does anybody know, what the reason could be?
    Thank you in advance.
    Irina
    Edited by: Irina Ziegler on Feb 6, 2008 10:08 PM
    Edited by: Irina Ziegler on Feb 6, 2008 10:08 PM

    Hi Irina,
    If you mean the number range is skipping 10 numbers in between runs then its because of the buffering in the number range.
    To avoid the buffer influencing the number range, pass
    'X' to the function module parameter: IGNORE_BUFFER.
    This should resolve the problem.
    Cheers,
    Aditya

  • Function module 'NUMBER_GET_NEXT'

    Hi,
    In the function module 'NUMBER_GET_NEXT' the import parameters obligatory are 'NR_RANGE_NR' and 'OBJECT'. I have a problem with the parameter 'OBJECT' because I don´t know which Object to use. Could you tell me please how can I create a new Object in the table TNRO?
    Thanks in advance.
    Trini.

    Hi Trini,
    Go to SNRO tcode enter a name for the object to be created and there is a create button just press it.
    give subobject as S_CARR_ID ( data element for carrid)
    and CO_RMZHL in the number length domain
    if you want you can select the year flag and % warning.
    then create a simple program to update the SCARR table to have 01, 02 etc as CARRIER ids
    now you maintain the number range values in the same SNRO Tcode
    declare a variable
    data number type nriv-nrlevel
    now you can call your fm NUMBER_GET_NEXT
        object                        =     "here the object you created in SNRO Tcode
      QUANTITY                      = '1'
      SUBOBJECT                     = '"here the CARRIER id just you updated in SCARR table
      TOYEAR                        = '0000' "to year flag if you set it
      IGNORE_BUFFER                 = ' '
    IMPORTING
      NUMBER                        =  number(just you declared above)
      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.
    Best Regards
    Ramchander Rao.K

  • Use of function module : NUMBER_GET_NEXT in BADI TRIP_WEB_NUMBER

    Hi All,
    I am implementing BADI TRIP_WEB_NUMBER and using function module NUMBER_GET_NEXT  to get the next number from a number range when the function module throws an exception how can i pass the exception to the exporting parameter
    of the BADI 'RETURN' which is of table type BAPIRETTAB.
    Do i need to handle exception as below?
    Case sy-subrc
    When '1'
    ls_return- MESSAGE = 'error message 1'
    When 2
    ls_return- MESSAGE = 'error message 2'
    What should i pass in the other fields of ls_return i mean like TYPE,ID,NUMBER etc??

    Hi
    You have to pass the message in the proper structure in the RETURN parameter
    Exampple
          return-type = 'E'.
          return-number = '12'.
          return-message = 'number generation error'
    Regards
    Vijay V

  • Regarding the function module Number_Get_Next

    Hi All,
          We have created one custom transaction. We need to generate one number when we save. The number will be generated using the function module NUMBER_GET_NEXT. How can i capture the number which will be generated.
    When we create Sales Order, the sales order number gets generated and that number will go to the DB Table right.
    Similarly i need to save the number in one custom table which gets generated for my transaction.
    Thanks,
    Ibrahim

    Hi
    The code should be like this:
    IF RANGE_OPEN IS INITIAL.
          CALL FUNCTION 'NUMBER_GET_INFO'
               EXPORTING
                    NR_RANGE_NR        = <Nr range>
                    OBJECT             = <Object range>
               EXCEPTIONS
                    INTERVAL_NOT_FOUND = 1
                    OBJECT_NOT_FOUND   = 2
                    OTHERS             = 3.
          IF SY-SUBRC <> 0.
            MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
          RANGE_OPEN = 'X'.
        ENDIF.
        CHECK RANGE_OPEN = 'X'..
        CALL FUNCTION 'NUMBER_GET_NEXT'
             EXPORTING
                  NR_RANGE_NR             = <Nr range>
                  OBJECT                  = <Object range>
             IMPORTING
                  NUMBER                  = _NUMBER
             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.
    But I don't understand if you need an your own number or the number used for the sales order.
    Max

  • Calling the function NUMBER_GET_NEXT from an XI User Defined Function

    Hi there,
    A number range object has been created on our XI server, called, ZBC_BKSTMT.
    I need to call the function NUMBER_GET_NEXT (standard SAP function for number range objects) with the parameters:
    NR_RANGE_NR = 01
    OBJECT = ZBC_BKSTMT
    Calling the NUMBER_GET_NEXT function will return a unique integer.  However, i need to call it from a User Defined Function because I need to make use of the returned integer in my message mapping.
    Thanks,

    Hello,
    If you have SP13, SAP provides a RFC API which can be called during the mapping. Refer to this document:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/xi-code-samples/xi%20mapping%20lookups%20rfc%20api.pdf
    Also check this weblog :
    /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
    For pre-SP13 systems, refer to this How-To
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/xi-how-to-guides/how%20to%20perform%20sap%20data%20lookups%20within%20xi%20mappings
    ***************Reward points,if found useful

  • VF01  - NUMBER_GET_NEXT

    Dear Guys
    Users are using transaction VF01, while saving it on R/3 4.6 C, transaction is taking 3 to 4 minutes on the function module NUMBER_GET_NEXT to bring the next number.
    Other users also cant process their transaction until the furst user gets completed its transaction.
    Can any body explain this behaviour why NUMBER_GET_NEXT function module is taking so much time while for other object its working fast but for the object RV_BELEG SD Documents its too slow.

    Hey may be that is happening because of multiple accesses. Check in debugging mode where it is getting strucked...
    We cannot tell the reason with our proper diagnosis of the situation for this...
    CHeck the runtime in different times (like when all users are using, in off time like weekends) then come to a conclusion. if it is slow in all the times then we can do something...

  • Issue in FM 'NUMBER_GET_NEXT'

    Hello,
    I am gettin a problem with the FM 'NUMBER_GET_NEXT'.
    In this bit of code;
      CALL 'ThNoGet' ID 'BNRIV'    FIELD BNRIV
                     ID 'NO'       FIELD G_NOIVBUFFER
                     ID 'QUAN'     FIELD P_QUANTITY
                     ID 'PERCENT'  FIELD TNRO-PERCENTAGE
                     ID 'NONRSWAP' FIELD TNRO-NONRSWAP.
    It is returning sy-subrc as 4, can someone tell me what this call statement does and why is the sy-subrc coming as 4 and not 0?
    What can be the possible reasons for this sy-subrc failure?

    Hi,
    I'm also facing a similar problem. The function returns '19' in this case.
      CALL 'ThNoGet' ID 'BNRIV'    FIELD BNRIV
                     ID 'NO'       FIELD G_NOIVBUFFER
                     ID 'QUAN'     FIELD P_QUANTITY
                     ID 'PERCENT'  FIELD TNRO-PERCENTAGE
                     ID 'NONRSWAP' FIELD TNRO-NONRSWAP.
    Could someone please help me out in finding what this return code implies?
    Edited by: Dhanya Karam on Nov 6, 2008 10:41 AM

  • Enhancing NUMBER_GET_NEXT when RETURNCODE is 1

    Hi,
    When NUMBER_GET_NEXT  return '1' we know that critical value reached. This return code set within NUMBER_GET_NEXT  >> PERFORM LOCAL_BUFFER routine.
    Requirement: when ever NUMBER_GET_NEXT returns '1' i have to send a mail to some fixed mail id. Though SAP gives an informatin message, but when in any background job function module NUMBER_GET_NEXT returns '1' , user will not be able to see that message.
    according to my analysis as there is no exit , badi or enhancement. So it is not possible other than changing FM with access key.
    As this FM called every where I have to write only within FM. not outside of this FM.
    Please tell me if it is possible in any other way.
    Regards,
    Manab.

    Hi,
    could you, please, tell how did you manage to create implementation for enhancement spot BADI_NUMBER_GET_NEXT?
    Within this spot there is already existing enhancement implementation WDK_NUMBER_GET_NEXT, but it does not allow to make any changes.
    If I create my own enhancement implementation and when I try to create Badi implementation, it generates the following error message "BAdi is internal SAP; implementation in customer namespace not allowed".

  • How to use function "NUMBER_GET_NEXT"

    hi,all,
           anybody is familar with fuction " NUMBER_GET_NEXT"
    plz give me a hand.
    thanks a lot in advanced
    kevin

    While creating a number range using transaction SNRO, a number object is created. This is the object you mention in the <b>EXPORTING</b> field <b>OBJECT</b>. In the field <b>NR_RANGE_NR</b>, you mention the interval that you have created in the Number Range Object. I cannot put up screens here, but I can tell you the path.
    SNRO>Put object name>Display>Goto(Menu Bar)>Number Ranges-->Intervals and in the table control the first field, No. is put in NR_RANGE_NR.  This is the path in 4.7 SAP version. In 4.6C, I think Intervals comes as soon as you put object name in SNRO Transaction. There are many more fields in the function module, but I suspect that you want the basic functionality.
            CALL FUNCTION 'NUMBER_GET_NEXT'
              EXPORTING
                NR_RANGE_NR             = '01'
                OBJECT                  = 'YPOLLID'
              IMPORTING
                NUMBER                  = LS_NUMBER
              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.
            ENDIF.
    Regards,
    Subramanian V.

  • Doubt on number_get_next

    hi experts,
    i am new to abap ,
    i have a requirement that i want to enter data through screen ,i have used tablecontrol ,
    problem is i have to generate serialno(which is my first column field in tc) automatically(one by one),i have gone through the forum threads and i found i have to use number_get_next fm , i tried to code in pai, it is asking for number range object to be created, i tried , when i tried to save that object i showing message that no value table exist for serialno field. and how should i
    capture the previous enterd value into my fm.
    can any one plz help me with some sample code.
    thanks.

    Hi Babu,
    You could do it this way.
    Suppose you save 100 records a day and next time you want to start from 101 rite?
    so use NUMBER_GET_NEXT function module and give the "OBJECT' parameter in exporting as the DATA ELEMENT of the field which you are updating.
    Hope this helps.
    Regards,
    -Sandeep

  • HI i want to know about The F.M : NUMBER_GET_NEXT

    HI experts.,
    I want to know ,what is the use of the Function Module : NUMBER_GET_NEXT
    what purpose it was used,how it will useful.
    Thanks In Advance ,
    Hitu

    Hi,
    It will generate the next number based on the type of object u pass.
    See the following link for example
    F.M NUMBER_GET_NEXT
    Regards,
    Aparna

  • Object Number range "DEBITOR": NUMBER_GET_NEXT error overlaps

    Hello,
    I have an error with one of the number range belonging to the standard object "DEBITOR".
    When we try to create a customer the system gives a old number already saved for another customer in database KNA1.
    I know that this number range is buffered and we have gaps in number range used but
    Why the system gives number already used?
    For example: we have a rumber range from 5000000 to 5000199 and the last number used is 50000040.
    When you create a new customer and the system runs the standard function NUMBER_GET_NEXT, it assigns the number 50000036.
    Please, could you help me?
    thanks in advance,
    aupalaura
    Edited by: aupalaura0 on Apr 23, 2010 12:17 PM

    Hi,
    Check whether the number ranges in question were initially made external and lateron were made to internal number range assignment.
    Thanks
    Aravind

  • Alphanumeric Document number for Sales order

    Dear Experts,
    I got a requirement, The sales order number after saving the document the SO document number should be SO ( Alphabetic) 00012074 (Numeric) ie. SO00012074,
    The numeric portion will come from the number range assigned for that document and Alphabatic portion should come depending on the transaction code and document type.
    in SAPMV45AFZZ  User-exit
    FORM USEREXIT_NUMBER_RANGE USING US_RANGE_INTERN.
    This exit triggers before call function 'NUMBER_GET_NEXT'  that generates document number for the current document and return to the field vbak-vbeln and finally this is the document number, In the debug mode if I change the number for example 0000012074 to SO00012074 runtime I can get the expected number and also it is saved in the system. But in the real time it is not possible as this coding in not any user-exit.
    So I can't use this user-exit for the to get alphanumeric number in the document.
    FORM USEREXIT_SAVE_DOCUMENT
    This exit triggers after the generation of document number. In this user exit if we change the document number for example 0000012074 to SO00012074, it shows the expected number after saving the sales order but it is not actually saving in the database. Means if we try to open the same SO for example SO00012074 in va02/va03 it is showing
    SD document SO00012074 is not in the database or has been archived but if we try open 0000012074 in va02/va03, we can get the document.
    We can use this user-exit but if we change the value of vbak-vbeln in this user-exit finally it is not saving in the system.
    Can anybody help me how I can achieve the requirement ?

    bro...
    You have got an option to copy the program the standard program into zprogram....
    goto se38 and copy the program into a z program....and in doing so copy everything from the ctandard program ie vaients,documentation and function module etc.
    now change this z program to meet your need....
    both way if you dont make lot of changes you will get same performance with your work done
    regards

Maybe you are looking for

  • Jdialog doesn't show the label text

    Hi can any one plese tell me whats wrong with my code, public JDialog createDialog(){ jl.setText("testing"); jl.setFont(new Font("Luxi Sans", Font.BOLD, 12)); jl.setForeground(Color.BLACK); jl.setBackground(Color.WHITE); JOptionPane pane= new JOption

  • Any tool to recover my Lumia 620 from QHSUSB_DLOAD...

    It seems that Lumia Software Recovery Tool and Windows Phone Recovery Tool does not support recovery from QHSUSB_DLOAD download mode. Is there any way to recover my phone from this mode? I'm almost buying third-party recovery hardware like ATF Box to

  • Read from .txt file and output the content as two arrays

    I am using the contoured move to control the x-y stage. The trajectory datas for x and y axis are generated using my interpolation program and it is stored in a .txt file as two columns. What I want to do is read .txt file and output the content of t

  • Possible to have "sub-templates" in Dreamweaver ?

    Hello, I'm new to website building using dreamweaver, but I purchased a tutorial and I'm really starting to get it, though I have a question, let's say I want to create a website similar to this one : www.franzferdinand.co.uk All pages of that site h

  • Process of initalization of DB into memory for timesten

    Hi Can i know the internal process of initialization of DB into memory in timesten , when a new connection is establishing ? Will timesten create tables and indexes in RAM when first connection is established if the RAM policy is default? want to kno