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

# SAP S/4HANA

> Monk integration with SAP S/4HANA Cloud

# SAP S/4HANA

Monk connects to SAP S/4HANA Cloud (Public Edition) through SAP's standard
OData APIs. The integration reads business partners, AR invoices, payments,
credit memos, and the clearing links between them using stock SAP APIs — no
custom ABAP or add-on is required.

## Supported entities

| Monk entity         | SAP S/4HANA entity                        |
| ------------------- | ----------------------------------------- |
| Customer            | Business partner (customer role)          |
| Customer contacts   | Business partner contact person / address |
| Invoice             | AR accounting document (RV / DR)          |
| Payment             | Incoming payment document (DZ)            |
| Credit memo         | Credit memo document (DG)                 |
| Payment application | Clearing document link                    |
| Company             | Company code                              |

## Authentication

* Connect from **Integrations → SAP S/4HANA** in Monk by entering your OData
  base URL and an SAP API key issued through the SAP API Business Hub or your
  communication arrangement.
* Monk validates the URL is public HTTPS and probes the company-code service
  before saving anything.
* Credentials are stored encrypted; nothing is persisted if the connection test
  fails.

## Multi-entity, currency, and parent-child

* **Company codes:** During setup Monk lists the company codes in your tenant
  and you select exactly one for the Monk org. Connect additional Monk orgs for
  additional company codes.
* **Currency:** Amounts are read in transaction currency with their sign
  normalized (invoices positive, payments negative in SAP). Monk applies
  payments in the invoice currency.
* **Payment application:** SAP links payments to invoices through clearing
  documents rather than a direct reference. Monk reconstructs one-payment-to-many-
  invoice applications from the clearing document so partial and bulk payments
  land correctly.
* **Customer hierarchy:** Business partners are imported as top-level customers.

## Configuration options

* **Company code selection:** pick the company code to associate with this Monk
  org.
* **Customer scoping:** sync all customers, only a named allowlist of business
  partners, or exclude specific business partner IDs.
* **Historical cutover date:** limit how far back Monk imports invoices and
  payments.
* **Payment sync:** enable or disable synchronization of payment records.
* **Auto-import:** enable or disable automatic import of new SAP invoices and
  customers.

## Sync and reliability

* Incremental sync cursored on SAP's `LastChangeDate`.
* Business partner reads are paged and batched to stay within SAP API quotas;
  a customer allowlist is pushed down into the SAP query so scoped syncs stay
  small.
* Automatic retry with backoff on SAP rate limits and transient errors.

## Frequently asked questions

**Do I need a custom SAP extension?**
No. Monk uses only released, stock SAP OData APIs.

**Which SAP editions are supported?**
SAP S/4HANA Cloud, Public Edition. Contact us if you run a private-cloud or
on-premise deployment.

**Can one Monk org sync more than one company code?**
One Monk org connects to one company code. Connect additional Monk orgs for
additional company codes and use Monk's org hierarchy for roll-up.
