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

# SAP S/4HANA

> Connect Bill Pay to SAP S/4HANA Cloud or on-premise for automated AP posting.

<Tip>Need help in this area? See [Bill Pay FAQ](/platform/bill-pay/faq) or email [support@nectarclimate.com](mailto:support@nectarclimate.com).</Tip>

The SAP S/4HANA integration posts coded utility bills from Nectar into your SAP accounts payable process as **supplier invoices**. Nectar connects through SAP's standard **Supplier Invoice Integration** scenario (`SAP_COM_0057`), which exposes the `API_SUPPLIERINVOICE_PROCESS_SRV` OData service and its `A_SupplierInvoice` entity. This works on both S/4HANA Cloud (public and private edition) and S/4HANA on-premise, so your Basis team does not need to build custom middleware for the standard flow.

Because it uses SAP's delivered supplier invoice API, each Nectar-posted document behaves like a natively created supplier invoice in your source-to-pay process — visible in the **Supplier Invoices List**, subject to your posting and blocking logic, and available for the standard payment run (`F110`).

## What gets delivered

When a bill matches a routing rule with a **Route to AP integration** action, Nectar maps it to the supplier invoice payload and posts:

* **Header data** — supplier (business partner), invoice reference / document number, company code, document type, document and posting dates, due date, and currency
* **G/L account items** — expense lines coded to the correct G/L account and cost object (cost center, WBS element, or internal order) from your [GL coding rules](/platform/bill-pay/rules)
* **Tax data** — tax code and tax amounts per line
* **Gross amount and line items** from the utility bill
* **Attachment** — the source bill PDF, uploaded through the attachment service (`API_CV_ATTACHMENT_SRV`) where enabled
* **Delivery status** recorded in the [bill audit trail](/platform/bill-pay/decisions)

## How the connection works

Nectar authenticates to the supplier invoice OData service using the **communication user** and password bound to your `SAP_COM_0057` communication arrangement (Basic Authentication — the delivered supplier invoice OData services require User ID and password rather than OAuth). For each post, Nectar performs the required `X-CSRF-Token` handshake — a `GET` to fetch the token followed by the `POST` to `A_SupplierInvoice` — and returns the resulting SAP supplier invoice number into the audit trail.

## Connection fields

Configure these fields in the Nectar ERP wizard when you select **SAP S/4HANA**:

| Field                                   | Description                                         | Example                                |
| --------------------------------------- | --------------------------------------------------- | -------------------------------------- |
| **Destination name**                    | Label for this SAP connection in Nectar             | `SAP Production`                       |
| **API host URL**                        | SAP API endpoint for your system                    | `https://my12345-api.s4hana.cloud.sap` |
| **Client number**                       | SAP client bills post into                          | `100`                                  |
| **Communication scenario** *(optional)* | Communication arrangement scenario for the API user | `SAP_COM_0057`                         |
| **Communication user**                  | Technical user Nectar authenticates as              | `CC_0057_SYSTEM`                       |
| **Communication user password**         | Password for the communication user                 | *(secret)*                             |

Non-secret settings are stored on the destination. Passwords are stored as encrypted credentials and shown masked in the UI.

## Set up in Nectar

<Steps>
  <Step title="Open the ERP wizard">
    Go to [**Bill Pay > Destinations**](https://dash.nectarclimate.com/bill-pay/destinations/new/integration), click **AP/ERP Integrations**, and select **SAP S/4HANA**.
  </Step>

  <Step title="Enter connection details">
    Fill in the API host, client number, communication scenario (if your landscape uses one), destination name, and communication user credentials.
  </Step>

  <Step title="Review and create">
    Confirm the settings on the review step and click **Create integration**.
  </Step>

  <Step title="Add a routing rule">
    Create a [routing rule](/platform/bill-pay/rules) with **Route to AP integration** targeting your new SAP destination.
  </Step>
</Steps>

## What your SAP team configures

Your SAP Basis or integration team typically:

1. Opens the **Communication Arrangements** app (Fiori launchpad) and creates an inbound arrangement for scenario `SAP_COM_0057` (Supplier Invoice Integration).
2. Provisions a **communication user** in the **Maintain Communication Users** app, scoped to that scenario — a technical/system user, not a named employee account.
3. Provides the resulting **API host URL** (for example `https://my12345-api.s4hana.cloud.sap`), **client number**, communication user, and password to your Nectar administrator.
4. Confirms the **company code**, **document type**, tax codes, and **G/L account / cost object** structure utility invoices should post to.
5. On S/4HANA on-premise, activates the equivalent gateway services and, if attachments are needed, the `API_CV_ATTACHMENT_SRV` service (both available since S/4HANA 2020 FPS02).

<Note>
  Start with a **sandbox or QA client** when one is available. Create a separate Nectar destination for test and production so you can validate posting before go-live.
</Note>

## Validate and go live

Nectar recommends a sandbox-first rollout:

1. **Discovery** — Confirm SAP edition (Cloud vs. on-premise), target company codes, and GL/cost-center rules for utility spend.
2. **Connectivity** — Create a test destination and confirm authentication succeeds.
3. **Field mapping** — Align Nectar bill fields with your SAP AP document structure and encode GL rules in Nectar.
4. **Test posting** — Run representative bills through the pipeline and reconcile SAP documents against source bills.
5. **Production** — Repoint to your production client and expand scope gradually while monitoring the [bill audit trail](/platform/bill-pay/decisions).

Contact [support@nectarclimate.com](mailto:support@nectarclimate.com) if you need help mapping fields or validating against a non-standard SAP landscape.

## FAQ

<AccordionGroup>
  <Accordion title="Does Nectar support S/4HANA Cloud and on-premise?">
    Yes. The connection uses SAP's standard Supplier Invoice Integration scenario (`SAP_COM_0057`) and the `API_SUPPLIERINVOICE_PROCESS_SRV` OData service, available on both S/4HANA Cloud (public and private edition) and on-premise (2020 FPS02 and later). Your API host URL and client number reflect which environment you connect to.
  </Accordion>

  <Accordion title="Why does SAP need a communication user instead of OAuth?">
    The delivered supplier invoice OData services authenticate with a communication user and password (Basic Authentication) bound to the communication arrangement. Nectar stores these credentials encrypted and performs the required `X-CSRF-Token` handshake on every post.
  </Accordion>

  <Accordion title="Can I connect both a test and a production SAP client?">
    Yes. Create two destinations — for example `SAP QA` and `SAP Production` — each with its own API host, client, and credentials. Point test routing rules at the QA destination until you are ready to go live.
  </Accordion>

  <Accordion title="How do I verify a bill reached SAP?">
    Check the [bill audit trail](/platform/bill-pay/decisions). Each evaluation shows whether the **Route to AP integration** action was applied and the delivery status for your SAP destination.
  </Accordion>

  <Accordion title="What if our SAP setup uses custom document types, tax codes, or IDocs?">
    Contact [support@nectarclimate.com](mailto:support@nectarclimate.com). Nectar works with your SAP team during onboarding to align document type, company code, tax code, and G/L / cost object mapping with your landscape, including IDoc-based flows where the standard OData path is not used.
  </Accordion>
</AccordionGroup>

## Related pages

* [ERP integrations overview](/platform/bill-pay/erp-integrations/overview)
* [Destinations](/platform/bill-pay/destinations)
* [Rules](/platform/bill-pay/rules)
* [Bill audit](/platform/bill-pay/decisions)
