Skip to main content

S/4HANA

Connect to SAP S/4HANA with Basic Auth or OAuth2, over OData, SOAP and the RFC endpoint. Both service lists are optional and independent: fill "OData Services" only to expose odata/* CRUD, and "WSDL URLs" only to expose soap/. Supplier invoices need neither — in BRAZILIAN companies use nf/create_supplier_invoice_with_nota_fiscal, which records the supplier nota fiscal, because invoice/ and odata create_* post through BOPF and record NO fiscal document while still reporting success. Elsewhere use invoice/create_supplier_invoice_from_po (MIRO) — not odata create_* on import/list services.

S/4HANA Logo

Authentication

This connector uses Token-based authentication.

info

Set up your connection in the Abstra Console before using it in your workflows.

How to use

Using the Smart Chat

Execute the action "CHOOSE_ONE_ACTION_BELOW" from my connector "YOUR_CONNECTOR_NAME" using the params "PARAMS_HERE".

Using the Web Editor

from abstra.connectors import run_connection_action

result = run_connection_action(
connection_name="your_connection_name",
action_name="your_action_name",
params={
"param1": "value1",
"param2": "value2"
})

Available Actions

This connector provides 4 actions:

ActionPurposeParameters
nf/create_supplier_invoice_with_nota_fiscalPost a supplier invoice MIRO against purchase order items so that SAP records the supplier's Brazilian nota fiscal. Use this instead of invoice/create_supplier_invoice_from_po and odata create_ whenever the company is Brazilian: those post through BOPF, which creates the invoice but records NO fiscal document, and they report success while doing so. Call list_nota_fiscal_types first to choose notaFiscalType. Reverse with cancel_supplier_invoice.items (array) required
notaFiscalNumber (string) required
notaFiscalSeries (string)
notaFiscalType (string) required
companyCode (string) required
currency (string)
documentDate (string)
postingDate (string)
baselineDate (string)
grossAmount (number)
simulate (boolean)
calculateTax (boolean)
paymentMethod (string)
reference (string)
nf/cancel_supplier_invoiceReverse a supplier invoice. The reversal also cancels the nota fiscal that the invoice recorded. Note that an invoice posted WITHOUT a fiscal category can be impossible to reverse — SAP computes a different balance at reversal time than it did at posting and rejects every reason code — so always post with a fiscal category for Brazilian companies.supplierInvoice (string) required
fiscalYear (string) required
reversalReason (string)
postingDate (string)
nf/register_nfe_authorizationRecord the SEFAZ authorization of an NF-e on a nota fiscal document: protocol number 'Protocolo de Autorização de uso' on the DANFE plus the processing date and time. Idempotent — calling twice returns a warning that the XML was already processed and changes nothing. This does NOT complete the 44 digit access key: the random code and check digit are set when the nota fiscal is created, from the posting screen, and no available call writes them.notaFiscalDocument (string) required
authorizationProtocol (string) required
authorizationDate (string)
authorizationTime (string)
region (string)
issuerTaxNumber (string)
notaFiscalNumber (string)
notaFiscalSeries (string)
statusCode (string)
nf/list_nota_fiscal_typesList the fiscal categories Ctg.NF / J_1BNFTYPE this SAP system defines, with their descriptions. Read this before choosing notaFiscalType: the codes are customer specific, and names distinguish cases that look alike — recording an incoming supplier NF-e is not the same as issuing one yourself, and the wrong choice recalculates tax and inflates the fiscal document total.language (string)
startsWith (string)