Mirror Accounting
Introduction
For companies within the same group that share a common chart of accounts, mirror accounting is an effective solution.
Since they utilize the same chart of accounts, the company issuing an invoice can also provide the foundation for procurement accounting in the purchasing company. This procurement accounting can then be used when the purchasing company records the invoice in their accounts payable (AP).
Although mirror accounting can be set up in M3 and the accounting strings for an invoice can be retrieved through CRS399MI (Simulate Accounting String), there is no standard integration available to perform this automatically. This document details the required inputs for CRS399MI from a custom-built integration in order to generate the correct mirror accounting strings for an invoice.
Limitations
Not all accounting types are supported. The specific accounting types that are supported are outlined below.
Settings
The accounting events for mirror accounting are OI21 (Category 1) and OI22 (Category 2) in 'Accounting Rule. Set' (CRS395).
It is permissible to copy a specific OI20 event in (CRS395) to OI21 and OI22. This action duplicates the entire setup, including any exceptions defined in 'Accounting Exception. Open' (CRS396).
Get the mirror accounting string
The API transaction GetOI2Evnts in CRS399MI is designed to use the information available in the invoice BOD to retrieve the mirror accounting strings (OI21 and OI22) for an invoice. The decision on which string to retrieve, if any, is typically determined by a setting related to the customer. For instance, this might be based on the customer group. To access the customer record, you can use CRS610MI (Customer interface).
Countries and state
This section is relevant only if the accounting setup is configured to allow the BSCD, FTCO, or ECAR fields to affect the accounting string.
The 'Base Country' (BSCD), 'From/To Country' (FTCO), and 'State' (ECAR) fields are optional inputs for the GetOI2Evnts transaction. If these three input fields are left blank, their values are retrieved from the corresponding customer order invoice line (OINVOL table) as displayed in 'Invoice. Display Lines' (OIS351). This retrieval requires the full key to the invoice line record to be provided as input data.
For VAT (accounting types 111 and 112), BSCD, FTCO, and ECAR are part of the key to the OINVOL record. Only the VAT code (VTCD) needs to be sent as input for regular invoices. However, summary invoices might contain multiple VAT lines ('Info type' 40) with the same VAT code but different country or state. In this case, you cannot retrieve BSCD, FTCO, and ECAR from the invoice line directly. For such scenarios, use the API transaction LstInvLineByTyp in OIS350MI (Customer Order Invoice Interface) (with input IVTP = 40) to list VAT records and identify the applicable combinations of VAT codes, BSCD, FTCO, and ECAR to send as input to GetOI2Evnts in CRS399MI.
For accounts receivable (accounting type 100), the invoice line fields BSCD, FTCO, and ECAR are always blank. Therefore, the first available record in OINVOL is used instead.
Date
If no 'From Date' (FDAT) is specified, the accounting date from the invoice header is used. If no invoice number is specified, the system date is applied.
Accounting types
For different events, the required input data to retrieve the correct accounting string is listed below. If less input is provided, the result is a simulation. Refer to the Countries and state section regarding the BSCD, FTCO, and ECAR input fields.
- Accounts Receivable (To Pay) – Accounting Type 100: YEA4, EXIN
- VAT Payable – Accounting Types 111 and 112: YEA4, EXIN, VTCD
- Order Charges – Accounting Type 140: YEA4, EXIN, ORNO, DLIX, CRID
- Revenues (Gross Line Amount) – Accounting Type 120: YEA4, EXIN, ORNO, DLIX, PONR, POSX
- Discounts – Accounting Types 131 to 136, 157, and 158: YEA4, EXIN, ORNO, DLIX, PONR, POSX
- Item Charges – Accounting Type 150: YEA4, EXIN, ORNO, DLIX, PONR, POSX, CRID
Discounts
The discount number from the discount model determines which accounting type is used. Discount numbers 1 to 6 correspond to accounting types 131 to 136, while discount numbers 7 and 8 correspond to accounting types 157 and 158. The discount number is not included in the invoice BOD.
- You can use SelLineDiscount in OIS350MI to list the discounts for a line and identify the discount numbers (DIPO).
- You can use GetHeadDiscNo in OIS350MI to retrieve the discount number (DIPO) applied to the order total discount.
Order charges on a summary invoice
For summary invoices, you cannot determine the order number (ORNO) and delivery number (DLIX) for an order charge from the invoice BOD.
To obtain the order and delivery numbers for each charge, use LstInvLineByTyp in OIS350MI with input LTYP = 60.