Automatic Matching of Batch Supplier Invoices to Purchase Order

This document explains how supplier invoices received in 'Supplier Invoice Batch. Open' (APS450) are matched to goods receipt transactions or purchase orders (POs). The types of invoices that are included in the matching are batch supplier invoices and self-billing invoices.

The invoice matching is automatically performed when you select option 9-'Update to AP ledger' for a single invoice or for a range of invoices using F19 in (APS450/B). The update is also performed from 'Supplier Invoice Batch. Select Operation' (APS455).

Basic Requirements for Invoice Matching

  • Alternative 1 (Invoice matched to goods receipt lines) or 2 (Invoice matched to purchase order header) is selected for the invoice header in the 'Invoice matching' field in (APS450/E).
  • Define whether the invoice should be approved for payment automatically after invoice matching. This is determined by the 'Not approved for payment' field in 'FAM Function. Open Details' (CRS406/F) for FAM function AP50.
  • The program used to write the records to the invoice files must populate the invoice-matching-related fields for the invoice lines (the FAPIBL table). For a list of values, see Invoice matching-related fields in FAPIBL.
  • For each supplier, you must define in 'Supplier. Define Purchase & Financial' (CRS624/F) in the 'Invoice approval condition 1' field whether you can specify the invoice as Invoiced/Goods Not Received during invoice matching.
  • You must define in 'Settings - Accounts Payable' (APS905) what happens in these scenarios:
    • There are no goods receipt transactions found for a purchase order (setting 300)
    • Delivery is not complete for all PO lines (setting 320).
  • Settings for price variances, quantity variances, invoice amount variances, and permitted rounding are defined in 'Settings – Supplier Invoice Match' (APS900).

Invoice matching on invoice line level

Invoice matching on invoice line level is used when the field 'Invoice matching' in (APS450/E) is set to 1.

Matching Priorities

M3 BE is used to create invoice lines based on goods receipts or PO lines using these priorities. If the program cannot use priority 1, priority 2 is selected instead, and so on.

Priority

Comment

1. A specific goods receipt transaction is selected for the receiving number.

Receiving number and receipt type 1 (Standard goods receipt transaction) must exist for the invoice line in 'Supplier Invoice Batch. Open Lines' (APS451/E).

2. All goods receipt transactions for a specific delivery note number are selected.

The delivery note number must exist in (APS451/E).

3. All goods receipts for a specific PO line are selected.

These values must exist in (APS451/E): PO number, PO line, and PO line suffix.

4. If no goods receipt transaction is found, the PO line is selected to create an invoice line of line type 2.

These values must exist in (APS451/E): PO number, PO line, and PO line suffix. Alternative 1, 2, or 3 must be selected in the 'Invoice approval condition 1' field for the supplier in 'Supplier. Define Purchase & Financial' (CRS624/F).

In case of mismatch

In the event of these mismatches in the invoice, the program performs these actions:

Situation

Action

1. An invoice line is matched to several goods receipt transactions but the invoiced quantity and received quantity do not match.

The difference in quantity is stored on the last invoice line in the invoice.

2. The invoice is not approved for payment since not all invoice lines could be matched or because values are missing.

Complete the matching manually in 'Supplier Invoice. Recode' (APS110).

The importance of sequence numbers of line charges

Any line charges (invoice line type 5) that are connected to the PO line in 'Purchase Order. Connect Charges' (PPS215) must have the same sequence number in (APS451/E). M3 treats a line charge without a sequence number or another sequence number as a new, manually added charge. If a line charge is connected to the PO line and it either lacks a sequence number or has a different sequence number in (APS451/E), the line charge is doubled during invoice matching at the invoice line level. The line charge with the incorrect sequence number is added to the line charge connected to the PO line.

If a sequence number is missing, a warning message is displayed when you validate the invoice in (APS455). You can add the sequence number manually.

Invoice matching-related fields in FAPIBL

This table shows the values in the invoice line table (FAPIBL) that are used for matching on the invoice line level.

Field

Description

Mandatory

E6CONO

Company

Yes

E6DIVI

Division

Yes

E6PUNO

PO number

Yes

E6PNLI

PO line number

Note:  If a value is missing in the FAPIBL table, it is automatically retrieved from the PO line table (MPLINE).

Yes

E6PNLS

Sub-number of purchase order line

Note:  If a value is missing in the FAPIBL table, it is automatically retrieved from the PO line table (MPLINE).

Yes

E6REPN

Receiving number

No

E6RELP

Receipt type

No

E6ITNO

Item number

Yes

E6PUUN

PO unit of measure

Yes

E6IVQA

Invoice quantity, unit of measure

Yes

E6GRPR

Invoice price, PO price unit of measure

Yes

E6PPUN

Invoice price unit of measure

Note:  If a value is missing in the FAPIBL table, it is automatically retrieved from the PO line table (MPLINE).

Yes

E6PUCD

PO price quantity

Note:  If a value is missing in the FAPIBL table, it is automatically retrieved from the PO line table (MPLINE).

Yes

E6IVCW

Invoiced catch weight

No

E6DIPC

Invoiced discount

No

E6VTCD

VAT code

Note:  If a value is missing in the FAPIBL table, it is automatically retrieved from the PO line table (MPLINE).

Yes

E6SUDO

Delivery note number

No

Invoice matching on invoice header level

Invoice matching on invoice header level is used when the field 'Invoice matching' in (APS450/E) is set to 2.

Invoice matching on header level is used to select all goods receipts made for the specified PO. If no receipts are made or partially received, PO lines are selected.

This table shows the invoice matching in these scenarios :

Scenario

Comment

1. Goods receipt transactions are found for all PO lines.

Account entries are created for all goods receipts.

2. Goods receipt transactions are found for all or some PO lines but the goods receipt is not complete for all lines.

The PO line is selected instead to create an invoice line of line type 2, provided that these prerequisites are met:

  • Alternative 3 (User is asked whether to select the PO line for lines with missing goods receipts) or 4 (PO lines with missing goods receipts are always selected) is selected for setting 320 in 'Settings - Accounts Payable' (APS905)
  • Alternative 1, 2, or 3 is selected in the 'Invoice approval condition 1' field in (CRS624/F).

If there is only a partial goods receipt for the PO line, two invoice lines are created: One line of type 1 indicating that the line has been matched to a goods receipt line with the received quantity, and one line of type 2 with the remaining quantity.

3. No goods receipt transactions are found.

The PO line is selected to create an invoice line of type 2, provided that these prerequisites are met:

  • Alternative 2 (User is asked whether to select the PO line instead) or 3 (The PO line is automatically selected) was selected in the 300 field in (APS905).
  • Alternative 1, 2, or 3 is selected in the 'Invoice approval condition 1' field in (CRS624/F).

If the delivery note number is specified in (APS450/F) and at the goods receipt in program 'Purchase Order. Receive Goods' (PPS300), or if the receipt is made through 'Supplier Delivery Note. Open' (PPS360), only receipts with a matching delivery note number are selected. This field is useful when partial receipts are made, and partial invoices are received.

This table shows the invoice matching in these scenarios :

Scenario Comment
1. Goods receipt transactions with matching delivery note number are found for all PO lines. Account entries are created for all goods receipts with a matching delivery note number.
2. Goods receipt transactions with matching delivery note number are found for all or some PO lines but the goods receipt is not complete for all lines.
The PO line is selected instead to create an invoice line of line type 2, provided that these prerequisites are met:
  • Alternative 3 (User is asked whether to select the PO line for lines with missing goods receipts) or 4 (PO lines with missing goods receipts are always selected) is selected for setting 320 in 'Settings - Accounts Payable' (APS905)
  • Alternative 1, 2, or 3 is selected in the 'Invoice approval condition 1' field in (CRS624/F).

If there is only a partial goods receipt for the PO line with a matching delivery note number, two invoice lines are created: one line of type 1 (indicating that the line has been matched to a goods receipt line) with the received quantity and one line of type 2 with the remaining quantity.

3. No goods receipt transactions with a matching delivery note number are found. The PO line is selected to create an invoice line of type 2, provided that these prerequisites are met:
  • Alternative 2 (User is asked whether to select the PO line instead) or 3 (The PO line is automatically selected) was selected in the '300' field in (APS905).
  • Alternative 1, 2, or 3 is selected in the 'Invoice approval condition 1' field in (CRS624/F).
Note: 

If the delivery note number has been specified at goods receipt but not in (APS450/f), all receipts are selected.

If the invoice is specified with a delivery note number that has not been specified at goods receipt, then no receipts are selected.

Parameter 410 - Block failed invoice matching on PO header level

By enabling parameter 410-'Block failed inv matching on PO header level' in 'Settings - Accounts Payable' (APS905), 'Invoice matching on PO header level' is managed in a specific manner.

For all scenarios described above, if account entries are created during the matching and there is a variance between the invoice lines and the total invoice amount, all invoice lines are approved, provided that the variance is within the limits defined for sorting order 3 in 'Settings - Supplier Invoice Matching' (APS900). If the variance is approved, it is booked based on accounting rule PP20-240 or distributed to the invoice lines. In the latter case, it is booked as a normal price variance. If the variance is not approved, it is booked on a clearing account to be matched manually in (APS110). If parameter 'Block failed inv matching on PO header level' is enabled in (APS905), the invoice is not transferred to 'Accounts payable'. Instead, the invoice status is updated to 'Invoice matching failed'.

In some situations, when working with supplier invoices in ''Supplier Invoice Batch. Open' (APS450) you must first perform invoice matching on PO header level, and if the invoice matching is successful, the invoice is transferred to 'Accounts Payable'. If the supplier invoice matching fails, it is in some situations necessary to hold the invoice and transfer the supplier invoice lines to (APS450) and perform a more detailed invoice matching.

Select from these alternatives:

0: No

1: Yes

2: Inventory items

If alternative 0 is selected, the invoice is always transferred to 'Accounts Payable' and accounted on the clearing account if the supplier invoice amount is outside the tolerance limits defined in 'Settings – Supplier Invoice Match' (APS900).

If alternative 1 is selected, and the supplier invoice amount is outside the tolerance limits defined in (APS900), the 'Invoice status' is updated to 79-'Invoice matching failed' in (APS450).

If alternative 2 is selected, and the supplier invoice amount is outside the tolerance limits defined in (APS900), the 'Invoice status' is updated to 79-'Invoice matching failed' if the purchase order contains at least one line for an inventory item. If the purchase order only contains non-inventory lines, the invoice is transferred to 'Accounts Payable'.

Purchase order lines with one of these characteristics are considered as non-inventory items:

  • The origin of the purchase order line is 24 (Customer order, direct delivery)
  • The origin of the purchase order line is 35 (Rental agreement) and Purchase order category is 80-'Loan'
  • The origin of the purchase order line is 36 (Rental agreement, direct delivery)
  • The item is a non-inventory item, as defined in 'Item. Open' (MMS001)
Note: When the supplier invoice matching fails, you can add a new invoice header and perform invoice matching on the line level instead. You cannot process supplier invoices in status 79-'Invoice matching failed' automatically, and you should delete it manually in (APS450) or by using 'Supplier Invoice Batch. Select Operation' (APS455) or by using API transaction ‘DltInvoice’ in ‘Supplier Invoice. Batch’ – (APS450MI).