Quick answer

What SAP invoice OCR does

SAP invoice OCR reads a supplier invoice from a scan or PDF and returns its fields: supplier, invoice number, date, amounts, tax, PO number and line items. OCR in SAP invoice management covers only that reading step. The fields are then matched to an SAP vendor and tax code, checked, and posted through MIRO (PO invoices) or FB60 (no PO).

  • PostNow.ai Document AI reads the whole PDF with an AI model. Each field comes back with a confidence score (header fields also with the text as printed), a person reviews the flagged ones, and the invoice is simulated in SAP before it posts through BAPI_INCOMINGINVOICE_CREATE1 (MIRO) or BAPI_ACC_DOCUMENT_POST (FB60).
  • Reading is not posting. A printed supplier name is not a vendor number and "19%" is not a tax code. That translation is configuration and review work, and it decides whether an OCR'd invoice posts.

This guide covers the reading step and its hand-over to SAP. The full document pipeline (capture, classification, approvals) is in SAP intelligent document processing, and posting invoices from a file is in SAP MIRO mass invoice posting.

What SAP invoice OCR does, and where it stops

PostNow.ai Document AI treats reading and posting as two separate steps, and any invoice OCR project should plan them separately. Text recognition turns pixels into characters. Invoice OCR goes one step further and puts names on them: this string is the invoice number, that one the gross amount. What it returns is the invoice as the supplier printed it, and SAP needs it in SAP's own terms:

What OCR returnsWhat SAP needs before it posts
Supplier name and address as printedA vendor number from the vendor master; for a PO invoice, SAP takes the supplier from the purchase order
A tax rate, such as "VAT 19%"A tax code from your company code's tax procedure, with the tax amount per code
A date in the supplier's format, such as 03.11.2026 or 11/03/2026A document date and a posting date in an open posting period
A PO number, wherever the supplier printed itThe PO number and the PO item each invoice line belongs to
Totals printed on the pageA document that balances: gross amount equal to the net lines plus tax

The left column is the OCR's job; the right column is configuration and review. Plan both, and judge any OCR tool by how it handles the right column too.

How PostNow.ai Document AI reads an invoice and posts it to SAP

PostNow.ai Document AI is a licensed module of the PostNow.ai web portal, switched on per customer account. On its posting screen, an invoice goes from PDF to SAP document number in six steps:

  1. Upload. AP drops the invoice PDF on the posting screen.
  2. Extract. An AI model reads the whole PDF and returns the header (vendor name, vendor tax ID, invoice number, invoice date, currency, PO reference, net and gross amount), every line (description, quantity, unit price, amount, PO item) and the tax lines. Each field carries a confidence from 0 to 1; header fields and tax lines also carry the text as printed. A field that is not on the page comes back empty with confidence 0: the model is instructed never to invent a value.
  3. Route. An invoice with a PO number goes the MIRO way; one without goes the FB60 way.
  4. Review. The reviewer sees the invoice sheet with every field editable. Fields below 0.85 confidence are flagged, and the arithmetic is checked to the cent: lines against net, net plus tax against gross. With vendor lookup switched on, Find in SAP searches the vendor master (LFA1) by name, and the reviewer picks the vendor number.
  5. Simulate in SAP. SAP checks the invoice as it would a real posting and returns its messages; the simulation ends with a rollback instead of a commit.
  6. Post to SAP. PostNow.ai confirms which SAP system, client and user it is connected to, calls the BAPI and commits only when SAP returned no error or abort message. The SAP document number appears on the invoice, and an invoice already being posted cannot be posted a second time.

Configuration decides what the BAPI receives: default company code and document types, a table that turns each tax rate into your tax code, the expense G/L account and cost center for non-PO invoices, and vendor coding rules per supplier. Admins and designers maintain these settings; operators cannot change them. The licence also includes an operations workspace for intake, duplicate flags, approvals and a PO and goods receipt pre-check; SAP intelligent document processing walks through it.

ⓘ
Whose SAP login posts. Every SAP call runs through PostNow.ai on your own computer, with your own SAP login, when you start it. The password is encrypted in your browser for that computer only, so PostNow.ai's server cannot read it.

Template OCR vs AI extraction for supplier invoices

PostNow.ai Document AI uses AI extraction: the model reads the text and the layout of the whole page together and fills one fixed invoice schema, whatever the supplier's layout or language. Template OCR works the other way round. Someone defines, per supplier layout, where each field sits on the page (a zone, an anchor word such as "Invoice No."), and the engine reads those positions. Both read text; they differ in what they need from you and where they break.

SituationAI extraction (PostNow.ai Document AI)Template OCR
Setup per supplierNone; one schema for all suppliersA template per layout, built and tested before that supplier's first invoice
Supplier changes its layoutFields are found by what they mean, not where they sitThe template has to be repaired; until then the fields come back wrong or empty
New or one-off supplierRead like any other invoiceFalls back to manual keying, or a template for one invoice
Line table over two pagesAll lines returned in order, from the whole documentNeeds table rules for page breaks and repeated headers
How you know a value is uncertainConfidence per field, plus the printed text for header fieldsCharacter-level confidence or a failed zone
Main riskA confident wrong value, such as a misread date orderA silently shifted zone after a layout change

Template OCR still suits a small, stable supplier base with fixed layouts. Once the long tail of suppliers grows, template upkeep becomes the work. In either case a person reviews what matters for payment: supplier, invoice number, date and gross amount.

Invoice fields OCR reads, and the SAP field each one fills

PostNow.ai Document AI maps the extracted invoice to SAP's own BAPI fields, and this table is that built-in map: what is read from the invoice, and where it lands in the MIRO BAPI (BAPI_INCOMINGINVOICE_CREATE1) and the FB60 BAPI (BAPI_ACC_DOCUMENT_POST).

Read from the invoiceMIRO (PO invoice)FB60 (non-PO invoice)What to watch
Invoice numberHEADERDATA-REF_DOC_NODOCUMENTHEADER-REF_DOC_NOLands in the reference field (XBLNR), which SAP's duplicate check reads
Invoice dateHEADERDATA-DOC_DATEDOCUMENTHEADER-DOC_DATERead as a date, then sent as YYYYMMDD; day-month order differs by country
Posting dateHEADERDATA-PSTNG_DATEDOCUMENTHEADER-PSTNG_DATENot on the invoice: set at posting, otherwise the invoice date is used
CurrencyHEADERDATA-CURRENCYCURRENCYAMOUNT-CURRENCY on every lineA fallback currency in the settings covers invoices that print only a symbol or nothing
Gross amountHEADERDATA-GROSS_AMOUNTVendor line in CURRENCYAMOUNT-AMT_DOCCUR, negativeMust equal net plus tax; the review checks it to the cent
SupplierFrom the purchase orderACCOUNTPAYABLE-VENDOR_NOA default vendor number, or the one picked with Find in SAP
PO numberITEMDATA-PO_NUMBER on every lineNone: no PO means FB60Its presence decides the route
PO item per lineITEMDATA-PO_ITEMNoneIf the invoice prints no item numbers, lines are taken as 10, 20, 30 in order
Line amountITEMDATA-ITEM_AMOUNT (net)One G/L line each, CURRENCYAMOUNT-AMT_DOCCURLines must add up to the net amount
Line quantityITEMDATA-QUANTITYNot postedDrives SAP's quantity check against the goods receipt
Line descriptionNot postedACCOUNTGL-ITEM_TEXT, first 50 charactersBecomes the line text of the G/L posting
Tax rate and amountTAXDATA-TAX_CODE and TAX_AMOUNTACCOUNTTAX line with its base amountEach printed rate must have a tax code in the settings
Vendor tax IDExtracted and shown for reviewUseful to confirm the right supplier when names are alike

Three values never come from the invoice: the company code and document type (RE for MIRO and KR for FB60 unless you set others) come from the settings, and on FB60 the G/L account and cost center come from a vendor coding rule or the defaults. Tax is passed as an amount per tax code rather than left for SAP to calculate.

From OCR result to MIRO (PO invoices) or FB60 (non-PO invoices)

PostNow.ai Document AI routes each invoice by one fact the extraction reports: whether a PO number is on it. That choice matters more than any single field, because the two postings do different things in SAP:

  • PO invoice: MIRO. The invoice lines refer to PO items, so SAP takes the supplier, G/L account and account assignment from the purchase order, runs the price and quantity checks against the goods receipt, and clears the GR/IR account. Posting the same invoice through FB60 would leave the PO open for invoicing and the GR/IR balance uncleared. Bulk MIRO from a file is covered in SAP MIRO mass invoice posting.
  • Non-PO invoice: FB60. Nothing to match against: the vendor line, one G/L line per invoice line and the tax lines must be complete in the posting itself, and the debits and credits must sum to zero. The G/L coding comes from the vendor coding rule or the defaults. Bulk FB60 from Excel is covered in SAP FB60 mass upload.

Most misroutes are a PO number the supplier printed somewhere unusual, or not at all. In the operations workspace a reviewer can change the classification, and the change is recorded. On the posting screen the reviewer corrects a misread PO number in place, and an invoice on the MIRO route with no PO number is stopped before SAP with "PO reference is required to post via MIRO but is missing".

Checks before an OCR'd invoice posts

PostNow.ai Document AI stops an invoice before it reaches SAP when the extracted data cannot make a valid posting, and names the field to fix. These are the checks on the posting screen and the messages the reviewer sees:

CheckMessage on the posting screen
Lines add up to net"Line items sum to … but net amount is … (Δ …)"
Net plus tax equals gross"Net + tax = … but gross amount is … (Δ …)"
Every tax rate has a tax code"No SAP tax code configured for the 19% rate"
A PO invoice has its PO number"PO reference is required to post via MIRO but is missing"
The vendor is chosen"Vendor lookup is enabled but no SAP vendor was chosen"
Date, gross amount and lines are present"Invoice date is missing", "Gross amount is missing", "Line item 3 has no amount"

Then SAP checks the invoice itself, first in Simulate in SAP and again at posting: vendor, PO item, tax code, posting period, balance, and for PO invoices the price and quantity against the tolerance limits. An invoice above tolerance still posts and is blocked for payment; how that works, and how blocked invoices are released, is in SAP invoice matching.

Duplicate invoices: catch them before SAP

SAP's duplicate check compares the reference (the supplier's invoice number) with earlier invoices: message M8 108 in MIRO, with the criteria set per company code in OMRDC, and F5 117 in FI postings, for vendors with the Check double invoice flag. Both need the invoice number in the reference field, which is why OCR has to read it exactly. Two SAP KBAs matter for any OCR route that posts through an interface: KBA 1859210 describes that logistics invoice verification does not check for duplicates when invoices come in through BAPI, EDI or API (KBA 2036775 describes how to enable it), and KBA 2389365 describes that F5 117 is not raised for documents posted through BAPI_ACC_DOCUMENT_POST.

So the duplicate check belongs in the OCR step. In PostNow.ai Document AI that is the operations workspace: a file whose content has arrived before is flagged as an exact duplicate on intake, and after extraction an invoice with the same invoice number (compared without punctuation and leading zeros), the same vendor, a gross amount within 0.5% and a date within 5 days of an earlier one is flagged as a near-duplicate. Those are the defaults; the tolerances are configurable. An open flag blocks submission until someone decides.

Worked example: a five-line PO invoice from PDF to MIRO

PostNow.ai Document AI takes this invoice from PDF to a posted MIRO document. A supplier invoices company code 1010 against PO 4500001934: invoice number RE-2026-04417, printed date 03.11.2026, five lines, 19% VAT. The settings map 19% to tax code V1; the PP tolerance key for 1010 has an upper limit of 2% and 20.00 EUR.

LinePrinted on the invoiceExtractedLands in ITEMDATA
1Pos. 10, TG-1001 hex bolt M8, 400 PC × 0,45 = 180,00qty 400, amount 180.00, PO item 10PO_ITEM 00010, QUANTITY 400, ITEM_AMOUNT 180.00
2Pos. 20, TG-1002 washer M8, 400 PC × 0,08 = 32,00unit price 0.08, flagged below 0.85 confidencePO_ITEM 00020, ITEM_AMOUNT 32.00
3Pos. 30, TG-1003 bracket, 50 PC × 12,60 = 630,00qty 50, amount 630.00PO_ITEM 00030, ITEM_AMOUNT 630.00
4Pos. 40, TG-1004 cable ties, 20 PAK × 3,90 = 78,00qty 20, amount 78.00PO_ITEM 00040, ITEM_AMOUNT 78.00
5Pos. 50, TG-1005 work gloves, 30 PAA × 4,50 = 135,00qty 30, amount 135.00PO_ITEM 00050, ITEM_AMOUNT 135.00
  1. Header. The model returns invoice date 2026-11-03 next to the printed 03.11.2026, so the reviewer can see it was read as 3 November and not 11 March. Net 1,055.00, VAT 200.45, gross 1,255.45 EUR; PO reference 4500001934, so the invoice is routed to MIRO.
  2. Review. Line 2 is flagged: the reviewer checks 0.08 against the PDF and confirms it. The arithmetic check passes: 180.00 + 32.00 + 630.00 + 78.00 + 135.00 = 1,055.00, and 1,055.00 + 200.45 = 1,255.45. Find in SAP returns supplier 100045 for the printed name.
  3. Mapping. REF_DOC_NO = RE-2026-04417, DOC_DATE = 20261103, GROSS_AMOUNT = 1255.45, CURRENCY = EUR, COMP_CODE = 1010, DOC_TYPE = RE; every line carries PO_NUMBER 4500001934 and tax code V1; TAXDATA holds V1 with 200.45.
  4. Simulate in SAP. SAP checks the invoice against the PO and goods receipt and returns warning M8 082 (price too high) for line 3 but no error; the simulation is rolled back and the reviewer posts.
  5. Post to SAP. SAP posts invoice document 5105602011, and the number appears on the invoice. The warning came from line 3, which bills 12.60 EUR against a PO price of 12.00 EUR: 0.60 × 50 = 30.00 EUR and 5%, above both PP limits. Because M8 082 is a warning in this system, SAP posts the invoice and blocks it for payment; the buyer confirms or disputes the price, and the block is released in MRBR.

Had the supplier printed no item numbers, the five lines would have gone to PO items 10 to 50 in printed order, which is right here and wrong for a supplier who lists items in its own order. For such suppliers, check the PO item of every line in the review.

Scan quality: what makes OCR misread an invoice

PostNow.ai Document AI reads PDFs, and the PDFs that cause the most review work are scans of paper. A PDF the supplier generated from its billing system carries clean text; a scan is a picture of a page, and every flaw in the picture becomes a reading problem. The usual causes, and what to do about them:

ProblemWhat it does to the readFix at the source
Low resolutionSimilar characters blur together: 0 and 8, 1 and 7, comma and full stopScan at 300 dpi or more; the Tesseract OCR documentation names 300 dpi as the level it works best at (Tesseract: improving quality)
Skewed or rotated pagesTable rows drift into each other, so a quantity lands on the wrong lineFeed paper straight; switch on automatic deskew in the scanner software
Stamps, handwriting, highlighterA "received" stamp over the total or a hand-written note over a line hides the printed valueStamp the back or a margin, never the amounts; scan before anyone annotates
Fax and copy-of-a-copyNoise and broken characters across the whole pageAsk the supplier for the original PDF
Several invoices in one fileTwo invoices are read as one, with the wrong totalsOne invoice per PDF; split batch scans before upload
Multi-page line tablesLines are lost or repeated at page breaksKeep all pages of an invoice in one file, in order

The cheapest fix is upstream: ask the suppliers who still post paper to email the PDF their billing system already produces.

When you don't need OCR: e-invoices

PostNow.ai Document AI reads invoices that exist as a page; a structured e-invoice already exists as data, so there is nothing to recognise. An e-invoice carries the fields as XML, either on its own or embedded in a PDF:

  • Pure XML. XRechnung, a German e-invoice format, is an XML file with no page to read (KBA 3532707 lists it as "XRechnung (pure XML)").
  • Hybrid PDF. ZUGFeRD in Germany and Factur-X in France are a readable PDF/A-3 with the XML invoice embedded in the file (PDFlib: ZUGFeRD and Factur-X). Reading the embedded XML is exact; reading the page is not.
  • Networks. Peppol carries e-invoices between registered parties, and EDI connections deliver invoices as messages straight into SAP.

Where suppliers send e-invoices, the data arrives without OCR. On the SAP side, electronic supplier invoices can be received with SAP Document and Reporting Compliance, cloud edition (SAP Help: Receiving Electronic Supplier Invoices); the scope differs by country and release. Every invoice that still arrives as a scan or a plain PDF needs the reading step, and the duplicate check above applies to both routes.

SAP's own invoice OCR options

PostNow.ai Document AI runs alongside your SAP system and posts through BAPIs; SAP also offers its own ways to read invoices. Two of them:

  • SAP Document AI. SAP Document Information Extraction, part of SAP Document AI on SAP Business Technology Platform, captures structured data from business documents such as invoices, using SAP's machine learning models, generative AI or templates. SAP's own learning material advises: "Always validate information extracted using SAP Document AI before using it for critical applications" (SAP Learning).
  • SAP Invoice Management by OpenText. An add-on to SAP ERP 6.0 and SAP S/4HANA that automates the processing of incoming invoices; OpenText calls it Vendor Invoice Management for SAP Solutions (VIM) (SAP Help). OCR capture of paper and PDF invoices is part of its setup.

How SAP Document AI compares with PostNow.ai Document AI stage by stage is in SAP intelligent document processing; the wider payables process, from receipt to payment, is in SAP accounts payable automation.

What to plan for with SAP invoice OCR

PostNow.ai Document AI covers reading, review and posting; these decisions sit with AP and the SAP team before the first invoice goes through.

  • A tax code for every rate your suppliers print. Map each rate once in the settings, including 0% and reduced rates, so no invoice stops on a missing code.
  • The vendor route. Choose between one default vendor number and Find in SAP per invoice; with many suppliers, the lookup is the one that scales.
  • G/L coding for non-PO suppliers. A vendor coding rule per regular supplier (G/L account, cost center, tax code, document type) keeps FB60 postings from falling back to one default account.
  • One purchase order per invoice. The PO number from the invoice header goes on every line, so ask suppliers to invoice each order separately, or post invoices that cover several orders in MIRO.
  • Fields a person always checks. Invoice date, supplier, gross amount and PO number, whatever the confidence: a confident wrong date moves the due date, a confident wrong PO number hits the wrong order.

Frequently asked questions

How does PostNow.ai read supplier invoices into SAP?
PostNow.ai Document AI, a licensed module of the PostNow.ai portal, sends the invoice PDF to an AI model that returns the header, every line and the tax lines, each field with a confidence score, and the header fields with the text as printed. A reviewer checks the flagged fields, the arithmetic is checked to the cent, and the vendor can be looked up in SAP. The invoice is then simulated in SAP and posted through BAPI_INCOMINGINVOICE_CREATE1 for a PO invoice (MIRO) or BAPI_ACC_DOCUMENT_POST for a non-PO invoice (FB60), and the SAP document number appears on the invoice.
What is invoice OCR in SAP?
In SAP invoice management, invoice OCR is the step that reads a supplier invoice from a scan or PDF and turns it into named fields such as supplier, invoice number, date, amounts, tax and PO number. It does not post anything: the fields still have to be matched to an SAP vendor and tax code, checked and posted through MIRO or FB60. The whole chain, from capture to posting, is called intelligent document processing.
Does SAP have its own invoice OCR?
Yes. SAP Document Information Extraction, part of SAP Document AI on SAP Business Technology Platform, extracts data from business documents such as invoices. SAP Invoice Management by OpenText, an add-on to SAP ERP 6.0 and SAP S/4HANA, automates incoming invoice processing and includes OCR capture. Both hand the extracted data to SAP for posting.
What is the difference between template OCR and AI extraction for invoices?
Template OCR reads fields from fixed positions defined per supplier layout, so every new supplier or layout change needs a template built or repaired. AI extraction reads the text and layout together and fills one schema for all suppliers, finding fields by what they mean rather than where they sit. Template OCR fails quietly when a layout shifts; AI extraction can return a confident wrong value, so key fields are always reviewed.
Can OCR read invoice line items for MIRO?
Yes, and a PO invoice needs them: MIRO posts per PO item, with the quantity and net amount of each line. PostNow.ai Document AI extracts every line with description, quantity, unit price, amount and PO item, and maps them to ITEMDATA of BAPI_INCOMINGINVOICE_CREATE1. If the invoice prints no PO item numbers, the lines are taken as items 10, 20, 30 in printed order, so check the item of each line for suppliers who list items in their own order.
Which SAP fields does an OCR'd invoice fill?
The invoice number goes to the reference field REF_DOC_NO (XBLNR), the invoice date to DOC_DATE, currency and gross amount to the header, and each line to a PO item with quantity and net amount in MIRO, or to a G/L line in FB60. Tax rates become tax codes through a table in the settings. Company code, document type and, for non-PO invoices, the G/L account and cost center come from the settings or a vendor coding rule, not from the invoice.
How is a duplicate invoice caught before posting?
SAP checks duplicates by reference with message M8 108 in MIRO and F5 117 in FI, but SAP KBAs 1859210 and 2389365 describe that these checks do not run for invoices posted through a BAPI or another interface. The duplicate check therefore belongs in the OCR step. PostNow.ai Document AI flags them in its operations workspace: exact duplicates on intake and near-duplicates after extraction (same invoice number, same vendor, gross within 0.5% and date within 5 days by default), and an open flag blocks submission.
Do e-invoices need OCR?
No. A structured e-invoice such as XRechnung is XML, and hybrid formats such as ZUGFeRD and Factur-X embed the XML in the PDF, so the fields can be read exactly without recognising text. OCR is needed for invoices that arrive as scans or plain PDFs. Both routes still need the duplicate check, the vendor and tax code mapping and SAP's posting checks.
A professional working in PostNow.ai on a laptop

Book a demo

Post your next supplier invoice from PDF to SAP

Read every field with its confidence, review what is flagged, simulate in SAP, then post to MIRO or FB60 and see the document number.

Request a demo
Book a demo

Bring one SAP process. We show it end to end.

Tell us where to reach you and which process matters. The PostNow.ai team replies by email to arrange the demo.

  1. 01You send the formIt goes straight to the PostNow.ai team.
  2. 02We agree a timeWe reply to your work email to set up the call.
  3. 03You see your own processA process from your own SAP work, shown from start to finish.

Request your demo

Name, work email and company are needed.

Please use your company email address.
What would you like to see?

We use your details only to arrange the demo. See our privacy policy.