Skip to main content

Connect SAP S/4HANA to Claude, ChatGPT and Copilot

SAP S/4HANA records order to cash and procure to pay end to end, from the sales order to the delivery, the billing document and the journal entry. Nexatron reads S/4HANA Cloud through SAP's released OData APIs, with GET requests only, and each person signs in as their own business user.

Nexatron's hosted MCP server is listed in Claude's connector directory. ChatGPT and Microsoft 365 Copilot add the same server as a custom MCP connector. Connect SAP S/4HANA to your Nexatron workspace once, then ask from whichever assistant you use.

What you can ask​

  • Which sales order items are still not fully delivered past their requested delivery date, by sales organization?
  • What was billed net amount by sold-to party last month, after credit memos?
  • How many outbound deliveries had goods issue later than planned this quarter, and for which plants?
  • Which suppliers have open purchase order items older than 60 days?
  • What share of last quarter's sales order value was delivered in full on the first delivery?
  • Which product groups had the largest drop in ordered quantity compared with the prior quarter?

Questions read released APIs such as Sales Order (API_SALES_ORDER_SRV: A_SalesOrder, A_SalesOrderItem), Outbound Delivery, Billing Document, Purchase Order, Business Partner (A_BusinessPartner, A_Customer, A_Supplier) and Product Master (A_Product). Filters, projections and counts are sent to SAP where they translate exactly; joins and other work run in Nexatron's memory for that query alone.

Prerequisites​

  • A Nexatron workspace admin.
  • An SAP S/4HANA Cloud tenant, with the OData services enabled through communication arrangements.
  • A communication user that setup reads $metadata and row counts as.
  • A business user for each person who asks questions.

Admin setup​

Nexatron reads S/4HANA Cloud through SAP's released OData APIs, enabled through communication arrangements.

  1. In Nexatron, go to Knowledge ▸ Sources ▸ New connection and choose SAP S/4HANA Cloud. Enter the tenant's API host (for example https://my123456-api.s4hana.cloud.sap), the OData services to read (such as /sap/opu/odata/sap/API_SALES_ORDER_SRV), and the communication user and password that setup reads $metadata and row counts as. It never answers a question, and a person linked to it is refused.
  2. On the connection's page, under Sign-in for each person, copy the redirect URI.
  3. In S/4HANA Cloud, create an OAuth client for the communication scenario your services belong to (Maintain Communication Arrangements), with that redirect URI.
  4. Paste the client ID and client secret and select Save client. Leave the sign-in and token addresses empty unless people sign in through SAP Cloud Identity Services.
  5. Choose who can use the connection.

How each person signs in​

Each person opens Knowledge ▸ Sources ▸ Your sign-ins and signs in on S/4HANA's own page (authorization code with PKCE). Nexatron holds and renews the token.

First question to try​

After you add Nexatron in Claude, ChatGPT or Copilot, ask:

Which suppliers have open purchase order items older than 60 days?

The answer shows the definition it used and the query behind it.

Permissions and masking​

Questions run under each person's own token, so the business roles and restrictions S/4HANA assigns to that user, such as by sales organization, plant or company code, decide what each answer can read. Setup keeps no values from any entity set, because each person may see different rows.

Nexatron's own rules under Settings ▸ Workspace ▸ Access (Access) apply on top: row rules limit rows and column masking hides a column's values. They narrow what S/4HANA allows and never widen it. A question that would total, average or count a masked column is refused in words, and an answer that ran under rules says so in its evidence. A query under Nexatron's rules is never pushed to SAP; it runs in Nexatron's memory, and masked values never leave it unmasked.

Troubleshooting​

SymptomCause and fix
Nexatron asks you to connect firstYou have not signed in to S/4HANA under Your sign-ins.
Your sign-in is refusedSAP returned HTTP 401. Sign in again under Your sign-ins.
An answer is refused for accessSAP returned HTTP 403: your business roles do not allow that entity set.
The answer says SAP is limiting requestsSAP returned HTTP 429 or 503 three times in a row after waiting. Try again later.
A question is refused as too largeIt needs more than the connection's row limit from one entity set (200,000 by default). Narrow it by date or organization.
You run S/4HANA on-premise or in a private cloudThis guide covers S/4HANA Cloud's released OData APIs. A system that exposes the same OData services through SAP Gateway is similar in principle; contact us with your release and landscape.