Skip to main content
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:
returns the documents keyed GA0923603 and GA0923603. together, where an exact match on GA0923603 returns only the first.

Inputs

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.