ERP

On this page

SAP S/4HANA

A test-only JSON OData v2 subset of the Business Partner and Sales Order A2X services. Create SAP S/4HANA under Systems → ERP. No SAP system, business partner master data, inventory or financial record is changed.

Testlie is independent of SAP. Names identify compatibility, not endorsement or SAP certification.

Authentication and CSRF

Replace the SAP host with the system's base URL. Send HTTP Basic authentication using the test communication username/password shown in the system. No real SAP or identity-provider credentials are accepted.

Before a write, GET either service root with X-CSRF-Token: Fetch:

text
<base>/sap/opu/odata/sap/API_BUSINESS_PARTNER
<base>/sap/opu/odata/sap/API_SALES_ORDER_SRV

Retain the returned X-CSRF-Token and SAP_SESSIONID_TEST_001 cookie. Send both on subsequent writes alongside Basic auth. Missing, foreign or rotated pairs return 403 with X-CSRF-Token: Required. The simulated pair remains valid until credentials rotate or the system is deleted; there is no real SAP login/session infrastructure.

Business partners

POST /sap/opu/odata/sap/API_BUSINESS_PARTNER/A_BusinessPartner:

json
{ "BusinessPartnerCategory": "2", "OrganizationBPName1": "Sample Company" }

Category 2 requires an organization name; category 1 requires FirstName and LastName. Optional BusinessPartner supplies a unique identifier of at most ten letters/digits/underscore/hyphen; otherwise a ten-digit ID is generated. Supported additional fields: organization second name, search term and correspondence language. No customer/supplier roles, addresses or financial master configuration is created.

GET a collection or /A_BusinessPartner('id'); PATCH supported scalar fields on an existing partner. Identifiers/categories are immutable after creation. Root deletion and additional navigation entities are unsupported.

Sales orders

POST /sap/opu/odata/sap/API_SALES_ORDER_SRV/A_SalesOrder:

json
{
  "SalesOrderType": "OR", "SalesOrganization": "1000",
  "DistributionChannel": "10", "OrganizationDivision": "00",
  "SoldToParty": "<existing test partner ID>",
  "to_Item": [{ "Material": "TEST-PART", "RequestedQuantity": "2", "RequestedQuantityUnit": "EA" }]
}

One to 100 item entries are supported. Quantities are positive decimal strings; item positions are unique numeric strings. These are test material references, without product master validation. GET /A_SalesOrder('id') reads the order; GET /A_SalesOrder('id')/to_Item reads its lines. PATCH updates supported header fields or replaces the supplied complete to_Item array. There is no independent item update API, posting, delivery, invoicing, availability, pricing, tax or credit calculation.

Responses and queries

Create returns 201 with { "d": { ... } }; PATCH returns 204. Collection data is in d.results, optional d.__count and d.__next. Metadata includes URI/type/ETag. An optional If-Match on PATCH enforces the current ETag or *; updates use atomic compare-and-swap and can return 412 on a conflict.

Supported collection options: $format=json, $select, $top (1–500), $skip (0–1000), $inlinecount=allpages, one $orderby field and literal $filter comparisons (eq/ne/gt/ge/lt/le) joined by and. Unsupported syntax, $expand, $batch, $metadata, XML and OData v4 are rejected.

Scenarios and limits

Rate-limit, server-error and response-delay scenarios apply. Decline rejects test entity writes. No webhook registration/events, OAuth, SAML/SSO, custom services or interactive Require action is simulated. Do not configure a webhook URL for this provider.

At most 500 records per entity and 128 KB per request. Shared storage scans the newest 1,000 records across entities; keep fixtures small. Plan retention and object limits apply. Use synthetic business/contact data only.

References: SAP's Business Partner API and Sales Order creation. This is a bounded integration test surface, not a full SAP tenant.