How SAP invoice matching works
SAP invoice matching happens in logistics invoice verification, the MIRO transaction. A 2-way match compares the invoice with the purchase order; an SAP 3-way match also compares it with the goods receipt, so SAP checks the invoiced quantity against what was received and not yet invoiced. Price, quantity and date variances are measured against tolerance keys set in OMR6. Within tolerance, the invoice posts with no block. Above the upper limit, it still posts, but SAP blocks the whole invoice for payment until it is released in MRBR. PostNow.ai posts PO invoices in bulk from Excel through BAPI_INCOMINGINVOICE_CREATE, so SAP applies the same tolerance check as in MIRO, and its Report Library shows which invoices came out blocked and why.
- The PO item decides the match. Its goods receipt indicator makes it 2-way or 3-way, and its GR-based IV indicator ties each invoice line to one specific goods receipt.
- A blocked invoice has posted. It has a document number and waits for release in MRBR; posting it again creates a second liability.
This guide covers the match itself. Posting the invoices from a file is covered in SAP MIRO mass invoice posting, and the whole payables process in SAP accounts payable automation.
Where PostNow.ai fits in SAP invoice matching
PostNow.ai works on both sides of SAP's match: it posts PO invoices through BAPI_INCOMINGINVOICE_CREATE, which applies MIRO's checks, and it reads the PO history, invoices and blocks back into Excel, so AP sees the result per invoice. The match itself, and the decision to block, stays with SAP's own configuration.
| Stage | With PostNow.ai | What SAP does |
|---|---|---|
| Before posting | The GR/IR Reconciliation report lists each PO item's goods receipts and invoices from the PO history (EKBE) with the GR-Based IV flag. With the Document AI module, extracted invoice lines are compared with the PO lines and goods receipts read from SAP, against tolerances you set per company code. | Nothing yet: the PO and goods receipts are the reference documents |
| Posting | A MIRO template on BAPI_INCOMINGINVOICE_CREATE: Simulate sends every invoice to SAP and rolls it back, Run posts and writes the invoice document number to the row | Runs the price, quantity and date checks against the tolerance limits, posts, and sets the blocking reasons |
| After posting | The Blocked Invoices report lists each invoice with its payment block and the item block reasons for price, quantity and date; Invoice Receipts (MIRO) 360 shows every invoice with its status, reference and payment block | Holds blocked invoices out of the payment run |
| Release | The report gives buyers, receiving and AP their list | MRBR releases blocked invoices, automatically or manually |
Operators can run these reports without building anything: they are part of the PostNow.ai Report Library. Designers build and publish the MIRO template once; AP clerks then run their own invoice files through it, each under their own SAP login on their own computer.
OMR6 are what decide the payment block when the invoice posts. Keep the two aligned, and treat SAP's as the authority.2-way vs 3-way match in SAP: what the PO item decides
PostNow.ai's GR/IR Reconciliation report shows the GR-Based IV flag of every PO item, and that matters because SAP does not pick 2-way or 3-way matching per invoice. Two indicators on the purchase order item decide it, and they are proposed when the PO is created: the goods receipt indicator from the item category and account assignment, GR-based IV from the supplier's purchasing data.
| Match | PO item settings | What the invoice quantity is checked against | Typical use |
|---|---|---|---|
| 2-way | Goods receipt indicator (EKPO-WEPOS) not set | The quantity ordered, less what has already been invoiced | Services and items where no receipt is posted |
| 3-way | Goods receipt indicator set, GR-based IV (EKPO-WEBRE) not set | The quantity delivered, less what has already been invoiced, summed per PO item | Stock and consumable materials delivered in one or a few receipts |
| 3-way, GR-based | Goods receipt indicator and GR-based IV both set | Each invoice line against one specific goods receipt; no receipt, no invoice line | Items delivered in many partial deliveries, each invoiced on its own |
Without GR-based IV, MIRO proposes one line per PO item with the total quantity received and not yet invoiced. With it, the invoice can be entered with reference to the delivery note or the goods receipt document, and SAP does not let you post an invoice line before its goods receipt exists (SAP Help: GR-based IV).
The 2-way match is a real gap for goods: with no goods receipt expected, an invoice for the full ordered quantity passes the quantity check even if only part of it arrived (see the example below). That is why physical goods are normally ordered with the goods receipt indicator set.
The three documents in SAP 3-way matching
PostNow.ai reads all three documents into Excel with the Report Library, which is where a mismatch is easiest to explain. In SAP, each document proves something different, and the invoice is paid without a block only when it agrees with the other two within tolerance.
| Document | What it proves | Where it lives in SAP |
|---|---|---|
| Purchase order | What was agreed: item, quantity, net price, price unit and delivery date | Created in ME21N; header EKKO, items EKPO |
| Goods receipt | What arrived, and when | Posted in MIGO against the PO; a material document, recorded in the PO history EKBE with history category E |
| Supplier invoice | What the supplier claims | Entered in MIRO or created through an interface; header RBKP, items RSEG, and an invoice receipt line in the PO history |
The goods receipt and the invoice also meet on the GR/IR clearing account: the receipt credits it, the invoice debits it, and a PO item whose quantities never agree leaves a balance there (see GR/IR clearing below). Purchase orders and goods receipts are loaded in bulk with ME21N mass upload and MIGO goods receipt upload.
How SAP calculates a quantity, price and date variance
PostNow.ai's Blocked Invoices report shows the result of these calculations after a run, as price, quantity and date blocking reasons per item. SAP values each variance in money and compares that amount, or a percentage, with the tolerance limits of the company code.
- Quantity (key
DQ). With a goods receipt expected, SAP multiplies the net order price by quantity invoiced − (total quantity delivered − total quantity invoiced). With no goods receipt expected, it uses the quantity ordered instead of the quantity delivered. The result is checked against the limits ofDQ(OMR6 key documentation, quoted on SAP Community; SAP's logic for MRBR and GR-based IV is in KBA 1933251). - Price (key
PP). A price variance exists when the invoiced price, the invoiced amount divided by the invoiced quantity, differs from the net order price (SAP Help: invoice with variances). - Date (key
ST). The item amount multiplied by the number of days between the invoice entry date and the planned delivery date, compared with the absolute upper limit: an invoice for goods not yet due is held until they are (SAP Learning).
Example: 500 ordered, 480 received, 500 invoiced
A PO item for 500 boxes at 12.00 EUR per box has goods receipts of 480 boxes and nothing invoiced yet. The supplier invoices all 500 at 12.00 EUR.
- MIRO proposes 480, the quantity received and not yet invoiced. The invoice says 500, so the clerk, or the file, enters 500.
- Quantity variance: 12.00 × (500 − (480 − 0)) = 12.00 × 20 = 240.00 EUR. If 240.00 EUR is above the upper limit of
DQ, the invoice posts and SAP blocks it for payment, with a quantity block on that item and the whole invoice held. - No price variance: 6,000.00 / 500 = 12.00, the order price.
- On a 2-way item, the same invoice compares with the 500 ordered: 12.00 × (500 − (500 − 0)) = 0. No variance, no block, and 20 boxes that never arrived would be paid.
- Clearing it: when the last 20 boxes are received, the quantity reason no longer applies and an automatic MRBR run releases the invoice. If they will never come, the supplier sends a credit memo for them.
SAP tolerance keys for invoice matching (OMR6)
PostNow.ai posts through SAP's own invoice verification, so the same tolerance keys decide the blocks on its invoices as on invoices keyed in MIRO. They are maintained per company code in OMR6 (Materials Management → Logistics Invoice Verification → Invoice Block → Set Tolerance Limits), and SAP's invoice verification course groups them by variance type (SAP Learning):
| Key | Variance it limits | What it usually catches |
|---|---|---|
DQ | Quantity variance, valued at the net order price | The supplier billed more than was received (3-way) or ordered (2-way) |
DW | Quantity variance when a goods receipt is expected but the quantity received is zero | Invoices that arrive before receiving has posted anything |
PP | Price variance against the net order price | A new price list, or a stale PO price |
KW, PS | Variance in a condition value; price variance against an estimated PO price | Freight or surcharge conditions; POs with estimated prices |
BR, BW | Percentage variance in the order price quantity (OPUn), invoice before or after the goods receipt | Materials with a variable order price unit, where the invoiced quantity in the price unit does not fit the quantity ordered or received |
ST | Date variance | Invoices entered well before the planned delivery date |
AN, AP | Amount of an item without or with an order reference, when the item amount check is active | Any single line above a review limit |
BD | Small differences in the invoice balance | Rounding; within the limit SAP posts the difference automatically |
LA, LD | Variances against blanket purchase orders | Invoices against framework orders |
VP | Change in the moving average price | A price variance large enough to move the material's valuation |
Each key has lower and upper limits, as an absolute amount, a percentage or both. Within the limits, the invoice posts with no message. Below the lower limit, SAP gives a message and posts without a block. Above the upper limit, SAP gives a message, the invoice can still be posted, and it is blocked for payment automatically; the whole invoice is blocked even if only one item has the variance. To block every variance of a type, set the upper limit to zero with Check limit selected (SAP Learning). SAP's course gives only the groups; the per-key descriptions in the table follow the key texts in OMR6, and the detailed BR, BW and DW behaviour comes from SAP Community explanations, so check the texts and the key documentation in your own system.
Two things are often mixed up with these keys. The FI tolerance groups in OBA3 and OBA4 limit payment differences for customers, vendors and users when open items are cleared; they do not block MIRO invoices. And the message type is a separate setting: M8 081 "Quantity invoiced greater than goods receipt quantity" and M8 082 "Price too high (tolerance limit of & & exceeded)" are warnings in many systems, and SAP Community answers point to OMRM to change them to errors.
Blocking reasons: why SAP blocks an invoice for payment
PostNow.ai's Blocked Invoices report brings each invoice into Excel with its header payment block (RBKP) and the item reasons for price, quantity and date (RSEG-SPGRP, SPGRM, SPGRT), the reason a buyer or receiver has to act on. In SAP, an invoice can be blocked in four ways:
| Block | Where it is set | How it is released |
|---|---|---|
| Variance block (price, quantity, date, quality, order price quantity, item amount) | Per item, automatically, when a variance exceeds its tolerance or a quality inspection is open; an item over the AN/AP limit gets an amount reason when the item amount check is active (OMRH, OMRI) | Automatically in MRBR once every reason has gone, or manually |
| Manual block on an item | By the clerk in MIRO, on the item | In MRBR, selected under Blocked due to variances |
| Manual payment block on the header | By the clerk in the invoice header, or from the payment terms | In MRBR under Manual payment block; not released automatically |
| Stochastic block | At random, for the whole invoice, on invoices with no other reason, by threshold and percentage per company code (OMRF, OMRG) | In MRBR under Stochastically blocked, after the spot check |
Whatever the reason, the effect on payment is the same: SAP sets payment block R in the vendor line of the accounting document, and the payment run skips the invoice (SAP Help: blocking invoices; stochastic block and item amount check: SAP Help, SAP Learning).
Release blocked invoices with MRBR
PostNow.ai gives each owner the list; the release itself is done in SAP with MRBR (Logistics Invoice Verification → Further Processing → Release Blocked Invoices), or the Fiori app for the same job. SAP's course describes the rules (SAP Learning: releasing blocked invoices):
- Pick the blocking procedure. MRBR selects by Blocked due to variances (including manual item blocks), Manual payment block (header blocks and blocks from payment terms) or Stochastically blocked.
- Automatic release works only for variance blocks. SAP checks each reason and deletes the ones that no longer apply: quantity after a further delivery or a credit memo, price after the PO price changes or a subsequent credit arrives, quality after a positive usage decision, date once the delivery date is reached. When no reason is left, the invoice is released. Program
RM08RELEASEruns the same automatic release as a background job. - A manual header block stops automatic release, even when every item reason has gone. Those invoices are released separately; MRBR reports them with
M8 659"& invoices were released, & still contain a manual block". - Manual release has two levels. Deleting the last blocking reason of an invoice and saving releases it. Release invoice releases the whole invoice: it removes the block in the vendor line and leaves the item reasons as they were.
- Protect the cash discount. A blocked invoice can lose its discount days while it waits; MRBR can move the cash discount days on release, and the change shows only in the vendor line of the accounting document.
- Authorizations.
M_RECH_SPGcontrols which blocking reasons a user may delete.
Who resolves which mismatch
| Mismatch | What SAP did | Owner and resolution |
|---|---|---|
| Billed more than received | Quantity block (DQ), invoice posted | Receiving posts the missing goods receipt, or AP gets a credit memo; then MRBR releases it |
| Price above the order | Price block (PP), invoice posted | The buyer confirms: a new agreed price goes on the PO, otherwise the charge is disputed with the supplier |
| No goods receipt yet | GR-based IV: the line cannot be posted. Otherwise DW applies | Receiving posts the receipt in MIGO; then the invoice is entered or released |
| Invoiced before the delivery date | Date block (ST) | The reason lapses on the planned date; an automatic MRBR run releases it |
| Charge with no PO behind it | Nothing to match against | AP queries the supplier; a genuine non-PO charge goes through FB60 |
Parked and blocked invoices: what is the difference
PostNow.ai's Invoice Receipts (MIRO) 360 report lists parked and posted invoices side by side, with the invoice status (RBKP-RBSTAT) and payment block per document, which is the quickest way to see which of the two problems an invoice has. They are different states: a blocked invoice is posted and held from payment, a parked invoice is not posted at all.
| Question | Parked invoice | Blocked invoice |
|---|---|---|
| Posted? | No. Saved for completion or approval; account movements happen only when it is posted | Yes. It has an accounting document and a liability in the vendor account |
| Entered with | MIR7, or saved as parked from MIRO | MIRO or an interface, with a variance above tolerance or a manual block |
Status in RBKP | RBSTAT A "Parked" (KBA 2833967); saved as complete has its own status | Posted status, with the blocking reasons on the items |
| Next step | Complete it, approve it if a release workflow applies, then post it | Resolve the variance, then release in MRBR |
SAP distinguishes three ways of saving an unposted invoice (SAP Help: document parking). Hold saves the current state with minimal checks and no updates. Park records the PO history, the duplicate-invoice check index, open vendor items and a change log. Save as complete also records commitments and controlling documents, and is meant for an invoice whose balance is zero and that is ready to post; release criteria can then send it to an approver by workflow. Substitution and validation run only when the invoice is posted.
Parking is the right tool when someone has to look before the invoice posts: a missing PO reference, a price the buyer has not confirmed, or a company policy that every invoice above a threshold is approved first. For files, PostNow.ai's BAPI directory includes BAPI_INCOMINGINVOICE_PARK ("Park incoming invoice") and BAPI_INCOMINGINVOICE_POST ("Post parked incoming invoice"), so a designer can build a template that parks invoices for review instead of posting them; run Simulate and check the first parked invoices in MIR4 before the whole file. Parked logistics invoices are separate from FI parked documents (FV60), which sit in different tables.
Invoices without a purchase order: no matching to run
PostNow.ai posts non-PO supplier invoices through a separate FB60 template on BAPI_ACC_DOCUMENT_POST, because a non-PO invoice has nothing for SAP to match. FB60 posts the liability straight to G/L accounts and cost objects: no PO price, no goods receipt, no tolerance keys, no variance blocks. Control comes from the people who check it before posting, for example by parking it in FV60 for approval. If a PO exists, post through MIRO even when the amount looks simple; an FB60 posting leaves the PO open for invoicing and the goods receipt uncleared on the GR/IR account. The details are in FB60 mass upload.
GR/IR clearing: what matching leaves behind
PostNow.ai's GR/IR Reconciliation report sums goods receipt and invoice receipt values from the PO history per PO item, so the items whose receipts and invoices never agreed stand out in one sheet. Each goods receipt credits the GR/IR clearing account and each invoice debits it; when the quantities match, the item nets to zero.
When they do not, SAP expects a further goods receipt or invoice to clear the difference. If neither will come, the balance is cleared manually with MR11 (Maintain GR/IR Clearing Account), which posts the quantity difference: to the stock account or a price difference account for moving-average materials, and to a price difference account for standard-price materials (SAP Help: GR/IR clearing account maintenance). Run it for PO items where no further delivery or invoice is expected, usually at period or year end.
Worked example: 3-way matching on 25 invoices in company code 1010
PostNow.ai handles this with the published MIRO template and three Report Library reports. AP in company code 1010 has 25 PO invoices from 7 suppliers to post on 27.11.2026. Tolerances in OMR6 for 1010: PP upper limit 2% and 100.00 EUR, DQ upper limit 50.00 EUR, ST upper limit 10,000.00 (amount × days).
- Check the receipts first. The GR/IR Reconciliation report for the 25 POs shows three items flagged GR-Based IV with their goods receipt documents, so those D rows get the material document, year and item. One GR-based item has no receipt yet; that invoice is held back until receiving posts it.
- Validate and Simulate. Validate flags two cells (a posting date typed as text, a missing tax code), both fixed. Simulate sends the 24 remaining invoices to SAP and rolls every one back; all 24 pass.
- Run. All 24 post, and each H row gets its invoice document number with user, time and system.
- Read the blocks. The Blocked Invoices report for company code 1010 and posting date 27.11.2026 lists three invoices:
- supplier
100045, PO4500001934item 10: price block. The invoice bills 12.60 EUR against a PO price of 12.00 EUR on 400 pieces, 5% and 240.00 EUR over, above bothPPlimits; - supplier
100052, PO4500001951item 20: quantity block. 500 invoiced, 480 received, 20 × 12.00 = 240.00 EUR, above the 50.00 EURDQlimit; - supplier
100061, PO4500001960item 10: date block. 4,000.00 EUR invoiced 9 days before the planned delivery date: 4,000.00 × 9 = 36,000.00, above theSTlimit.
- supplier
- Hand them to their owners. The buyer confirms the new price for
100045and changes the PO price; the next automatic MRBR run deletes the price reason and releases the invoice. Receiving posts the last 20 pieces for100052; MRBR releases that one too. The date block on100061lapses on the delivery date and is released by the scheduledRM08RELEASEjob.
Nothing was posted twice, and none of the three blocked invoices could be paid before its owner had acted or the delivery date had passed.
SAP invoice matching messages and what they mean
PostNow.ai writes SAP's error messages to each failed invoice's row; matching warnings on a posted invoice show up as blocks in the Blocked Invoices report instead. These are the messages that come with matching:
| Message | What it means | What to do |
|---|---|---|
M8 081 / M8 504 Quantity invoiced greater than goods receipt quantity | The invoice quantity is above the quantity received and not yet invoiced (KBA 2527556) | Check whether receiving is behind or the supplier over-billed; as a warning, the invoice can post and is blocked when the variance is above the DQ limit |
M8 082 Price too high (tolerance limit of & & exceeded) / M8 084 Price too low | The invoiced price is outside the PP limits (KBA 3344268) | The buyer confirms the price; correct the PO or dispute the invoice |
M8 215 Maintain tolerance limits for tolerance key & (CoCode &) | A key SAP needs has no limits for this company code | Maintain the key in OMR6 for the company code before the next run |
| "Only fill fields 'ReferenceDocument …' if GR-based IV is active" (supplier invoice API wording) | A goods receipt reference was sent for a PO item without GR-based IV (KBA 3537312) | Leave the receipt columns blank for that item, or set GR-based IV on the PO before the receipt |
M8 659 & invoices were released, & still contain a manual block | MRBR released the variance blocks, but a manual header block remains | Release it in MRBR with the Manual payment block selection |
Checklist: SAP 3-way match settings before invoices go through
PostNow.ai checks the invoice file and reports the blocks; these settings decide how SAP matches, and they are worth confirming once per company code before a go-live or a backlog run.
- Goods-receipt items carry the goods receipt indicator on the PO; 2-way items are a deliberate choice, such as services.
- GR-based IV is set where partial deliveries are invoiced one by one, and the supplier master proposes it where that is the norm.
- Every tolerance key your invoices can hit (
PP,DQ,DW,ST,BDat least) has limits inOMR6for each company code. - Item amount check (
OMRH,OMRI) and stochastic block (OMRF,OMRG) are on only where AP has decided they should be. - The message types for
M8 081andM8 082are known: warning (post and block) or error (reject). - An automatic MRBR run (
RM08RELEASE) is scheduled, so blocks whose reason has gone do not wait for someone to remember them. - The duplicate-invoice check is set up for the suppliers and the route your invoices take (screen, BAPI, EDI or API).
What to plan for in SAP invoice matching
PostNow.ai posts through SAP's invoice verification and reads its results back, so planning comes down to SAP's rules and who acts on them.
- Read blocks after every run. A Run Log line says the invoice posted; the Blocked Invoices report says whether it can be paid. On the first run, compare the report's list with MRBR for the same selection.
- Expect rejects where warnings became errors. If
M8 081orM8 082is an error in your system, SAP rejects those invoices instead of posting them blocked, and the message lands on the row. - Plan your own duplicate check for interface postings. SAP KBA 1859210 describes that logistics invoice verification does not check for duplicate invoices created through BAPI, EDI or API, and KBA 2036775 describes how to enable it. Compare each file with the supplier references in Invoice Receipts (MIRO) 360 until your MM team confirms the check runs.
- Hold GR-based invoices until receiving catches up. A line with no goods receipt cannot post, so sequence the file after the receipts or split it.
Invoice matching in SAP S/4HANA
PostNow.ai uses the same MIRO template and the same reports on S/4HANA, because invoice matching works the same way there: MIRO, MIR7, MRBR, OMR6 tolerance keys and BAPI_INCOMINGINVOICE_CREATE are all in place, and SAP's invoice verification course used above is written for S/4HANA.
- Suppliers are Business Partners. GR-based IV defaults and the duplicate-check flag sit in the supplier role of transaction
BP. - Supplier invoices can also arrive by API.
API_SUPPLIERINVOICE_PROCESS_SRVcreates supplier invoices from external systems (KBA 3439469) and goes through the same matching, including the GR-based IV rule.

