Finance APIs
|
This content was generated with the assistance of AI and should be verified against the official documentation before being relied on in production. |
Sooner or later a program outside SAP must hand an accounting entry to SAP S/4HANA, or read the entries that are already there: a web shop that books its daily takings, a payroll system that sends its totals, a reporting tool that wants the latest lines. SAP publishes ready-made interfaces for this in Finance, called APIs, and lists them in one catalog. This page shows how to read that catalog, how the synchronous SOAP service that posts a journal entry differs from its asynchronous bulk twin, how the OData service that reads journal entry items is called, which APIs read the master data of cost centers, profit centers and G/L accounts, and how a connection is authorized in the Public Edition through a communication arrangement. It is written against the SAP Help Portal for SAP S/4HANA 2025 FPS02 (on premise and Private Edition) and SAP S/4HANA Cloud Public Edition 2608. Every message and request on this page needs an SAP system and is not run here.
Before you read
-
Journal Entries, Document Types and Posting Keys: what a journal entry, its header and its lines are, because the SOAP service builds exactly one.
-
The Universal Journal (ACDOCA): where the lines end up and which released view reads them.
-
OData and SAP Gateway: what an OData service, an entity set and the query option
$topare. -
RFC, BAPI, IDoc and SOAP Integration: what a SOAP web service and a WSDL are.
-
SAP Integration Suite and the SAP Business Accelerator Hub: the public catalog where SAP publishes API descriptions.
Key terms
-
Finance API: a published, supported interface of SAP S/4HANA Finance, either an OData service or a SOAP service.
-
Journal entry: the SAP S/4HANA name for an accounting document; one header and several lines.
-
Communication arrangement: the Public Edition setting that switches a communication scenario on for one communication system and one user.
-
Communication scenario: SAP’s design-time description of which inbound and outbound services two partners use and how they authenticate.
-
Negative posting: a posting entered with an amount whose sign is opposite to the usual sign of its debit or credit side.
-
Application Interface Framework (AIF): the SAP component whose monitor shows the messages of the asynchronous services.
The "APIs in Finance" catalog
The SAP Help Portal has one page named "APIs in Finance". It holds a single table of every API available in Finance with four columns: the name, the technical name, the type (OData, OData V2, OData V4 or SOAP) and the application component it belongs to. The same page exists for SAP S/4HANA on premise and for the Public Edition, and the table is long: it covers General Ledger Accounting, Financial Planning and Analysis, SAP Credit Management, Cash and Liquidity Management, Receivables Management, Settlement Management, Treasury and Risk Management, Contract Accounting, Group Reporting, Convergent Invoicing and Joint Venture Accounting. The page states that the table can be filtered by several criteria and points to the SAP Business Accelerator Hub for the descriptions of the individual APIs.
Two details of reading it. The technical name is what you give a developer or search for in the Hub: an OData service is
named like API_JOURNALENTRYITEMBASIC_SRV, a SOAP service like JournalEntryCreateRequestConfirmation_In. And the table
mixes read APIs and write APIs, so the name says what it does, for example "Read", "Post" or "Create". A short selection from
the table for General Ledger Accounting and the master data around it:
| Name in the catalog | Technical name | Type | What it is for |
|---|---|---|---|
Journal Entry - Post (Synchronous) |
|
SOAP |
Post journal entries one request at a time and get the answer in the response. |
Journal Entry - Post (Asynchronous) |
|
SOAP |
Post large amounts of journal entries; the result is monitored afterward. |
Journal Entry by Ledger - Post (Asynchronous) |
|
SOAP |
Post journal entries asynchronously by ledger. |
Journal Entry - Change (Asynchronous) |
|
SOAP |
Change journal entries in bulk. |
Journal Entry - Clearing (Asynchronous) |
|
SOAP |
Clear items in bulk. |
Journal Entry Item - Read (A2X) |
|
OData |
Read journal entry items and some master data around them. |
G/L Account Line Items - Read (A2X) |
|
OData |
Read the line items of G/L accounts. |
G/L Account - Read |
|
OData |
Read G/L accounts in a chart of accounts. |
Cost Center - Read |
|
OData |
Read cost centers (listed under Financial Planning and Analysis). |
Profit Center - Read |
|
OData |
Read profit centers (listed under Financial Planning and Analysis). |
Company Code - Read |
|
OData |
Read company codes. |
The "What it is for" column paraphrases the names in the catalog and the pages cited below; the catalog gives names only, so read the API’s page in the SAP Business Accelerator Hub for its operations. That page can be read without signing in. This page does not sign in to the Hub and does not use an API key. The CAP import described in the CAP pages of this site needs a public EDMX file of the service, and the only login-free Apache-2.0 EDMX of an SAP API found for this site describes the Business Partner API, not a Finance API. For that reason nothing here imports a Finance API into a CAP project, and the listings below are labeled as requiring an SAP system.
Posting a journal entry: synchronous and bulk asynchronous
The synchronous service
SAP’s help for JournalEntryCreateRequestConfirmation_In describes an inbound SOAP service that posts journal entries from
external systems to the Public Edition system, and says you can extend it to your business needs. The request message holds
a MessageHeader node and a JournalEntryCreateRequest node, and the second may occur several times, so one web service
request can create several journal entries. Each JournalEntryCreateRequest carries its own MessageHeader and one
JournalEntry node with the data of the entry to create. Inside JournalEntry the item nodes follow, in the order the help
page lists, which SAP asks you to respect to avoid data loss:
| Item node | Line it describes |
|---|---|
|
A line on a G/L account. |
|
A line on a customer account. |
|
A line on a vendor account. |
|
A line on a tax account. |
|
A line on a withholding tax account. |
The header field TestDataIndicator, restricted to true or false (the default is false), simulates a posting and
returns a message instead of posting. When it is true it overrides the values of the same field in the service nodes. That
makes it the safe first call to try.
The answer comes back in the same exchange. For each JournalEntryCreateRequest the service returns either a
JournalEntryCreateConfirmation or an entry in the log. The confirmation holds AccountingDocument, CompanyCode and
FiscalYear; the log holds a result code, the highest message severity and message items. If several documents were
created, only the first document number is transferred. If posting failed, the document number is zero and the company code
and fiscal year of the payload are returned, so test for the zero before you trust a number.
The fields of the JournalEntry node that the help marks mandatory are OriginalReferenceDocumentType (the only allowed
value is BKPFF, accounting document direct input), BusinessTransactionType (RFBU for a normal FI posting, AZAF for a
down payment request), AccountingDocumentType, CreatedByUser, CompanyCode, DocumentDate and PostingDate. On a
Item node the mandatory ones are GLAccount and AmountInTransactionCurrency. A few rules from the node pages worth
knowing before the first call:
-
The transaction currency must be identical in all items of one journal entry.
-
The amount in company code currency is either filled in all items or in none.
-
If
DebitCreditCodeis not transferred, the system derives it from the plus or minus sign of the amount. The permitted values areS(debit) andH(credit). -
The service supports negative posting: a positive amount with
H, or a negative amount withS. The items must then be filled consistently, and a check named in the help reports a code that does not match the sign of the amount. -
The service checks whether a G/L account is tax-relevant; if it is and no tax code is given, the system reports that the account requires a valid tax code.
-
The posting keys of the generated entry are fixed by the node:
40for a debit and50for a credit onItem,ProductTaxItemandWithholdingTaxItem;01invoice and11credit memo onDebtorItem;21credit memo and31invoice onCreditorItem. The keys are the ones of the sibling page on journal entries. -
The service also supports a reversal posting through the header fields
ReversalReasonandReversalReferenceDocument.
The supported authentication methods named on the page are basic authentication and an X.509 certificate.
The asynchronous bulk twin
JournalEntryBulkCreationRequest_In takes the same business data, but processing happens afterward. SAP recommends this
asynchronous API for uploading large amounts of journal entry data, and the synchronous page says the same. The
differences that matter in practice:
-
The
IDof theMessageHeaderis mandatory; it is the key used to monitor the message, must be unique and shorter than 35 characters, and the service consumer chooses its format. The header also has a mandatoryCreationDateTime. -
The messages are processed in the Application Interface Framework. The Message Dashboard app monitors them under the namespace
/FINACand the interface nameJRNLENTRIN, and entries with errors can be reprocessed there. To avoid duplicates under the same message ID, SAP recommends changing the ID before reprocessing. The error log is kept for 60 days. -
An optional outbound service,
JournalEntryBulkCreationRequest_Out, sends the result back if the sender business system ID is set and matches the business system of the communication system. -
When you enable the API for the first time, the page says to create a communication arrangement for the scenario
SAP_COM_0002, or to reactivate an existing one by choosing Edit and then Save.
The catalog adds a third posting service, "Journal Entry by Ledger - Post (Asynchronous)", with the technical name
JOURNALENTRYBULKLEDGERCREATION; the asynchronous page names JournalEntryBulkLedgerCreationRequest_In as one of the
two interfaces that can trigger the outbound confirmation. The choice is the usual one between request-reply and a queue: the synchronous call tells the sender the document number at
once and suits a single posting that a person is waiting for, and the bulk call suits thousands of lines where the sender can
wait for a status.
A SOAP request with one debit and one credit
Example Trading Co. (company code EX01, euro) pays EUR 240.00 of office supplies from the petty cash box, the manual entry
of the page on journal entries. The request posts that entry through the synchronous service. The element names come from
the help pages cited above; the G/L account numbers, the user and the reference are made up for this site. The root element
of the request message and its namespace are not shown on the help pages used here, so they are marked as placeholders:
take both from the WSDL of the service in the SAP Business Accelerator Hub or from your system, and check the header fields
there too. The envelope has not been validated against the WSDL.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<!-- request element and namespace of the operation: take them from the WSDL -->
<MessageHeader>
<CreationDateTime>2026-11-13T12:00:00Z</CreationDateTime>
<TestDataIndicator>true</TestDataIndicator>
</MessageHeader>
<JournalEntryCreateRequest>
<MessageHeader>
<CreationDateTime>2026-11-13T12:00:00Z</CreationDateTime>
</MessageHeader>
<JournalEntry>
<OriginalReferenceDocumentType>BKPFF</OriginalReferenceDocumentType>
<BusinessTransactionType>RFBU</BusinessTransactionType>
<AccountingDocumentType>SA</AccountingDocumentType>
<CreatedByUser>EXAPIUSER</CreatedByUser>
<CompanyCode>EX01</CompanyCode>
<DocumentDate>2026-11-13</DocumentDate>
<PostingDate>2026-11-13</PostingDate>
<Item>
<ReferenceDocumentItem>1</ReferenceDocumentItem>
<GLAccount>0000476000</GLAccount>
<AmountInTransactionCurrency currencyCode="EUR">240.00</AmountInTransactionCurrency>
</Item>
<Item>
<ReferenceDocumentItem>2</ReferenceDocumentItem>
<GLAccount>0000113000</GLAccount>
<AmountInTransactionCurrency currencyCode="EUR">-240.00</AmountInTransactionCurrency>
</Item>
</JournalEntry>
</JournalEntryCreateRequest>
</soapenv:Body>
</soapenv:Envelope>
Requires an SAP system; not run here. The envelope follows the node structure and the sample fragments on the help pages
(ReferenceDocumentItem, GLAccount and AmountInTransactionCurrency with its currencyCode attribute are the names of
SAP’s own sample). The page does not set DebitCreditCode: SAP says it is then derived from the sign of the amount, so the
debit line carries a positive amount and the credit line a negative amount here. Because the page does not spell out which
sign it reads as credit when the code is missing, TestDataIndicator is true: send the request as a simulation first,
read the returned message, and only then send it with false. The balance check is the one of every entry, and the lines
add up to zero:
The expected answer, from the help text, is a JournalEntryCreateConfirmation with the document number, EX01 and the
fiscal year, or a log item with a message; a simulation returns a message and creates nothing.
Reading journal entry items over OData
API_JOURNALENTRYITEMBASIC_SRV is the OData service of the catalog entry "Journal Entry Item - Read (A2X)". The help page of
its operations gives five sample URLs, all with the HTTP method GET and all with $top=2: the entity set
A_JournalEntryItemBasic for the items themselves, and A_CompanyCode, A_CostCenter, A_ProfitCenter and
A_GLAccountInChartOfAccounts for the master data of the company code, the cost center, the profit center and the G/L
account that the items refer to. $top=2 asks for the first two rows only, which is how to try a service without pulling
a whole ledger. The first sample, as written on the page (<host> is your system):
GET <host>/sap/opu/odata/sap/API_JOURNALENTRYITEMBASIC_SRV/A_JournalEntryItemBasic/?$top=2
Requires an SAP system; not run here. No response is shown, because the field names of the returned rows are described by the
service’s metadata document, and this page does not copy them from memory. The metadata document, the $select option that
narrows the columns, $filter for one company code and the JSON format are explained with a runnable example on the page on
OData; they apply unchanged here. In a Public Edition system the host is the one of the tenant and the user is the
communication user of a communication arrangement; on premise the service is one of the Gateway services described on the
OData page, and the user needs the matching authorizations.
Master data APIs
Three of the catalog’s read services deliver the master data that a journal entry refers to. API_GLACCOUNTINCHARTOFACCOUNTS_SRV
("G/L Account - Read") returns G/L accounts, API_COSTCENTER_SRV ("Cost Center - Read") cost centers, and
API_PROFITCENTER_SRV ("Profit Center - Read") profit centers. The catalog lists the last two under Financial Planning and
Analysis, not under General Ledger Accounting, which is why a search for the General Ledger component misses them. The page
on Controlling and Cost Elements explains what the objects are; this page does not list the properties of the services, because
they are in the API description of the Hub and in each service’s own metadata. The operations page above shows the same
master data through A_CostCenter and A_ProfitCenter for a reader who already has the items open. The catalog also holds
SOAP services that create or send master data, for example the service named "Cost Center" with the technical name
CostCentreReplicationBulkRequest_In and "Profit Center Group and Hierarchy - Create, Update, Delete" with
ProfitCentreGroupHierarchyReplicationRequest_In; they are for replication from another system, not for reading.
Communication arrangements in the Public Edition
In the Public Edition a client does not log on with a dialog user. SAP’s help on communication management lists the order:
create the communication users for inbound calls (Maintain Communication Users app), create a communication system that
represents the calling system (Communication Systems app), then create a communication arrangement (Communication
Arrangements app) that selects the communication scenario and the system, and save it to activate. A communication scenario
is a design-time description that lists the inbound and outbound services, their type (OData or SOAP) and the authentication
methods they support, and, if it has inbound services, the authorizations needed to run them. Scenarios are either managed by
SAP or developed by the customer. The services of this page need a scenario that contains them; the asynchronous journal entry
page names SAP_COM_0002 for its service, and the scenario of each other service is named on the API’s page in the
SAP Business Accelerator Hub. On premise there is no communication arrangement: connections use the users, roles and
service activation of the SAP Gateway and SOAP configuration described on the pages on OData and on SOAP integration.
The following figure shows the three calls of this page between an external system and SAP S/4HANA.
The figure restates the descriptions above: the synchronous call answers in the same exchange, the bulk call is accepted first and processed in the Application Interface Framework, and the OData read is a plain request and response.
Which interface for which job
| Job | Interface | Why |
|---|---|---|
One posting that a person or a process waits for |
Journal Entry - Post (Synchronous) |
The document number comes back in the answer. |
A large upload, for example the daily takings of many shops |
Journal Entry - Post (Asynchronous) |
SAP recommends it for large amounts; errors are reprocessed in the AIF monitor. |
A reporting tool that needs the latest lines |
Journal Entry Item - Read (A2X), |
A read service with query options such as |
Cost centers, profit centers and G/L accounts for a pick list |
|
Read services for master data. |
Supplier invoices |
The supplier invoice APIs |
The journal entry page itself recommends them over a journal entry for supplier invoices. |
Neither of the two finance books checked for this site, the Jotev book (Configuring SAP S/4HANA Finance, 3rd edition, 2025) and the Okungbowa book (SAP S/4HANA Financial Accounting Configuration, 2nd edition, 2023), has passages on these interfaces in the text read for this site, so the SAP Help Portal and the SAP Business Accelerator Hub are the sources for Finance APIs.
Summary
-
SAP lists every Finance API on one catalog page, "APIs in Finance", with the technical name, the type and the application component; the details of each API are in the SAP Business Accelerator Hub, which can be read without signing in.
-
JournalEntryCreateRequestConfirmation_Inposts journal entries synchronously and answers with a confirmation or a log;JournalEntryBulkCreationRequest_Intakes the same data asynchronously and is monitored in the AIF Message Dashboard. -
One
JournalEntrynode holds the header and the items; the lines must balance, andTestDataIndicatorsimulates a posting instead of making it. -
API_JOURNALENTRYITEMBASIC_SRVreads journal entry items over OData;GET .../A_JournalEntryItemBasic/?$top=2returns the first two rows, and the cost center, profit center and G/L account services read the master data. -
In the Public Edition a communication user, a communication system and a communication arrangement for a communication scenario authorize the calls.
References
-
Journal Entry - Post (Synchronous) (SAP Help Portal, Cloud Public Edition)
-
Journal Entry - Post (Asynchronous) (SAP Help Portal, Cloud Public Edition)
-
Operations for Journal Entry Item - Read (A2X) (SAP Help Portal, Cloud Public Edition)
-
Communication Management (SAP Help Portal, Cloud Public Edition)