How a document number is Generated.

Hi,
When I park a document using FV60, how the document number is generated?
I want to know the program name and function(subroutine) which will generate this number.
If any one knows please let me know.
It will be very helpful.
Thank you in advance,
With Regards,
Vimal

Hi Vimal,
Try below logic!!!!!!
Create your number range through transaction (SNRO / SNUM). Over there in the domain level pass the variable (say vbeln) and give your interval.
Now in your report where you want to generate a new document number, use the FM NUMBER_GET_NEXT .
DATA: l_no  TYPE inri-nrrangenr,
            l_obj TYPE inri-object    VALUE 'ZSDIDA'.
   CALL FUNCTION 'NUMBER_GET_NEXT'
     EXPORTING
       nr_range_nr             = l_no
       object                  = l_obj
     IMPORTING
       number                  = g_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.
Over here l_no is the range sl no. & l_obj is the name of range which is created through transaction SNRO/SNUM.
Hope this will help you to resolve the issue & close the thread.
BR,
Vinit

Similar Messages

  • How an SSCC number gets generated

    Hi Gurus,
    I am now learning HUM. Actually I dont have access to client system. I am working on sandbox and I want to know how an SSCC number gets generated. I checked Number range object LE_SSCC. I did not not understand the relevence because in LE_SSCC, current number is 290 and the Internal HU number is 1500. Number range object HU_VEKP is working fine with internal HU Number. The SSCC numbers are incremented some times with 7 and some times with 17. No where I could see the source settings for this.
    I hope that SSCC Number is copied from the box sent by vendor through bar code readear. If that is the case it should be randomly changing. There should not be any fixed increment. What is the guarentee that it is not repeated?
    Please throw some light on SSCC Number generation.

    Hi Nagesh,
    You define the number range in t-code SNRO. You can define an external number range there for you vendor received SSCC numbers. The skipping in the number range can occur baseed upon what is in the number range buffer in SAP. When you log in you are assigned numbers from the number range and when someon else signs in they are assigned numbers from the range. These numbers may not be sequential.
    Regards,
    Steve

  • Document Number Not Generate In FEBA ( Bank Reconciliation)

    Dear All,
    We have configured all the required details for Manual Bank Statement for Bank Reconciliation .
    Steps :
    1 ) Take converted file from Bank
    2 )  Upload that file in Text format into System then system automatically update FF67.
    3)  Go into FEBA , then we got cleared items but we are not able to get Accounting Document Number .
    How we can get Accounting Document Number in FEBA ??
    Regards,
    Kaushal Shah

    Hi,
    Sorry, just today I checked your message.
    Instead of processing BDC, you have to post through FEBA.
    ie. Download the statement with the option Do not post or post online.
    Then process the error lines or all documents through FEBA. Then you can able to see the document number.
    If the posting is done at the background through batch jobs, then there will not be any document number visible through FEBA.
    Let me know if you need any more information.
    Regards,
    Prabha

  • Arbitrary Number Generated before Sales Order Document number is Generated

    I want to know which is the arbitrary number generated before the sales Order Document number is created. In which table the arbitrary number is stored?
    The Exit which triggers the arbitrary number in the transaction VA01?

    Hi
    You get the Arbitrary number throug the FM NUMBER_GET_NEXT.
    interne Nummernvergabe
            data: da_rc like inri-returncode.
            call function 'NUMBER_GET_NEXT'
              exporting
                nr_range_nr = da_numki
                object      = 'RV_BELEG'
              importing
                returncode  = da_rc
                number      = vbak-vbeln.
    And regarding userexit, there is
    perform userexit_number_range using da_numki statement in include MV45AF0B_BELEG_SICHERN.
    Regards
    Raj

  • Problem substituting document number into Assignment field

    We have a requirement to substitute document number and fiscal year into Assignment field when posted to a Sp.GL account (Using FB60). Sort key is substituting doc# and fiscal year into Sp.GL Assignment number. I am trying to use a substitution rule, but it's not working probably because the substitution is being called before document number is generated. Any thoughts or input on this is greatly appreciated.
    Thanks
    Edited by: Chandra Nallam on Jan 29, 2009 3:13 AM

    hi!! guys ,
    Can anybody help me on this BB module of Vistex pl.
    I have one very basic Questions and not getitng the right answer.
    Look at this Business scenario
    1) I have created Billback from Agreement and Invoice and I did accrued this BB like this there are various invocies I accrued thro various agreement and BB combination - I dont see any issues in Config here
    2) now we have got Claim request from the Customer (for the same Partners) now how do I validate what is demanded by customer is same or less or more then the accrual happened thro the BB of Invoice??
    So the issue here is mainly reconciliation of what accrued agains invoice need to be validated here in Claim document so I can take decision.
    so Is this Billback module has got a possibility of reconciling in vistex ???
    Let me know If you or any of your friennd can help me to understand this.
    As you rightly said the document provided by Vistex are really Bad and not much helpful. looking at this i dont see this Product has really helped us much.
    regards,
    Himanshu

  • Fixed Term Deposit - Document Number

    Hi Guys,
    I am a BW consultant and I need to Fixed Term Deposit - Cash Flow Tab - Document Number to BW. I checked the the base table VTBFHAPO and see that some document numbers are present and some are not.
    Strangly the Cash flow tab shows document number, but there are no document numbers in the backend table. I have already tried ST05 to do a check which tables the FTR_DISPLAY tcode hits. I checked all the tables but none of them have document number,
    Can you please suggest how can I link the Fixed Term Deposit to accounting document number.
    Best Regards,
    Shailesh

    Hi,
    The table which you mention is the treasury table in which complete deal data goes. Document number only generates against posted flows. Therefore you can link FD on the basis of Posting status.1 means flagged for posting  but not posted (no document number is against them) 2 means posted (Document no. generated) 3. means flagged for reversal but not reversal entry done 4 means (reversal entry pass).
    You can see this in cash flow type of transaction . USE T Code:- FTR_EDIT and go to cash flow tab and change the layout to posting veiw.
    Regards
    Narinder Pal Verma
    +91-9818882409

  • Material document number or delviery document Number in RG 1 Register

    Hi
    When i am extracting the RG1 register, the system is not capturing  the serial no. for the line Item and there is no reference of any document in RG1, Is there any possiblitity of adding any refernce of delivery document or billing document number
    How to add serial no. and material document number of the delivery made and number in RG1 register
    Suresh

    Dear ,
    You can get the material documents number after carrying out CO11N .Documents number gets generated once you have complted the Auto GR through CO11N.Either you can goto  CO14  or choose Diplay mode -Hit Goods Movement Tab -Select the Good movement overview Line item -Goto enviornment -Diplay Order -Goto Documents Goods Movement (at Order Header ) -Select the Lay out (Total Compoenet List ) , it will diplay both the Documents Number (101 as well as 261) .
    Otherwise , from the same menu ,  you can also select the Enviornemnt - Display Stock -High light the Stock -Select Display Materials Movement from Enviornement .
    However , you can get the collective list from COOIS /COHV/CO46 /MB25 .
    Try and check
    Regards
    JH

  • Question on linkage of idoc with document number created in SAP R/3

    Hi all,
    I have a query related to IDOC.
    When inbound IDOC is posted into SAP R/3 it creates Material document number or billing document number is generated in SAP R/3.
    Question: <b>Do we have interface monitor in SAP R/3 Where I can see the linkage of Idoc number with the document number created in SAP R/3.</b>
    Need your help on this any suggestion will be greatly appreciated.
    Thanks & Regards
    Prabhat

    I'm not sure if this is what you are asking for, but you can look at the IDOC in WE02/WE05 and look at the header segments to get the document number.

  • Document number not available in BSAD Table even after clearing

    Dear Experts,
    with the FM posting_interface_start, posting_interface_clearing, posting_interface_end iam able to post the document with clearing using Tcode f-30/fb05 and can see the document number getting generated and when i see the BSAD table with the same generated document number it say no table entires for that document number BUT is still available in BSID table even after getting cleared. Can any body explain me why the document  is not getting moved from BSID Table to BSAD Table.
    Your inputs will be highly appreciated.
    Regards,
    Jyothsna Reddy

    Hi experts,
    when iam clearing the open item with posting_interface_clearing getting the message like :" Documnet number xxxxx posted in company code xxxx". when i checked that particular document in table bsad it says no table entries for that particular document. iam confused whether my document got cleared or not.
    Thanks
    Jyothsna Reddy
    Edited by: Rob Burbank on Dec 30, 2011 11:56 AM

  • Cost planning document number

    Hi all,
    When  we do cost planning using cj40 . cost plan is updated and system generates one  document number is generated. where to find that document number if we want to see history of cost planning.
    Regards
    shiv

    Hi,
    Try CJI9 if you are using Hierarchical Planning.
    regards
    Sreekanth

  • Billing document number skip

    Dear Sir,
    In some cases Billing document number (VF01) generate, (with reference to delivery number) but at the time create Excise Invoice against same billing document number, system given error "Billing document number does not exit".
    & after that  system will be allowed to create the billing document against same delivery.  please help
    Regards
    BK GAIKWAD

    Suitable suggestion has already been given.  May be you can have a look at the following note which may help you.
    Note 19050 - Gaps in document number sequence for billing docmts
    Alternatively, you can execute report RFVBER00 which explains on document numbering gaps.  Try this report in development before executing in production client.
    G. Lakshmipathi
    ps:- Please spell the name correctly

  • Document Number range autmatically getting updated

    Hi,
    I m in SAP ECC 6.0 and new GL concept is activated. I am posting a document. Document number is generated. But the update error is given. When i saw the document number range status in document number in general ledger view, the document number is updated to further 100 numbers.
    For example:
    Before document was psoted, current document status was 1800000100.
    But after the document was posted, current document status was 1800000200.
    Let me know why SAP is behaving in such a way. The above error is seen only in "Define Document Number Ranges for General Ledger View" and not in "Define Document Number Ranges for Entry View"

    Here is SAP help text on buffering field.
    Buffer flag
    This ID determines whether the number intervals are buffered for assignements and checks.
    Use
    The number interval buffer is in the Shared Memory of the application server. Each buffer is used to store the external number intervals and a certain number (subinterval) of the internal number intervals. If the numbers of an internal number interval are used up, numbers are taken from the database via the number range server. The status of the number interval in the database is increased by the number of numbers fetched to the buffer.
    Dependencies
    When buffering number intervals, gaps may result in number assignment. Buffering is therefore not possible for applications, which require continuous number assignment.
    Try removing the buffer, reset all transaction data (OBR1) and retest postings.  If transaction data cannot be deleted, you should set the current number in SNRO to the most recent document number in BKPF/FAGLFLEXA and retest the postings.

  • "Enter document number error" in BAPI_SALESORDER_CHANGE

    Hi,
    I am trying to change the sales order thorugh BAPI_SALEORDER_CHANGE as follows,
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
    EXPORTING
    salesdocument = <fs_order_alv_aux>-vbeln
    order_header_in = e_bapisdh1
    order_header_inx = e_bapisdh1x
    simulation = p_consol
    TABLES
    return = t_bapi_return
    extensionin = t_bapiparex.
    I am changing only KVGR5 through this BAPI, and I am passing sales documetn number through <fs_order_alv_aux>-vbeln.
    When I check inside BAPI I am able to see SALESDOCUMENT : 0021033932, while debugging further I came to know about following.
    Inside the Function SD_SALES_DOCUMENT_READ. following 2 lines gets executed.
    VBAK-VBELN = DOCUMENT_NUMBER.
    PERFORM BELEG_LESEN(SAPMV45A).
    Here, VBAK-VBELN has a value, but as soon as it goes inside PERFORM BELEG_LESEN(SAPMV45A). VBAK-VBELN value gets cleared and following error has been set inside the perform.
    if vbak-vbeln is initial.
    message e045.
    endif.
    If I manually fill VBAK-VBELN inside this perform then everything works fine.
    I even tried same thing through SE37 by executing this BAPI but in this case it doesnot clear the VBAK-VBELN inside this PERFROM.
    Can anyone help?
    Thank you.

    Hi Pramod,
    it does not look like a conversion error.
    You may try again with SE37, enter debugger at start and set a watchpoint at VBAK-VBELN in function SD_SALES_DOCUMENT_READ, i.e. program SAPLV45A.
    When VBAK-VBELN is set, it will stop at the watchpoint. Check the call stack at this point to find out how the value gets here. Then start your misbehaving program and (I hope so) find out ehere it is going wrong.
    The SD process is heavily penetrated with enhancements for a couple of industry solutions. I do not know your environment so it is hard to say how the document number is passed to function group V45A.
    Regards,
    Clemens

  • Argentina official document number range (Changing of XBLNR)

    Hi All,
    Working on a typical requirement.
    As some of you are aware, the official document number (XBLNR) is getting generated by system based on branch, document type, document class and print character.
    Is there any posibility to change this value before the Accounting document is going to be created(after I press save)?
    Is there any userexits/BADIs/BTEs that will trigger before this official document number is going to be generated, so that I can change XBLNR value?
    Does anybody had encounter such situation? if so please let me know.
    Appreciate your help on this.
    Regards,
    Nanda.

    Please check below function modules (J_1A_OFF_NUMBER_GET, EXIT_SAPLV60B_001)and user exits. In following function module the official document number is generated. Normally you do not change this.
    Function module: J_1A_OFF_NUMBER_GET
    Text
    Official document numbering in Argentina
    Functionality
    This function module determines an Argentine official document number, it is using the input values to determine a numbering subobject for the numbering object J_1AOFFDOC and calls the numbering module NUMBER_GET_NEXT for this object and number range '01'.
    Parameters
    I_BUKRS
    I_SNR
    I_PRTCHR
    I_DOCCLS
    I_DATE
    E_DOCNR
    E_DATE
    E_DATE_ERROR
    E_XBLNR
    Exceptions
    CLASS_NOT_DEFINED
    INPUT_NOT_VALID
    PRTCHR_NOT_FILLED
    DETERM_NOT_POSSIBLE
    ERROR_NUMBER_GET
    Function Group
    J1AN
    J_1A_OFF_NUMBERING
    J_1AFONR
    Short text
    Printing of the last official documents numbers assigned
    Description
    List the last used official document numbers in the sytem for every combination of document class, branch and printing character who are self-issued (relevant for numbering) -for a certain period-
    Requirements
    Assignation of number ranges and numbering groups for self-issued document types
    The period of time where the report looks for the documents have an initial and a final date in the screen:
    u2022     The final date is obligatory field, because is the searching limit.
    u2022     The initial date field it is not obligatory.
    o     When it is not filled, the report looks for the documents in all the historical data until the final date, this can be high-time-consumer.
    o     When the first date is filled the report looks in the interval of time -recommended-.
    The resulting list present considerable changes depending on the date intenval definition
    Output
    The first list contains the following fields:
    u2022     Reference fields: describe where the document come from (document type FI, Delivery and Billing Type SD, Material Movement MM)
    u2022     KeyFields: Document Class, Branch and Printing Character.
    u2022     Result: Last official number or a legend when no document is found.
    The option for to make a variant of the list is available
    By the button SummaryLIST is possible to access a second list with the result information by the unique possible combinations of the KeyFields (Making omission of the reference fields)
    Access to a document: by clicking in the official number.
    Function module J_1A_OFF_NUMBER_CHECK
    No doc available
    'OFF_NUMBER_GLOBAL_NUMBERING'
    CALL FUNCTION 'OFF_NUMBER_GLOBAL_CHECK'
        EXPORTING
          i_fin1_param = fin1_param
          i_bkpf       = bkpf
        EXCEPTIONS
          OTHERS       = 0.
    Display/change official document numbers: transaction J1A6
    Next to substitution (tx OBBH) you can use Program LXVVFU01  User Exit AC Interface (Header Line).
    function module EXIT_SAPLV60B_001:
    FUNCTION EXIT_SAPLV60B_001.
    ""Lokale Schnittstelle:
    *"  IMPORTING
    *"     VALUE(XACCHD) LIKE  ACCHD STRUCTURE  ACCHD
    *"     VALUE(VBRK) LIKE  VBRK STRUCTURE  VBRK
    *"     VALUE(XACCIT) LIKE  ACCIT STRUCTURE  ACCIT
    *"     REFERENCE(DOC_NUMBER) LIKE  VBRK-VBELN OPTIONAL
    *"  EXPORTING
    *"     VALUE(XACCHD) LIKE  ACCHD STRUCTURE  ACCHD
    *"     VALUE(XACCIT) LIKE  ACCIT STRUCTURE  ACCIT
    *"  TABLES
    *"      CVBRP STRUCTURE  VBRPVB OPTIONAL
    *"      CKOMV STRUCTURE  KOMV
      INCLUDE ZXVVFU01.
    ENDFUNCTION.
    Include/ userexit ZXVVFU01 (sample code):
    *for Argentinean legal document numbering the field xblnr should be used for the legal document *number.
      if vbrk-vkorg = 'ARXX'.
        case vbrk-fkart.
          when 'F2  '.
    *factura
            XACCIT-BLART = 'RV'.
    *nota de credita
          when 'GAE '.
          XACCIT-BLART = 'DG'.
          when 'ZGAE'.
          XACCIT-BLART = 'DG'.
                         retorno
          when 'ZR70'.
          XACCIT-BLART = 'DG'.
    *nota de debito
          when 'ZLAE'.
            XACCIT-BLART = 'RV'.
          when 'LAE '.
            XACCIT-BLART = 'RV'.
          when others.
        endcase.
        xaccit-xblnr = xaccit-xblnr+0(16)
      endif.
    Via customizing (cross applications Cross-Application Components / General Application Functions /  Cross-Application Document Numbering ´/  Argentina  ) you can set up the document numbering.
    Hope this helps!

  • Sort key- Sales document number in assignment field-

    Hi,
    Please clarify how sales document number flows in to revenue line item when we release billing document to a/c in VF01/VF02.
    We maintained sort key042(sales order)- FS00 for G/L account .
    But data flowing to few documents only. What is reason?
    Thanks
    Chidambaram

    Hi
    In order to get the value you require in BSEG-ZUONR you need to populate field vbrk-zuonr in the userexit (RV60AFZC:                 
    USEREXIT_FILL_VBRK_VBRP)                                                                               
    In FI documents which are created from SD billing documents the assignment number in the customer line item of the FI document   (BSEG-ZUONR) is filled with the assignment number in the header of the billing document in FORM ACCOUNTING_HEAD_LINE of function module RV_ACCOUNTING_DOCUMENT_CREATE:                                       
    FORM ACCOUNTING_HEAD_LINE. (LV60BF00)                                
      XACCIT-ZUONR = VBRK-ZUONR.               
    Kind Regards
    davide

Maybe you are looking for