What SAP intelligent document processing does
Intelligent document processing (IDP) in SAP reads a business document, decides what kind of document it is, extracts its fields with a confidence score, checks them against rules and SAP data, and has a person confirm what is uncertain before anything posts. PostNow.ai Document AI does this for supplier invoices in two places: its operations workspace extracts every field with a confidence score, flags duplicates and takes the invoice through review and approval to Ready for posting; its posting screen simulates a reviewed invoice in SAP and posts it through BAPI_INCOMINGINVOICE_CREATE1 (MIRO) or BAPI_ACC_DOCUMENT_POST (FB60).
- Confidence points the reviewer at a field. It is the model's own estimate, so it decides where a person looks first, not whether the value is right.
- Catch duplicates before SAP does. SAP KBA 1859210 describes that logistics invoice verification does not run its duplicate check for invoices created through BAPI, EDI or API, so the IDP step has to; in PostNow.ai Document AI that is the operations workspace.
This page covers the whole IDP chain for SAP, from the PDF that arrives to the document number SAP returns. The text-recognition layer on its own is covered in SAP invoice OCR, price and quantity matching in SAP invoice matching, and the wider payables process in SAP accounts payable automation.
How PostNow.ai Document AI takes a document into SAP
PostNow.ai Document AI is a licensed module of the PostNow.ai web portal, switched on per customer account. Licensed accounts see a Document AI menu with three entries: Operations for the daily invoice work, Configuration for the rules, and New document type for documents other than invoices. The operations workspace takes an invoice from intake to Ready for posting:
- Capture. AP uploads invoice PDFs in the portal, or another system sends them to the ingest API with its own client ID and secret. Each file is checked for type and size, and a file whose content has been received before is flagged as an exact duplicate, never silently dropped.
- 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 comes with a confidence score and 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.
- Classify. An invoice with a PO number is routed as PO-based, toward MIRO; one without is non-PO, toward FB60. Suppliers you list as PO vendors turn a missing PO number into an exception instead of a non-PO posting. A reviewer can change the classification, and the change is recorded.
- Check for near-duplicates. 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. Those are the defaults; the tolerances are configurable. An open duplicate flag blocks submission until someone marks it a duplicate or not.
- Verify. The reviewer sees the original PDF beside the extracted fields. Each field shows its confidence, coloured high (90% and above), medium (70% and above) or low, and every correction is stored with the old and new value.
- Approve. Approval rules match on PO or non-PO, company code and gross amount, and the first matching rule decides the steps. Out of the box every invoice needs one admin approval. A non-PO rule is saved with at least two steps, and a person who edited the fields cannot be the only approver.
- Match PO invoices. For a PO invoice, PostNow.ai reads the purchase order (
EKKO/EKPO) and its goods receipt history (EKBE) from SAP and compares each line against your price and quantity tolerances per company code, with an absolute cap on price differences. Each line ends as matched, price variance, quantity variance or no goods receipt.
Posting runs on the Document AI posting screen, which has its own upload, extraction and field review. A reviewed document is simulated in SAP from there: SAP checks it as it would a real posting, and the simulation ends with a rollback instead of a commit. On Post, PostNow.ai checks again 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 then appears on the document, and a document that is already being posted cannot be posted a second time.
The five stages of SAP intelligent document processing
PostNow.ai Document AI covers all five stages that any SAP intelligent document processing setup has to cover. What changes between products is who does each stage and where the result lands:
| Stage | In PostNow.ai Document AI | The decision you make |
|---|---|---|
| Capture | Upload in the portal or the ingest API; file type and size checked; exact duplicates flagged on arrival | Which mailbox, scanner or system feeds the documents, and who owns that feed |
| Classification | PO-based or non-PO from the content; PO-vendor list; your own document types chosen at upload | Which suppliers always invoice against a PO, and what happens when one does not |
| Extraction | Header, lines and tax lines from the whole PDF, each field with a confidence score and the printed text | Which fields SAP needs, and which ones a person always checks whatever the score |
| Validation | Near-duplicate check, side-by-side verification, approval rules, PO and goods receipt match against your tolerances | Approval amounts per company code, tolerances, who resolves duplicate flags |
| Posting | On the posting screen: Simulate in SAP, then post through BAPI_INCOMINGINVOICE_CREATE1 or BAPI_ACC_DOCUMENT_POST; document number shown | Default company code, document types, G/L coding for non-PO invoices, tax code per rate |

OCR versus IDP
PostNow.ai Document AI sends the whole PDF to an AI model that reads the text and the layout together, so there is no per-supplier template to build or repair. That is the practical line between OCR and IDP:
| IDP (PostNow.ai Document AI) | OCR on its own | |
|---|---|---|
| Output | Named fields (invoice number, gross amount, PO item) with a confidence each | The characters on the page |
| A new supplier layout | Read from what the fields mean, not where they sit | Needs a zone or template for that layout |
| Checks | Duplicates, required fields, totals, approvals, PO and goods receipt match | None; another tool does them |
| Into SAP | Mapped to BAPI fields and posted after review | Text that someone still keys or maps |
Text recognition still sits underneath IDP: a scanned page has to become text before its fields can be named, whether a separate OCR engine or the AI model itself reads it. How the recognition layer works for invoices, and how to judge it, is in SAP invoice OCR.
Document classification: which document, which SAP route
PostNow.ai Document AI classifies an invoice by what it contains, because the class decides the SAP transaction. An invoice with a PO number goes the MIRO way; one without goes the FB60 way. Getting this wrong is expensive: a PO invoice posted through FB60 leaves the purchase order open for invoicing and the goods receipt uncleared on the GR/IR account.
- The content wins over the channel. A channel can be marked "always PO" or "always non-PO", but when the content contradicts that hint, the document goes to Verification instead of being forced through.
- PO vendors are an exception, not non-PO. If a supplier on your PO-vendor list sends an invoice with no PO number, the invoice stops for a person. Most of these turn out to be a PO number printed somewhere unusual, or a supplier who has to be asked for it.
- Your own types are picked at upload. On the posting screen, the uploader chooses the built-in invoice or a document type your designer defined, and that type's schema drives the extraction.
Extraction and confidence scores
PostNow.ai Document AI extracts header fields, every line and the tax lines in one pass, and keeps the printed text next to each value, so a reviewer can see that "09/10/2026" became 9 October and not 10 September. Line items matter as much as the header: a MIRO posting needs PO item, quantity and amount per line, and a three-way match is only as good as the lines it compares.
A confidence score is the model's own estimate of how sure it is, from 0 to 1. Use it to rank where a reviewer looks, not as proof. The posting screen marks any field below 0.85 for review and checks the arithmetic of the invoice itself (lines against net, net plus tax against gross, to the cent). SAP gives the same advice for its own service: its learning material says to validate extracted information before using it in critical applications.
Human-in-the-loop review and approvals
PostNow.ai Document AI puts a person between extraction and SAP on every document, and records what that person did. Human-in-the-loop here means three separate controls, each with its own owner:
| Control | What PostNow.ai Document AI does | What it protects against |
|---|---|---|
| Verification | PDF beside the fields, confidence per field, corrections stored with old and new value; vendor, invoice number and gross amount must be filled before the invoice can be submitted | A misread field reaching SAP unseen |
| Duplicate resolution | Exact and near-duplicate flags; an open flag blocks submission until someone decides | Paying the same invoice twice when it arrives by mail and as a scan |
| Approval | Rules by PO or non-PO, company code and amount; steps by role or named user, with a response time in hours; at least two steps for non-PO rules | One person keying, approving and posting their own invoice |
| Segregation of duties | A user who edited the fields cannot be the sole or final approver | An approver signing off their own corrections |
Every event on a document (received, extracted, classified, field edited, duplicate resolved, approved) goes into an append-only log in which each entry is chained to the previous one by a SHA-256 hash, and the chain can be verified on demand. That gives an auditor the answer to "who changed this amount, and who approved it afterwards" without anyone reconstructing it from emails.
Validation against SAP data: vendor, PO and goods receipt
PostNow.ai Document AI checks extracted data against SAP itself, read through PostNow.ai on your computer, at three points:
- Vendor. On the posting screen the vendor name is searched in the SAP vendor master (
LFA1), so the posting carries a real vendor number instead of a printed name. - PO and goods receipt. In the operations workspace, the match reads the order lines and the receipts, nets out reversed receipts and honours the price unit of the PO line, so a price per 100 pieces is not read as a price per piece. The verdict tells the reviewer what SAP will see; the full design of tolerances and blocks is in SAP invoice matching.
- SAP's own checks, in Simulate. Balance, tax, PO item, posting period and SAP's tolerance limits are checked by SAP when the invoice is simulated, exactly as they will be at posting. A variance above tolerance still posts the invoice, blocked for payment, as described in SAP MIRO mass invoice posting.
One SAP behaviour shapes the review loop. SAP KBA 3659235 describes that BAPI_INCOMINGINVOICE_CREATE1 returns errors one line item at a time, starting with the first, unlike MIRO. After you fix the message on line 1, the next Simulate can show one for line 2, so expect more than one round on a long invoice.
Posting extracted data to SAP: BAPIs, mapping and the document number
PostNow.ai Document AI posts through SAP's own BAPIs, chosen by the class of the document:
| Document | SAP route | BAPI | Where the coding comes from |
|---|---|---|---|
| Supplier invoice with a PO | MIRO (logistics invoice verification) | BAPI_INCOMINGINVOICE_CREATE1 | The purchase order; the invoice lines refer to its items |
| Supplier invoice without a PO | FB60 (vendor invoice in FI) | BAPI_ACC_DOCUMENT_POST | A vendor line plus a G/L line, with G/L account, cost center and tax code from a coding rule for that vendor or from your defaults |
| Your own document type | The BAPI your designer picked | Found by name in your SAP system | The field mapping of that document type |
Configuration decides every field the BAPI receives. Each SAP field takes its value from the document (File), a constant (Fixed), a system value (Dynamic: $SAP_USER, $SAP_DATE, $SAP_TIME, $SAP_CLIENT, $SAP_SYSID) or nothing (Skip), with optional trimming, upper case, leading zeros, date format and a default. A tax-rate table turns the 19% printed on the invoice into your tax code, and vendor coding rules give each non-PO supplier its own G/L account, cost center, tax code and document type. Admins and designers maintain these settings; operators cannot change them.
After a clean post, PostNow.ai reads the SAP document number from the BAPI's answer (INVOICEDOCNUMBER for MIRO, the object key for FB60, or the success message) and shows it on the document. If SAP committed but the number could not be read, the document still counts as posted, so nobody posts it again.
SAP document automation in S/4HANA and ECC
PostNow.ai Document AI reaches SAP through BAPIs over RFC, so SAP document automation works wherever those BAPIs exist. Both of the invoice BAPIs do in SAP ERP (ECC) and in SAP S/4HANA: SAP's KBAs on BAPI_INCOMINGINVOICE_CREATE1 (3659235) and on the accounting BAPIs (3325182, the central KBA for BAPI_ACC_DOCUMENT_POST and its siblings) are filed for both product lines.
- Same posting, different release. The fields you map stay the same; check new mandatory fields or custom fields with your SAP team in SE37 or the BAPI transaction for your release.
- Business Partner in S/4HANA. Suppliers are maintained as Business Partners, and customer/vendor integration (CVI) keeps a supplier record in
LFA1behind each one; that supplier number is what the invoice BAPIs post to. See SAP Business Partner automation. - SAP's own option in S/4HANA. SAP offers SAP Document AI, including an edition embedded in SAP applications; the next section compares it with PostNow.ai Document AI.
Where IDP is applied: invoices first, then your own document types
PostNow.ai Document AI ships the supplier invoice as its built-in document type and lets a designer add others without code, under New document type. A document type has three parts:
- A schema. Up to 40 header fields, each typed as text, number, amount, date, currency code or yes/no, marked required or optional, with a short hint for the extraction. Optionally one line table of up to 15 fields.
- A target BAPI. The designer searches your SAP system by name, and PostNow.ai stores the BAPI's interface as it was at design time.
- A mapping and a number rule. The same File / Fixed / Dynamic / Skip mapping as the invoice, plus where to read the SAP document number from in the answer.
A test extraction on a sample PDF shows what the schema pulls out before anyone posts with it, and the review screen for a custom type lists its required fields as a checklist. Typical candidates, each mapped by your designer to a BAPI your SAP team approves:
| Document in | Record out in SAP | A BAPI a designer might pick |
|---|---|---|
| Supplier invoice (built in) | PO invoice or non-PO invoice | BAPI_INCOMINGINVOICE_CREATE1 / BAPI_ACC_DOCUMENT_POST |
| Customer purchase order | Sales order | BAPI_SALESORDER_CREATEFROMDAT2 |
| Supplier delivery note | Goods receipt for a purchase order | BAPI_GOODSMVT_CREATE |
| Expense or utility statement | G/L or vendor posting | BAPI_ACC_DOCUMENT_POST |
Supplier registration and bank forms belong to a different process with its own controls; it is covered in supplier onboarding automation.
SAP Document AI and PostNow.ai Document AI
PostNow.ai Document AI is the module described on this page: extraction, review, approval and BAPI posting in the PostNow.ai portal, with SAP calls made through PostNow.ai on your own computer. SAP Document AI is SAP's own document processing service on SAP Business Technology Platform (BTP). The names are close, so it helps to keep them apart:
| PostNow.ai Document AI | SAP Document AI | |
|---|---|---|
| What it is | A licensed module of the PostNow.ai web portal | A cloud service on SAP BTP; SAP's learning material describes Document Information Extraction as part of SAP Document AI |
| How you work with it | Operations workspace for intake, verification, approvals and matching; posting screen for upload, review, Simulate and Post | A REST and OData API, SDKs, and a UI for uploading documents and viewing and validating the extracted data |
| Into SAP | Built-in MIRO and FB60 posting through BAPIs, plus your own document types mapped to a BAPI your designer picks from your SAP system | Results go to the target system, such as SAP S/4HANA or SAP S/4HANA Cloud, through notifications and integration services (SAP's reference architecture names Integration Suite and SAP Build Process Automation) |
| Commercial model | Switched on per customer account under the PostNow.ai licence | SAP service plans that differ by feature set and metering |
SAP also offers SAP Document AI, embedded edition, inside SAP applications. Which document scenarios it covers depends on your S/4HANA edition and release, so check SAP's own documentation for yours. Intelligent document processing is the general name for the discipline both products apply.
Worked example: two supplier invoices into company code 1010
PostNow.ai Document AI handles both invoices below with one configuration: company code 1010, document type RE for PO invoices and KR for non-PO invoices, tax rate 19% mapped to tax code V1, and a coding rule for supplier 100078.
- Upload. On the posting screen, AP uploads INV-0447.pdf from supplier
100045and EL-2026-10.pdf, an electricity bill from supplier100078. - Extraction. INV-0447 carries PO
4500001872, two lines (600.00 and 400.00), tax 190.00 and gross 1,190.00 EUR, so it goes the MIRO way. The arithmetic check passes. Every field is above 0.85 except the invoice date, printed "09/10/2026". The electricity bill has no PO number and goes the FB60 way. - Review. The supplier is German, so the clerk reads the date as 9 October 2026 and confirms it against the PDF. The vendor search in
LFA1returns100045for the printed name. For the electricity bill, the coding rule for100078fills G/L account63100000, cost center10101301and tax codeV1. - Simulate. INV-0447 passes. The electricity bill comes back with SAP's message that G/L account
63100000does not exist in company code1010: the account was set up in the chart of accounts but never extended to the company code. The designer corrects the coding rule to the energy account the company code uses,63000000, and the second Simulate passes. - Post. INV-0447 posts through
BAPI_INCOMINGINVOICE_CREATE1as invoice document5105600512, and the electricity bill throughBAPI_ACC_DOCUMENT_POSTas document1900000231. Each number appears on its document.
Nothing reached SAP that a person had not seen, and the wrong account was caught in a simulation that left no trace in the books.
Stops before posting and what clears them
PostNow.ai Document AI stops a document with a plain message instead of letting it drift toward SAP. These are the ones an AP team meets first:
| Message | What it means | What clears it |
|---|---|---|
| "Vendor, invoice number and gross amount are required" | Extraction left one of the three empty, often on a poor scan | Complete the fields in Verification from the PDF, then submit |
| "Resolve the duplicate flag first." | An exact or near-duplicate flag is still open | Compare with the earlier document and mark it a duplicate (it stops) or not a duplicate (it goes on) |
| Segregation of duties | The person approving edited the fields and would be the only or final approver | A second approver decides, or the rule gets another step |
| "Non-PO rules require at least 2 steps (4-eyes)" | An admin tried to save a non-PO approval rule with one step | Add a second approval or release step |
| "Monthly document limit reached" | The posting screen has used the documents your licence allows this month | The counter resets next month; the limit is set per account in your PostNow.ai licence |
| SAP error in Simulate | SAP refused the posting (account, period, PO item, tax); nothing was saved | Fix the field or the rule named in SAP's message and simulate again; for PO invoices, expect the next line's message after the first is fixed |
Checklist before you switch on IDP for SAP postings
PostNow.ai Document AI enforces the review, duplicate and approval steps; this list covers the decisions that stay with AP, purchasing and finance.
- The document feed is named: who uploads, or which system calls the ingest API.
- The PO-vendor list holds every supplier that must always quote a PO number.
- Default company code, currency and the MIRO and FI document types are set.
- Every tax rate your suppliers print has a tax code in the rate table.
- Each recurring non-PO supplier has a coding rule (G/L account, cost center, tax code), and the accounts exist in the company code.
- Approval rules cover every company code and amount band, with two steps on non-PO rules.
- Price and quantity tolerances per company code are agreed with purchasing and sit within SAP's own tolerance limits (
OMR6), so the portal's verdict and SAP's payment block agree. - Duplicate tolerances (amount and date window) are reviewed, and someone owns open duplicate flags every day.
- Each poster has PostNow.ai running on their own computer, with their own SAP login set up for it.
- A first batch has been simulated end to end before anyone presses Post.
What to plan for in SAP document automation
PostNow.ai Document AI posts through SAP's BAPIs, so SAP's own rules decide the final result of every document.
- Read blocks after posting. A PO invoice above SAP's tolerance posts and is blocked for payment; release it in MRBR, never post it again. The block design is in SAP invoice matching.
- Keep review on dates and amounts. Ask reviewers to confirm the four high-risk fields on every invoice, whatever their confidence.
- Grow document types one at a time. Run a new type's test extraction on real samples from several suppliers before its first posting.
- Bring spreadsheet data in through Excel. Data that already arrives as rows needs no extraction; post it with the PostNow.ai Excel add-in, as in FB60 mass upload or MIRO mass invoice posting.
- Treat AI as an assistant. Where AI helps across SAP data work, and where people stay in charge, is covered in AI in SAP automation.

