Skip to Content
avatar image
Former Member

SAP Invoice Document Number Ranging

Hi All,

We are facing an issue with Invoice Document Number Range.

The Number Range defined for Logistics invoice document is -> 5105600101 to 5105699999 and the current status is 5105600200.

Our client has raised an issue with the Invoice number range. Client claims "As the invoice number range has reached the last number

5105699999, system started allocating number range from 5105600101. He claims that since the last number has reached, Invoice number ranging has restarted from 5105600101. And the new documents from hence forth are assigned starting from 5105600101, 5105600102....and so on....

But we see that most of the numbers are not used between the interval defined. For ex : 5105600190, 5105600191 are not used or not allocated or unused.

So please help me understand the Invoice number range behavior.

Thanks

Sridevi

Moderator message: do not request urgent help (I removed those words from the subject), it is against the forum rules. We are all volunteers here, if you need urgent help, then contact SAP support. Please read the forum rules: https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement

Edited by: Jürgen L. on Feb 8, 2012 9:29 PM

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

5 Answers

  • Best Answer
    avatar image
    Former Member
    Feb 08, 2012 at 04:39 PM

    Hi, Check your client system for number range used for Logistics invoice document in FBN1 or OBA7 for document type RE which is standard for LIV w.r.t. the Company Code, normally logic of creating number ranges are based on years, like the range will restart with the change of the fiscal year & whereas some numbers are unused as you say that can be due to buffering.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 08, 2012 at 02:53 PM

    Hi,

    From SAP Note;-452127

    Summary

    Symptom

    In the conventional invoice verification (Transaction MR01) a document for which there was an MM view and an FI view was usually created. The document number was determined company code-specifically.

    The Logistics Invoice Verification generates two documents: an MM document and in the standard case an FI document. The MM document number is determined company code-independently in the standard system and the document number of the FI follow-on documents are determined separately and company code-dependently. The document numbers of these documents do not necessarily have to agree with one another.

    Other terms

    RF_BELEG, RE_BELEG, MIRO, MR11, number range, number assignment

    Reason and Prerequisites

    In general, the number ranges for MM documents and FI documents are independent. In Release 4.6C and higher, however, you can make settings so that

    the MM document number is copied to the FI document so that the MM and FI documents have the same number. This is possible for the MM document for both internal and external number assignment. The details are described below under "Case A";

    the MM document number is automatically assigned by the system depending on the company code. This is possible for internal number assignment for the MM document. The details are described below under "Case B".

    Combining both solutions, that is, copying a company-code-dependent MM document number to the FI document, is possible for internal number assignment only. The details are described below under "Case C".

    Solution

    Case A (parallel number assignment MM-FI):

    If you set external number assignment for the number ranges of the document types of financial accounting, the number of the MM document is copied to the leading FI document. That is, the number interval set for the MM document must be contained in the external FI number range.

    Case B (company-code-dependant number assignment MM):

    Below, the required settings are shown using an example with three company codes.

    For the Logistics Invoice Verification create a number range for each company code (Transaction SNUM, object RE_BELEG, 'Number ranges' pushbutton). Example:

    No Year From number To number Current number Ext

    06 9999 6000000000 6999999999 6000000000

    07 9999 7000000000 7999999999 7000000000

    08 9999 8000000000 8999999999 8000000000

    The assignment of the MM number ranges to the company code used can only be effected via a customer enhancement (Transaction CMOD or in the Customizing of invoice verification: 'Develop enhancements for invoice verivication'). The corresponting SAP enhancement is LMR1M003, function module EXIT_SAPLMRME_003 (Include ZXM08U14). You can find sample source code in this note under 'Correction instructions". This source code can be adjusted to the customer's needs, if required. User exit LMR1M003 is only run during internal number assignment.

    In the example, MM number range '06' is later to be assigned to company code '0001', number range '07' to company code '0002' and number range '08' to company code '0003'.

    To avoid gaps in the document number assignment, deactivate the buffering for object RE_BELEG in Transaction SNRO.

    Case C (company-code-dependent and parallel MM-FI number assignment): For this purpose, in addition to the settings described under "B", you need to create one FI number range with the same number range number in all company codes, where the number interval of the associated MM document must be included (Transaction SNUM, object RF_BELEG, button 'Number ranges'). Mark external number assignment. Example:

    Company code 0001:

    No Year From number To number Current number Ext

    11 9999 6000000000 6999999999 X

    Company code 0002:

    No Year From number To number Current number Ext

    11 9999 7000000000 7999999999 X

    Company code 0003:

    No Year From number To number Current number Ext

    11 9999 8000000000 8999999999 X

    Afterwards assign the newly defined number range '11' to all document types that are used in the MM invoice verification, using Transaction OBA7.

    In the case of cross-company code invoices, only one MM document is generated with multiple FI documents (one per company code). To enable this, the external FI number ranges must be large enough to cover all MM number ranges. In the above example, therefore, the FI number ranges would have to be set in each case to the interval 6000000000 - 8999999999.

    Due to the restriction described in "Case B", this scenario is only possible with internal number assignment for the MM document. If the number assignment for the MM document is to be effected externally, the MM number can be copied to the FI document as described in "Case A". The user should make sure, however, that he/she enters a number fitting the corresponding company code. An automatic check as to whether the entered number fits the company code is not possible at this point. Thus, the MM number range should be defined sufficiently large to include the intervals of all FI company codes. Entering a document number that does not fit the number range might lead to an error message during posting.

    Regards

    Kailas Ugale

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 08, 2012 at 03:11 PM

    Hi,

    Refer to the following attached notes for explanation:

    62077 Info: Internal number assignment is not continuous

    193020 Invoice verification: Gaps in number assignment

    175047 Causes for FI document number gaps (RF_BELEG)

    504875 Buffering number ranges

    678501 System stoppage, locks on table NRIV

    Main reason for numbering gaps is buffering. This is also described

    in attached note 62077. If there is buffering set in number range then

    it is not possible to avoid gaps in document numbers. The only way to

    ensure that is to switch buffering off.

    If you turn buffering off the program will go directly to the database

    server for the next document number and not the application servers.

    With this, there would be no gaps in numbering, but performance could

    be slowed. Please carefully review the above notes before deciding to

    switch buffering off.

    Unfortunately without deactivating buffering it is not possible to

    guarantee continuous number range assignment. One workaround to solve

    this problem is described in note 840901.

    Regards,

    Ashwini.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 10, 2012 at 10:40 AM

    Hi All,

    Thank you very much for the support. We are looking into the issue with help of the sap notes suggested.

    Will keep you posted with the status.

    Thanks

    Sridevi

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 09, 2014 at 04:05 PM

    This message was moderated.

    Add comment
    10|10000 characters needed characters exceeded