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

# SAP S/4 HANA

> Connect Alumio to SAP S/4 HANA via the OData API.

## Extra information

System documentation:

## Connector package documentation

**Table of Contents**

1. Setting up HTTP Client SAP S/4 Hana Odata
   * Steps
2. Subscribing to Entities from SAP S/4 Hana Odata
   * Steps
   * General Concept
3. Publishing Entity to SAP S/4 Hana Odata
   * Steps
   * General Concept

# Setting up HTTP Client SAP S/4 Hana Odata

## Steps

* In Alumio Dashboard, go to Clients > HTTPS Client. Create a new HTTP Client and select SAP S/4 Hana Odata HTTP Client as the prototype of the HTTP Client.
* Fill in the Base URI, and Api Key.
* On the top right, press Save & Continue, after you received the key.
  <img src="https://mintcdn.com/alumio/2XcHi1eVMdbU3dfQ/images/connectors/sap-s4-hana-01.png?fit=max&auto=format&n=2XcHi1eVMdbU3dfQ&q=85&s=2d3a3818fd0d810aa11e31b7ab201322" alt="SAP S/4 HANA connector screenshot 1" width="690" height="332" data-path="images/connectors/sap-s4-hana-01.png" />

# Subscribing to Entities from SAP S/4 Hana Odata

## Steps

* Go to Connections -> Incoming and create a new incoming configuration and select SAP S/4 Hana Odata Subscriber as the subscriber.
* Select the entity you want to subscribe from SAP S/4 Hana Odata.
* Add any request parameters needed to subscribe to the entity (optional).
* You can optionally add a transformer to transform the request parameters into something you need.
* Select the SAP S/4 Hana Odata HTTP Client to use

## General Concept

We follow SAP S/4 Hana Odata documentation on building this connector so you can easily use the connector based on SAP S/4 Hana Odata API Reference.

**Entity**

It’s the entity you want to subscribe from SAP S/4 Hana Odata. Please refer to the entities in Management APIs from SAP S/4 Hana Odata API Reference page.

**Request Parameters**

These are the parameters you can provide to get the needed entity based on SAP S/4 Hana Odata API Reference. Please look at the example below on how to fill the Request Parameters field when subscribing Read Bank by Details

<img src="https://mintcdn.com/alumio/2XcHi1eVMdbU3dfQ/images/connectors/sap-s4-hana-02.png?fit=max&auto=format&n=2XcHi1eVMdbU3dfQ&q=85&s=81fd80aebdaa64b3ef72b08664539237" alt="SAP S/4 HANA connector screenshot 2" width="690" height="497" data-path="images/connectors/sap-s4-hana-02.png" />

<img src="https://mintcdn.com/alumio/2XcHi1eVMdbU3dfQ/images/connectors/sap-s4-hana-03.png?fit=max&auto=format&n=2XcHi1eVMdbU3dfQ&q=85&s=14e0633bc89e62ca3e74b104a2a1aea2" alt="SAP S/4 HANA connector screenshot 3" width="690" height="439" data-path="images/connectors/sap-s4-hana-03.png" />

That’s why we need to define the **BankCountry, and BankInternalID** property inside the **odata** property in the Request Parameters field. The properties inside **query** parameters will be parsed as query parameters. The properties inside **path** parameters will be parsed as path parameters. The properties inside **payload** parameters will be parsed as payload. Here is the final URL that will be called when using such Request Parameters field.

/odata/sap/API\_BANKDETAIL\_SRV/A\_BankDetail(BankCountry='US',BankInternalID='444444')

**Input Transformer**

Any transformers set here will be executed after the Request Parameters are loaded. So, you basically can add any transformer to provide and transform the request parameters into anything you need either as path parameters and/or as query parameters of an entity.

**HTTP Client**

It’s the HTTP Client configuration or prototype you will use to access SAP S/4 Hana Odata.

# Publishing Entity to SAP S/4 Hana Odata

## Steps

* Go to Connections -> Outgoing, create a new outgoing configuration, and select SAP S/4 Hana Odata Publisher as the publisher.
* Select the action that you want the publisher to do with the data.
* Select the SAP S/4 Hana Odata entity you want the data to be published.
* Select the HTTP Client to use.
  <img src="https://mintcdn.com/alumio/2XcHi1eVMdbU3dfQ/images/connectors/sap-s4-hana-04.png?fit=max&auto=format&n=2XcHi1eVMdbU3dfQ&q=85&s=f917e0b09b4f09d3862dcad63852368c" alt="SAP S/4 HANA connector screenshot 4" width="690" height="211" data-path="images/connectors/sap-s4-hana-04.png" />

## General Concept

Like the subscriber, the publisher has similar methods on how to use it. The difference is the payload that will be submitted by the publisher originating from the data (from routes, from transformers in outgoing configuration).

**Action**

Currently, we support Create (HTTP POST method), Patch (HTTP Patch method), and Delete (HTTP DELETE method).

**Entity**

We support publishing to most SAP S/4 Hana Odata. Please refer to the entities in Management APIs from SAP S/4 Hana Odata API Reference page. Based on the documentation, some endpoints may need one or more odata parameters.

For endpoints that require an object as the request payload, please look at the example below. For example, we want to Add new entity to related to\_BatchPlant. Please select “Create” as the action and “Add new entity to related to\_BatchPlant” as the entity of the publisher.

<img src="https://mintcdn.com/alumio/2XcHi1eVMdbU3dfQ/images/connectors/sap-s4-hana-05.png?fit=max&auto=format&n=2XcHi1eVMdbU3dfQ&q=85&s=8e3c5d8d2e594b96395064738171b629" alt="SAP S/4 HANA connector screenshot 5" width="690" height="203" data-path="images/connectors/sap-s4-hana-05.png" />

<img src="https://mintcdn.com/alumio/2XcHi1eVMdbU3dfQ/images/connectors/sap-s4-hana-06.jpeg?fit=max&auto=format&n=2XcHi1eVMdbU3dfQ&q=85&s=940307eb05e1f8fe35354c12b1ee2b7d" alt="SAP S/4 HANA connector screenshot 6" width="447" height="500" data-path="images/connectors/sap-s4-hana-06.jpeg" />

You can put the payload you want to send to SAP S/4 Hana Odata into the payload property in the data. Here is an example of the Possible Response after Creation.

<img src="https://mintcdn.com/alumio/2XcHi1eVMdbU3dfQ/images/connectors/sap-s4-hana-07.jpeg?fit=max&auto=format&n=2XcHi1eVMdbU3dfQ&q=85&s=36504aebc19452c6add8b8f9848b85e1" alt="SAP S/4 HANA connector screenshot 7" width="355" height="500" data-path="images/connectors/sap-s4-hana-07.jpeg" />

Alumio will send an API request to SAP S/4 Hana Odata with URL

odata/sap/API\_BATCH\_SRV/Batch(Material=%27Polyester%27,BatchIdentifyingPlant=%27Arsenal%27,Batch=%270234567%27)/to\_BatchText

**HTTP Client**

It’s the HTTP Client configuration or prototype you will use to access SAP S/4 Hana Odata.
