# Import Paige invoices into SAP Business One with the Data Transfer Workbench

Turn a batch of invoices Paige read into SAP Business One A/P invoices with the Data Transfer Workbench: fill DTW's Documents and Document_Lines templates from Paige's one-row-per-document CSV, map them to the Purchase Invoices object, and import.

Product: paige · Audience: system-administrator · Time: 1 hour the first time, 15 minutes per batch after · Last verified: 2026-09-05

Canonical: https://help.ademero.com/paige/integrations/import-paige-invoices-into-sap-business-one-with-the-data-transfer-workbench

**At the end of this guide, a batch of invoices that Paige read becomes a batch of A/P invoices in SAP Business One in one DTW run — vendor, dates, vendor reference, and a service line with account and amount filled from Paige's CSV.**

DTW imports the **Purchase Invoices** object from two files: a **Documents** file (one row per invoice) and a **Document_Lines** file (one row per line), linked by a `RecordKey` column. Paige's CSV has one row per invoice with a column per field, so both DTW files are built from it with a spreadsheet. Attachments aren't part of DTW; add PDFs on each invoice's **Attachments** tab, or use the [Service Layer path](/paige/integrations/integrate-paige-with-the-sap-business-one-service-layer).

## Step 1 — Get the CSV out of Paige

- **Download:** in Paige, open **Documents**, click **Export**, and in the **Export Documents** dialog choose the **Scope**, the **Filters** (**Reviewed** only, **Field Data** with fields, **Status** not yet exported), tick **Download** under **Destinations**, and confirm. Paige emails a link; the zip contains the PDFs and the data files, including the one-row-per-document CSV.
- **SFTP:** if the scan job exports to SFTP, turn on **Generate combined metadata file** on the **FTP** card so each export run also writes the combined CSV.

Open it in a spreadsheet. **What you should see:** a header row with the PDF file name, the document type, and one column per Paige field, then one row per invoice.

## Step 2 — Fill DTW's two templates

The templates live in DTW's install folder (`…\Data Transfer Workbench\Templates\oPurchaseInvoices`): `Documents.csv` and `Document_Lines.csv`. Row 1 holds the DTW column names and row 2 the SAP field names; keep both, and put data from row 3.

**Documents** — one row per invoice:

| Column | Fill from |
| --- | --- |
| `RecordKey` | `1`, `2`, `3`… — a running number that ties the line to the invoice |
| `CardCode` | The vendor's code for Paige's `Vendor Name` (`VLOOKUP` against a business partner export) |
| `DocDate` | `Invoice Date`, as `YYYYMMDD` |
| `DocDueDate` | `Due Date`, as `YYYYMMDD` |
| `NumAtCard` | `Invoice Number` — the vendor reference |
| `DocType` | `dDocument_Service` (a service-type invoice, posted to a G/L account rather than items) |
| `Comments` | Optional, for example `Paige – Vendor Invoice` |

Leave `DocTotal`, `DocNum`, and `HandWritten` blank so SAP calculates the total and numbers the document.

**Document_Lines** — one row per invoice line (one per invoice for a total-only import):

| Column | Fill from |
| --- | --- |
| `RecordKey` | The same number as the invoice's row in Documents |
| `LineNum` | `0` |
| `AccountCode` | The expense G/L account code |
| `LineTotal` | `Total`, as a plain number |
| `ItemDescription` | `Invoice INV-20441` or similar |

For itemized invoices, add one line per row of Paige's line-item table with `LineNum` 0, 1, 2… Save both as CSV.

## Step 3 — Run DTW

1. Start the **Data Transfer Workbench** and log in to the company database.
2. Choose **Import**, then business object **Purchase Invoices** (`oPurchaseInvoices`) under Purchasing – A/P.
3. Select the two CSV files as the data source: `Documents.csv` for the header, `Document_Lines.csv` for the lines.
4. On **Map Object Fields**, confirm each source column maps to its target field (they do automatically when you kept the template headers). Click **Next**, then **Import**.

**What you should see:** DTW reports the number of records imported and writes a log; failures list the row and SAP's message.

Open **Purchasing – A/P > A/P Invoice** and find the new documents. Attach PDFs on each invoice's **Attachments** tab if you want them.

## When it doesn't work

| Symptom | Where to look |
| --- | --- |
| "Business partner not found" | `CardCode` isn't a vendor code. |
| Tax or account errors | The G/L account isn't allowed for the vendor's tax group or is blocked; the message names it. |
| Posting period errors | `DocDate` falls in a closed period. |
| Dates rejected | Use `YYYYMMDD`. |
| Invoices doubled | Export each batch once from Paige (use the **Status: Not Exported** filter); SAP also rejects a duplicate `NumAtCard` for the same vendor if that check is on. |

If a Paige field is consistently misread, improve its extraction guidance: [Write extraction guidance the AI can follow](/paige/document-processing/write-extraction-guidance-the-ai-can-follow).

## What's next

- [Integrate Paige with the SAP Business One Service Layer](https://help.ademero.com/paige/integrations/integrate-paige-with-the-sap-business-one-service-layer)
- [Connect Paige to SAP Business One](https://help.ademero.com/paige/integrations/connect-paige-to-sap-business-one)
