> ## Documentation Index
> Fetch the complete documentation index at: https://agents.nanonets.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# SAP Read Supplier Invoice

> Reads a supplier invoice by document key, or searches for invoices by supplier, reference, company code, date or status.

Reads supplier invoices from SAP (`A_SupplierInvoice` in `API_SUPPLIERINVOICE_PROCESS_SRV`). Display name **"SAP Read Supplier Invoice"**. Off by default.

One tool covers both shapes, the same way `sap_read_sales_order` does:

* **By key** — `supplier_invoice` together with `fiscal_year` returns that one document with its PO reference lines and G/L lines expanded.
* **By filter** — any of `invoicing_party`, `supplier_invoice_id_by_invoicing_party`, `reference_starts_with`, `company_code`, `document_date`, `posting_date` or `supplier_invoice_status` returns matching invoice headers.

Passing both a key and filters is refused, so a call is never ambiguous about which it meant.

## Authentication and enablement

Requires a workspace SAP integration. `base_url` and `authorization` are injected. Enable the tool and bind the integration.

## Why fiscal year is required with the key

`SupplierInvoice` alone is not a key. The same document number recurs in later fiscal years, so a read without the year is ambiguous and SAP will not serve it.

## Checking for a duplicate before creating

This is the tool's main reason to exist. Before `sap_create_supplier_invoice`, search on the supplier and their reference to see whether the document is already booked.

Suppliers re-key the same reference with a trailing `.`, `-` or `/`. An exact match misses those, so use `reference_starts_with`:

```
invoicing_party: "115712"
reference_starts_with: "GA0923603"
```

returns the documents keyed `GA0923603` and `GA0923603.` together, where an exact match on `GA0923603` returns only the first.

## Inputs

| Field | Required | Notes |
| - | - | - |
| `supplier_invoice` | with `fiscal_year` | Document number. |
| `fiscal_year` | with `supplier_invoice` | e.g. `2026`. |
| `invoicing_party` | — | Supplier number. |
| `supplier_invoice_id_by_invoicing_party` | — | The supplier's own reference, exact match. |
| `reference_starts_with` | — | The supplier's reference by prefix. |
| `company_code` | — | |
| `document_date`, `posting_date` | — | ISO 8601, e.g. `2026-10-08`. |
| `supplier_invoice_status` | — | `A` parked, `5` posted. |
| `max_results` | — | Cap on a filter search. Defaults to 20, capped at 100. |

## Outputs

`invoice` on a key read (with `to_SuplrInvcItemPurOrdRef` and `to_SupplierInvoiceItemGLAcct`), or
`invoices` on a search. `returned` either way, and `sap_url` for a key read.

In the task feed this renders as the supplier-invoice card, not a JSON blob: a key read shows the
card directly, a search puts one tab per invoice above it. The GL-account table appears only when
the invoice has GL lines.

A search that hit the cap sets `has_more` and adds a warning to `sap_messages` saying the list is
only the first page. SAP does not report how many invoices matched, so there is no total to give —
narrow the filters or raise `max_results`.

## Limits and errors

* A search with no filter at all is refused rather than returning every invoice in the system.
* A filter search returns headers only; read by key for the lines.
* A key that does not exist returns SAP's own not-found error.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.