Connect to SAP S/4HANA Cloud
Connect PlaidCloud directly to SAP S/4HANA Cloud Public Edition over its OData and SOAP APIs to pull trial balance and journal entry item data with no OData to hand-write, and post journal entries back. This guide covers the connection, the import step, and the post step.
Prerequisites
Section titled “Prerequisites”You need, in SAP S/4HANA Cloud:
- A Communication Arrangement built on a Communication Scenario that exposes the Trial Balance and Journal Entry Item APIs (read) and the journal entry posting service (write), with a Communication User configured for OAuth2 client-credentials rather than basic auth.
- Your S/4HANA Cloud tenant’s host (for example
https://yourorg.s4hana.ondemand.com) and its OAuth2 token URL (for examplehttps://yourorg.s4hana.ondemand.com/sap/bc/sec/oauth2/token). - The Communication Arrangement’s OAuth2 client ID and secret.
Create the Connection
Section titled “Create the Connection”-
Open Tools > Connections and click
New Connection. -
Choose SAP S/4HANA Cloud from the menu.
-
Fill in the fields:
Field Value Name A friendly name, e.g. S/4HANA Cloud Prod.Host Your S/4HANA Cloud tenant host, e.g. https://yourorg.s4hana.ondemand.com.Token URL The Communication Arrangement’s OAuth2 token endpoint. Client ID The Communication Arrangement’s OAuth2 client ID. Client Secret The Communication Arrangement’s OAuth2 client secret. -
Click
Create.
Smoke-Test the Connection
Section titled “Smoke-Test the Connection”-
Add an Import S/4HANA Entity step to a workflow.
-
Set S/4HANA Connection to your connection, Entity Type to
trial_balance, add a CompanyCode filter for one company, and set Target Table to a scratch table. -
Run the step (see Running one step in a workflow).
A populated target table confirms the host, token URL, and client credentials are all correct. An error names the problem — a bad client secret, a Communication Arrangement missing the required scope, or a wrong host.
Import Data
Section titled “Import Data”-
Add an Import S/4HANA Entity step and set S/4HANA Connection and Target Table.
-
Set Entity Type to the record you want.
-
Add Filters to bound the pull — company code, account, and date ranges are translated into the request’s OData
$filter, restricted per entity to the fields S/4HANA can actually filter on server side. -
Run the step and check the target table.
Entities and Filters
Section titled “Entities and Filters”| Entity Type | What it pulls | OData Service | Filterable fields |
|---|---|---|---|
trial_balance |
Aggregated period-end GL account balances | API_OPLACCTGDOCITEMCUBE_SRV |
CompanyCode, GLAccount, CostCenter, ProfitCenter, FiscalYear, FiscalPeriod, Ledger |
journal_entry_items |
Posted journal entry line items | API_JOURNALENTRYITEMBASIC_SRV |
CompanyCode, GLAccount, CostCenter, ProfitCenter, PostingDate (range), FiscalYear, FiscalPeriod, Ledger |
Post Journal Entries
Section titled “Post Journal Entries”The S/4HANA: Post Journal Entry step posts general ledger journal entries through PlaidCloud’s shared ERP write pipeline, using S/4HANA Cloud’s SOAP journal-entry bulk-create service.
-
Build a header table — one row per journal entry — with
journal_id(your entry identifier),company_code,document_date,posting_date,fiscal_year,ledger, andheader_text. -
Build a lines table — one or more rows per
journal_id— withgl_account,debit,credit, and anycost_center/profit_centerdimension columns your ledger requires. -
Add an S/4HANA: Post Journal Entry step, set S/4HANA Connection, Header Table, Lines Table, and a Result Table.
-
Leave Validate Only checked and run the step — PlaidCloud builds and checks every entry without a ledger claim and without posting anything.
-
Review the result table (one row per entry:
journal_id,natural_key,confirmation_id,status,message). Fix anyerrorrow and re-validate. -
Uncheck Validate Only and run again to post for real. Leave Continue On Error checked unless you want a batch to stop dead on its first failed entry.
How Posting Works
Section titled “How Posting Works”PlaidCloud submits each journal entry via S/4HANA Cloud’s JournalEntryBulkCreateRequest_In SOAP service, then polls for the corresponding JournalEntryBulkCreateConfirmation_Out message that reports the entry’s terminal processing state. An entry is only reported posted once that confirmation is received — an entry that’s accepted but whose confirmation never arrives stays quarantined rather than being recorded as posted, so a stuck submission never silently passes as success. PlaidCloud’s own ledger claim guards against posting the same entry twice on a retried or re-run batch.
Correcting a Posted Entry
Section titled “Correcting a Posted Entry”This step never deletes or rewrites a posted entry. To correct one, post a new entry with debits and credits swapped against the original — a posted reversing entry — rather than editing the original in place. This preserves S/4HANA’s own audit trail and matches how corrections are made directly in the application.
Capability Limits — Read Before Posting Live
Section titled “Capability Limits — Read Before Posting Live”Related
Section titled “Related”- SAP S/4HANA Cloud REST Connector — field reference.
- Import S/4HANA Entity
- S/4HANA: Post Journal Entry
- Review ERP Post History — the standing record of every S/4HANA Cloud post attempt and its live state.
- Create and Manage a Connection