Post action on A_SupplierInvoice. Display name “SAP Post Supplier Invoice”. Off by default.
Authentication and enablement
Requires a workspace SAP integration.base_url and authorization are injected. Enable the tool and bind the integration.
Inputs
Why this exists separately from sap_create_supplier_invoice
sap_create_supplier_invoice with supplier_invoice_status: "5" composes a new document and posts it in one call, so it cannot post a document a human has already reviewed. This tool takes the parked document’s key and moves it to posted, so the numbers that reach the ledger are the numbers the reviewer saw.
Outputs
{supplier_invoice, fiscal_year, status, posted, full_details, sap_messages[], sap_url, completed_at}.
status is SAP’s own SupplierInvoiceStatus after the post, and posted is true only on status 5. The action can succeed and still leave the document parked when a block applies. When SAP answers without a usable document (a 204, or a body that does not decode) or does not answer at all, the tool reads the document back to get the status.
A successful result always carries a status SAP reported. If that status cannot be read, the tool returns an error saying so rather than guessing.
Posting is where SAP applies the vendor’s payment block, the invoice tolerances and the posting-period controls. Everything it says about them arrives in sap_messages.
Limits and errors
- Not every release exposes the action. Where
A_SupplierInvoicedeclares onlyReleaseandCancel, the call answers404 Resource not found for the segment 'Post'— that is the action being absent on that system, not the invoice. Check the service’s$metadatabefore enabling the tool against a new connection. - Irreversible through this connector. Reversing a posted invoice needs the
Cancelaction, which CPI’s allow-list refuses (403 Forbidden - Entity not allowed: API_SUPPLIERINVOICE_PROCESS_SRV/Cancel). Check the invoice before posting it. - A closed posting period is refused with SAP’s own
M8/535naming the open periods; that text reaches the agent. - A missing tax jurisdiction is refused with
M8/757. - Posting again is safe. The tool never resends the call itself, but a second post of the same document cannot create a duplicate: SAP refuses to post a document that is no longer parked. When the outcome is unclear, the tool says so and the agent may read the document or post again.