SCN Wiki upgrade to version 6.13 on Tuesday 19.11.2019 - beginning 07:30 am CET

During upgrade process new content will not be transported to new Wiki version

Registration

Dear SAP Community Member,
In order to fully benefit from what the SAP Community has to offer, please register at:
http://scn.sap.com
Thank you,
The SAP Community team.
Skip to end of metadata
Go to start of metadata

In SAP Release 4.6C and above, Logistics Invoice Verification (LIV) replaces conventional invoice verification for invoices related to purchase orders. The document explains how the change in invoice verification methods leads to different MM and FI document numbers, and how to align them. 
  
 

If you are planning to upgrade to SAP Release 4.6C or higher or have done so already, you will be required to use Logistics Invoice Verification (LIV) instead of conventional invoice verification for your purchase order-related invoices.

As of Release 4.6C, SAP has stopped developing new functionality for conventional invoice verification (MR01) and has advised its clients to use LIV (MIRO) instead. You will not notice it, but the change to LIV is also a change in the SAP module used for invoice verification.

Conventional invoice verification was a function within FI. However, LIV is a function within MM. The system therefore creates two documents for invoices in LIV — one MM document and one FI document. In conventional invoice verification, only one FI document was created.

Along with the module change comes a problem that can cause headaches and frustration, especially in your accounts payable (A/P) department. The document numbers of an invoice in MM and FI are not the same! This is a problem, particularly when you need to reverse a posted invoice.

To reverse an invoice posted with LIV, you execute transaction MR8M (cancel invoice document). This transaction requires the invoice document number and the fiscal year as input fields. To get the MM document number, you need to dig into the FI document and get the MM document number from the field Reference key of the document header. In the case of a posted LIV invoice, the reference key field consists of all fields of the MM document — i.e., the first 10 characters of the MM document number followed by the fiscal year.  
Can you image how "happy" your A/P users will be every time they need to reverse an invoice? I'm going to show you how to overcome this document-numbering problem and provide you the customizing steps so that your system has the same document numbers in MM and FI. 
Before going into the customizing settings, you need a technical understanding of the difference in document numbering in MM and FI and how SAP determines the document numbers. MM Document Number vs. FI Document Number

The main difference between an MM and an FI document is the number of key fields of the document. The combination of the key fields makes a document unique. An MM document consists of two key fields, the document number and the fiscal year. On the other hand, an FI document consists of three key fields, the company code, the document number, and the fiscal year (Table 1). From a technical perspective, the MM document numbers are stored in table MKPF and the FI document numbers are in table BKPF.

 

MM document

 

FI document

 

 

Field name

Table field

Field name

Table field

Key field 1

Document number

MKPF-BELNR

Company code

BKPF-BUKRS

Key field 2

Fiscal year

MKPF-GJAHR

Document number

BKPF-BELNR

Key field 3

 

 

Fiscal year

BKPF-GJAHR

Table 1

MM and FI document number key fields

 

 

 

 

 

 

Now let's take a look at how R/3 determines the next available document number. Internally, R/3 looks up the latest document number and adds 1 to the document number field. All other key field values such as company code or fiscal year are supplied by the respective application.

Since the company code field is part of the FI document number key, you can find the same FI document number in different company codes. For example, FI document 1230004567 can be a document within company code 1000 and also a document within company code 2000. The combination of all three key fields makes a document unique, not the document number alone. Let's use this concept and translate it into an LIV invoice-posting example. This example shows you how the MM and FI document numbers can become out of sync.

I'm going to post five invoices in LIV for two different company codes, 1000 and 2000. Both the MM and FI document numbers start with the same number. To make it a little more challenging, I'll even post a cross-company code invoice (invoice 4). I have not shown the fiscal year key field in the invoice-posting example because it is the same for all documents. (See Table 2.)

Invoice

MM document number

FI document company number for code

Result

 

 

1000

2000

 

1

5100000000

5100000000

 

Document numbers are the same

2

5100000001

5100000001

 

Document numbers are the same

3

5100000002

 

5100000000

Document numbers are different

4

5100000003

5100000002

5100000001

Document numbers are different

5

5100000004

5100000003

 

Document numbers are different

Table 2

LIV invoice posting example

 

 

 

 

 

 

For the first two invoices, the MM and FI document numbers are the same. The problem starts once you post the first invoice for a different company code. In this case, the MM and FI document numbers are out of sync.

Document Number Assignments 
SAP gives you customizing options to make both document numbers the same. The solution lies in the number range assignment of the MM and FI document. You need to configure the MM document number assignment as internal and external for the FI documents. (FI documents are set up with external-assigned numbering, while the MM document has internal, or system-generated, numbering.) In this case, the MM document number is passed on to the FI document, which means that the number of the FI document is identical to the MM document.

Because the document number assignment in MM is not company code-specific, in contrast to the FI document, you need to take the following points into consideration before using external document number assignments for FI documents. They have the following effects on your system:  

  • Continuous number assignments for FI documents are not guaranteed, especially if you have more than one company code.
  • The document number ranges in MM and FI have to be the same for all company codes.
  • In Release 4.6C, you need to use internal number assignments for revaluation documents, invoice reduction documents, Evaluated Receipt Settlement (ERS) postings, or reversal documents. There are no restrictions as of SAP Enterprise 4.70.
  • Use a different number range assignment for FI invoice posting (FB60), because FI invoice postings usually use internal number range assignments and the postings originate in FI, not MM.
  • If you use document parking and the number range intervals are fiscal year-dependent, you cannot change the posting date of the document if the fiscal year is different to that determined for the previous posting date. In this case you have to delete the document and re-enter it. There are no restrictions for fiscal year-independent number ranges.  
    What do you do if you have already posted thousands of invoices in your system and the numbers are already different? In this case, you need to find unused number range intervals in MM and FI. Since most companies do not change the SAP standard delivered number ranges during the original implementation, number range interval 52 is usually available in MM and FI.  
    Now let's look at the detailed customizing steps. With the following customizing steps, you can align the MM and FI document numbers going forward only. No fix is available for invoices already posted in your system, since SAP does not allow the change of document numbers.  
    Customizing Steps

I will create a new number range interval 52 for MM and FI documents and assign it to the FI document type and MM transactions. Most companies that have these numbering problems have been using SAP for a couple of years and need to start with unused number range intervals.

The customizing consists of four steps: 
Step 1. Maintain FI document number range. Use transaction OMR4 and go to Number range for document types in FI. Select the company code for which you want to create the new number range interval and click on the change interval button. Insert a new document number range by clicking on the insert interval button on top of the screen. In this example, I created number range interval 52 with the document numbers 5200000000 - 5299999999. Don't forget to set the external number range check box (Ext).

You need to create a new number range interval for every company code you use. 
Step 2. Assign FI number range to FI document types. The second step is to assign the number range created in step 1 to the FI document type for invoices. Again use transaction OMR4 and go to Document type. Double-click on the document type, which you are using for LIV invoices. In my example, I used the SAP standard document type RE. In the number range field, assign the new number range interval 52.  

Note! The document type for reversal documents (Reverse doc. type field) has to be different from the document type in Release 4.6C. This restriction does not apply as of SAP Enterprise.

 
Step 3. Maintain MM document number ranges. Use transaction OMRJ and click on change interval button. Insert a new document number range by clicking on the insert button at the top of the screen. For MM documents, I created number range interval 52 with the document numbers 5200000000 - 5299999999. For the internal number range assignment, do not set the external number range check box (Ext).

Step 4. Update MM number range assignment. The last step is to assign the MM number range to your MM transaction via IMG menu path Materials Management>Logistics Invoice Verification>Incoming Invoice>Number Assignment>Maintain Number Assignments for Logistic Documents>Transaction - Assign Number ranges. Two transactions are available. LIV contains the following two internal transactions that are used for the MM document number determination:  

  • RD: manual invoice entry (MIRO)
  • RS: cancel, reverse invoice (MR8M), evaluated receipt settlement (MRRL), EDI invoice receipt, invoicing plan (MRIS), and revaluation (MRNB).  
    You need to update the number range interval for transaction RD.

LIV Invoice Posting

After changing the customizing of the number ranges, let's take my original example with five invoice postings in LIV and compare the document numbers in MM and FI again (Table 3).

Invoice

MM document number

FI document company

number for code

Result

 

 

 

 

 

 

 

1000

2000

 

 

 

 

 

 

1

5200000000

5200000000

 

Document numbers are the same

 

 

 

 

 

2

5200000001

5200000001

 

Document numbers are the same

 

 

 

 

 

3

5200000002

 

5200000002

Document numbers are the same

 

 

 

 

 

4

5200000003

5200000003

5200000003

Document numbers are the same

 

 

 

 

 

5

5200000004

5200000004

 

Document numbers are the same

 

 

 

 

 

Table 3

LIV invoice posting example

 

 

 

 

 

 

As you can see, both the MM document number and the FI document number are now the same.

  • No labels

3 Comments

  1. Guest

    Hi Experts,

    Need to know " How to change Account document type 'RE' which got created thru MIRO transaction"

    Regards,

    Krishnanand Rai

  2. Guest

    Thanks for the explanation!!. It is a very good documentation.

    Rgds,

  3. Question> ERS  Process is always through Batch Job Runs?