# SAP S/4HANA Cloud Public Edition

> How SAP S/4HANA Cloud Public Edition hands serial numbers to BatteryPass and takes passport links back.

> [!NOTE]
> This page describes an integration pattern. BatteryPass ships no connector for SAP S/4HANA Cloud and has no
> partnership with SAP; nothing here is a vendor approval.

In the Public Edition every integration talks to the released APIs of the SAP Business Accelerator Hub through a
communication arrangement of its own. Give the BatteryPass middleware exactly the APIs it needs: the serial number
API, production order confirmations or goods movements for [units from production](https://passport.kabin.sh/docs/en/integrations/workflows/units-from-production),
and the product API when a [product change](https://passport.kabin.sh/docs/en/integrations/workflows/product-change) should reach the product owner.

Serial numbers come from `CE_API_MATERIALSERIALNUMBER_0001`. SAP Note 3772443 describes a defect with
serialisation level 1: a create answers `201` but creates nothing. Reading is not affected, so let serial numbers
be created in production (or with IQ01) and only read them from the middleware. The `sap-serial-numbers` preset maps
the material number, the serial number and the posting date of the goods receipt; it assumes the battery model's
model identifier in BatteryPass is the SAP material number.

Changes reach the middleware as CloudEvents through SAP Event Mesh, for example
`sap.s4.beh.product.v1.Product.Changed.v1`. The events are thin: they carry the key, and the middleware reads the
product afterwards. For the way back (Digital Link and passport status on the serial number record) the middleware
follows the BatteryPass [change feed](https://passport.kabin.sh/docs/en/integrations/workflows/passport-links-to-erp).

## Interfaces and how they were checked

- **Vendor:** SAP
- **Cloud:** Public Edition

Each integration gets a communication arrangement of its own with exactly the APIs it needs. The middleware usually runs in SAP Integration Suite or another iPaaS.

An integration pattern, not a connector: BatteryPass ships no ERP connector and holds no vendor certification.

| Interface                                                                                                                                  | Protocol | Sign-in                                                     | Events                       | Objects                 | Checked                                         |
| ------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ----------------------------------------------------------- | ---------------------------- | ----------------------- | ----------------------------------------------- |
| [`CE_PRODUCT_0002`](https://api.sap.com/api/CE_PRODUCT_0002/overview) (Product master)                                                     | OData V4 | Basic auth, X.509 certificate, OAuth 2.0 client credentials | none                         | Product/material master | checked in the vendor documentation, 24/10/2026 |
| [`CE_API_MATERIALSERIALNUMBER_0001`](https://api.sap.com/api/CE_API_MATERIALSERIALNUMBER_0001/overview) (Serial numbers)                   | OData V4 | Basic auth, X.509 certificate, OAuth 2.0 client credentials | none                         | Batch/serial number     | checked in the vendor documentation, 24/10/2026 |
| [`CE_PRODUCTIONORDER_0001`](https://api.sap.com/api/CE_PRODUCTIONORDER_0001/overview) (Production orders)                                  | OData V4 | Basic auth, X.509 certificate, OAuth 2.0 client credentials | none                         | Production order        | checked in the vendor documentation, 24/10/2026 |
| [`API_PROD_ORDER_CONFIRMATION_2_SRV`](https://api.sap.com/api/API_PROD_ORDER_CONFIRMATION_2_SRV/overview) (Production order confirmations) | OData V2 | Basic auth, X.509 certificate, OAuth 2.0 client credentials | none                         | Production order        | checked in the vendor documentation, 24/10/2026 |
| [`API_OUTBOUND_DELIVERY_SRV_0002`](https://api.sap.com/api/API_OUTBOUND_DELIVERY_SRV_0002/overview) (Outbound deliveries)                  | OData V2 | Basic auth, X.509 certificate, OAuth 2.0 client credentials | none                         | Delivery/goods issue    | checked in the vendor documentation, 24/10/2026 |
| [`API_MATERIAL_DOCUMENT_SRV`](https://api.sap.com/api/API_MATERIAL_DOCUMENT_SRV/overview) (Goods movements (goods receipt, goods issue))   | OData V2 | Basic auth, X.509 certificate, OAuth 2.0 client credentials | none                         | Delivery/goods issue    | checked in the vendor documentation, 24/10/2026 |
| [`API_CUSTOMER_RETURN_SRV`](https://api.sap.com/api/API_CUSTOMER_RETURN_SRV/overview) (Customer returns)                                   | OData V2 | Basic auth, X.509 certificate, OAuth 2.0 client credentials | none                         | Return                  | checked in the vendor documentation, 24/10/2026 |
| `sap.s4.beh.product.v1.Product.Changed.v1` (Product changed event through SAP Event Mesh)                                                  | REST     | OAuth 2.0 client credentials                                | Business events (not signed) | Product/material master | checked in the vendor documentation, 24/10/2026 |

**Notes**

- `CE_PRODUCT_0002`: The older API_PRODUCT_SRV (OData V2) is meant only for product texts.
- `CE_API_MATERIALSERIALNUMBER_0001`: SAP Note 3772443: with serialisation level 1, a create answers 201 but creates nothing. Reading is not affected; serial numbers are then created through production or IQ01.
- `sap.s4.beh.product.v1.Product.Changed.v1`: CloudEvents with a thin payload (the product key); the middleware reads the product through the API afterwards.

**Import presets: SAP serial number list** (`sap-serial-numbers`): A list of serial numbers from SAP S/4HANA as a middleware assembles it from the serial number API or the goods receipt from production. Assumes that the battery model's model identifier in BatteryPass is the SAP material number. The posting date of the goods receipt stands in for the manufacturing date; the plant stays unmapped (choose the facility in the import options).

| Column in the export                               | Field in BatteryPass                                     |
| -------------------------------------------------- | -------------------------------------------------------- |
| `Material` (also Product, Materialnummer, Produkt) | Model identifier / SKU `identification.model_identifier` |
| `SerialNumber` (also Serial Number, Serialnummer)  | Serial number `identification.serial_number`             |
| `PostingDate` (also Posting Date, Buchungsdatum)   | Manufacturing date `identification.manufacturing_date`   |

**Import presets: Generic CSV file** (`generic-csv`): For any ERP and for files a middleware writes itself: GTIN, serial number, manufacturing date, facility (name or GLN), model version and battery status, with German and English column names.

| Column in the export                                          | Field in BatteryPass                                      |
| ------------------------------------------------------------- | --------------------------------------------------------- |
| `GTIN` (also EAN, GTIN-13, GTIN-14)                           | GTIN (GS1) `identification.gtin`                          |
| `Serial number` (also Seriennummer, serial_number)            | Serial number `identification.serial_number`              |
| `Manufacturing date` (also Herstelldatum, manufacturing_date) | Manufacturing date `identification.manufacturing_date`    |
| `Facility` (also Produktionsstätte, Facility GLN, Werk-GLN)   | Place of manufacture `identification.manufacturing_place` |
| `Model version` (also Modellversion, model_version)           | Model version `model_version`                             |
| `Battery status` (also Batteriestatus, battery_status)        | Battery status `identification.battery_status`            |

## Workflows

- [Units from production](https://passport.kabin.sh/docs/en/integrations/workflows/units-from-production.md): Serial numbers from the production confirmation or goods receipt are staged as an import; members review, commit and approve before any passport appears. Key scopes: import
- [Passport links back into the ERP](https://passport.kabin.sh/docs/en/integrations/workflows/passport-links-to-erp.md): The middleware follows the change feed and writes the GS1 Digital Link and the passport status to the serial number record in the ERP, so labels and delivery papers carry it. Key scopes: read
- [Condition data from BMS and service](https://passport.kabin.sh/docs/en/integrations/workflows/condition-from-bms.md): A battery management system or a service tool reports measurements such as capacity fade or cycles; BatteryPass accepts newer measurements and publishes according to the organisation's policy. Key scopes: read, condition
- [Returns and repairs as lifecycle events](https://passport.kabin.sh/docs/en/integrations/workflows/returns-and-repairs.md): Completed repairs, inspections and component replacements from service or return orders appear as events in the unit's history. Key scopes: read, condition
- [Product change leads to a new model version](https://passport.kabin.sh/docs/en/integrations/workflows/product-change.md): A change to the product master in the ERP triggers a notification; a member creates a new model version in BatteryPass. Declared data is never written automatically. Key scopes: read
