> For the complete documentation index, see [llms.txt](https://docs.lleverage.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lleverage.ai/external-apps-integration/sap-s4hana.md).

# SAP S/4HANA

SAP S/4HANA integration in Lleverage connects your workflows and agents to your SAP system, so they can work with business partners, products, sales and purchase documents, and react automatically when new documents are created in SAP.

### How to Connect

SAP S/4HANA is an ERP connection, and ERP connections are set up together with the Lleverage team because they need configuration specific to your environment.

1. **Contact the Lleverage team** via support or your account manager to start the managed setup
2. **Provide the sign-in details** for your SAP system: cloud systems sign in with your SAP account, while on-premise systems can use a username and password or an API key
3. **Confirm the connection** appears in Settings > Connections, ready for use in workflows and by agents

> 💡 Once connected, you can control which actions the connection allows and which need approval before running, just like any other connection.

### What SAP S/4HANA Can Do

* **Business partners** - look up and list business partners
* **Customers** - create, look up and list customers
* **Suppliers** - look up and list suppliers
* **Products** - create, look up and list products
* **Sales orders** - create, look up and list sales orders
* **Sales quotations** - create, look up and list sales quotations
* **Purchase orders** - create, look up and list purchase orders
* **Billing documents** - look up and list billing documents
* **Company codes** - list the company codes in your system

### Triggers

SAP S/4HANA provides six triggers, so workflows can start automatically when SAP records these events:

* **A new sales order** is created
* **A new purchase order** is created
* **A new sales quotation** is created
* **A new billing document** is created
* **A new customer** is created
* **A new supplier** is created

> 💡 **Use case**: Start an approval workflow whenever a large purchase order is created, or notify the account team the moment a new customer appears in SAP.

### Important Considerations

* The account used to connect determines what the integration can see and change in SAP
* Triggers check SAP for new documents on a schedule, so there can be a short delay before the workflow starts


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.lleverage.ai/external-apps-integration/sap-s4hana.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
