ZenHR and SAP S/4HANA Payroll Journal Technical Integration Guide

Modified on Thu, 11 Jun at 2:39 PM

1. Introduction


This document explains how to integrate ZenHR with SAP S/4HANA for payroll journal posting. It covers the SAP credentials and endpoints required, the expected journal entry format, and the ZenHR configurations needed to generate and send summarized payroll journals to SAP.


TABLE OF CONTENTS


Note: Most if not all clients are recommended to use SAP S4 Hana CPI. 


The purpose of this integration is to:

  • Automatically send payroll financial data from ZenHR to SAP
  • Eliminate manual journal entry posting
  • Ensure accurate and consistent financial records
  • Streamline coordination between HR, payroll, and finance teams

2. Integration Approach (Best Practice)


The integration follows the recommended best-practice flow below:

  1. Payroll is processed in ZenHR.
  2. ZenHR generates summarized journal entries.
  3. The summarized journals are sent to SAP S/4HANA.
  4. SAP validates and posts the journal entries.

3. Summary Journals (Standard Approach for SAP)


In this integration, ZenHR sends summarized journal entries to SAP. This means:

  • Financial data is aggregated.
  • Entries are grouped based on the required financial structure.
  • SAP receives clean and structured financial postings.

4. Requirements from SAP Side


Before activating the integration, the customer's SAP team must provide the required credentials, APIs, and posting endpoint.


To configure the setup in ZenHR, navigate to: Integrations → SAP S4/Hana Setup → Setup Page and follow the steps below.


4.1 SAP User Credentials


The SAP team must provide a technical SAP user with the required permissions to:

  • Create journal entries
  • Access GL accounts from the Chart of Accounts

The following details are required (Client Credentials / API Key):

  • Username
  • Password
  • A User ID to be used for sending journals

4.2 GL Accounts API


This API is used to fetch GL accounts from SAP so they can be matched correctly in ZenHR.


Example Endpoint

https://<your-sap-domain>/sap/opu/odata/sap/........


Note: The exact endpoint may vary depending on your SAP configuration.


Example Response


{
  "d": {
    "results": [
      {
        "ChartOfAccounts": "YCOAAA",
        "GLAccount": "1101010100",
        "Language": "EN",
        "GLAccountLongName": "Main"
      },
      {
        "ChartOfAccounts": "YCOAAA",
        "GLAccount": "1111010800",
        "Language": "EN",
        "GLAccountLongName": "Medicine"
      },
      {
        "ChartOfAccounts": "YCOAAA",
        "GLAccount": "2101010200",
        "Language": "EN",
        "GLAccountLongName": "Accounts Payable"
      },
      {
        "ChartOfAccounts": "YCOAAA",
        "GLAccount": "5302001000",
        "Language": "EN",
        "GLAccountLongName": "Salaries Expense"
      }
    ]
  }
}


4.3 Journal Entry Posting URL


This is the SAP endpoint that will receive the payroll journal sent from ZenHR.


Example Endpoint

https://<your-sap-domain>/sap/bc/srt/scs_ext/sap/journalentrycreaterequestconfi

 

Expected Journal Entry Format:


The following is an example of the XML format expected when posting payroll journals into SAP S/4HANA.


This sample is provided so the SAP team can:

  • Review the structure expected by ZenHR
  • Confirm whether the structure can be accepted directly
  • Adjust the format if needed based on their SAP CPI configuration
XML / Soap:


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
                  xmlns:sfin="http://sap.com/xi/SAPSCORE/SFIN">
    <soapenv:Header/>
    <soapenv:Body>
        <sfin:JournalEntryBulkCreateRequest>
            <MessageHeader>
                <ID>ZENHR_2025-12-01</ID>
                <CreationDateTime>2025-12-01T12:00:00.1234567Z</CreationDateTime>
            </MessageHeader>
            <JournalEntryCreateRequest>
                <MessageHeader>
                    <ID>ZENHR_2025-12-01_001</ID>
                    <CreationDateTime>2025-12-01T12:00:00.1234567Z</CreationDateTime>
                </MessageHeader>
                <JournalEntry>
                    <OriginalReferenceDocumentType>BKPFF</OriginalReferenceDocumentType>
                    <BusinessTransactionType>RFBU</BusinessTransactionType>
                    <AccountingDocumentType>SA</AccountingDocumentType>
                    <DocumentReferenceID>2</DocumentReferenceID>
                    <DocumentHeaderText>Payroll Journal - KSA Branch</DocumentHeaderText>
                    <CreatedByUser>CC0000000011</CreatedByUser>
                    <CompanyCode>1000</CompanyCode>
                    <DocumentDate>2025-12-01</DocumentDate>
                    <PostingDate>2025-12-01</PostingDate>
                    <Item>
                        <ReferenceDocumentItem>1</ReferenceDocumentItem>
                        <GLAccount>61100000</GLAccount>
                        <AmountInTransactionCurrency currencyCode="SAR">1001</AmountInTransactionCurrency>
                        <DebitCreditCode>S</DebitCreditCode>
                        <DocumentItemText>Basic Salary</DocumentItemText>
                        <AccountAssignment>
                            <CostCenter>1110001</CostCenter>
                        </AccountAssignment>
                    </Item>
                    <Item>
                        <ReferenceDocumentItem>2</ReferenceDocumentItem>
                        <GLAccount>21501000</GLAccount>
                        <AmountInTransactionCurrency currencyCode="SAR">-1001</AmountInTransactionCurrency>
                        <DebitCreditCode>H</DebitCreditCode>
                        <DocumentItemText>Accrued Salaries</DocumentItemText>
                    </Item>
                </JournalEntry>
            </JournalEntryCreateRequest>
        </sfin:JournalEntryBulkCreateRequest>
    </soapenv:Body>
</soapenv:Envelope>


5. Configuration Required in ZenHR


The following configurations must be completed in ZenHR before payroll journals can be sent to SAP S/4HANA.


5.1 GL Accounts Setup


All required GL accounts must be configured in ZenHR and must match the SAP Chart of Accounts exactly.


Navigate to Integrations → SAP S4/Hana Setup → GL Accounts. Here you will find your Chart of Accounts as a List of Values in every field.


Note: Please use this document to understand the GL fields: GL Accounts Explanation


5.2 Organizational Mapping


Any organizational levels used for financial grouping, such as departments or cost centers, must match SAP and carry the correct SAP Internal ID codes.


Navigate to Integrations → SAP S4/Hana Setup → Organizational Level.


On this page, the SAP Internal ID must be added for each organizational level that should appear in the journal entries.


5.3 Journal Entries Structure Setup


The journal entry structure must be configured in ZenHR to generate summary journals based on the agreed setup between the customer and ZenHR.


Navigate to System Preferences → Journal Entries Structure.


Note: Here is a documentation link to guide you through this page: Journal Entries Structure


6. Key Notes


Please keep the following points in mind before activating the integration:

  • This integration uses summary journals only.
  • All GL accounts must already exist in SAP.
  • GL accounts configured in ZenHR must match the SAP Chart of Accounts exactly.
  • Cost centers and financial dimensions must match SAP exactly.
  • The SAP team should review the sample XML structure before activation.
  • The SAP team must confirm whether the XML structure can be accepted as-is or requires adjustment based on their SAP configuration.
  • Successful journal posting depends on the accuracy of the GL account setup, organizational mapping, and journal entry structure in ZenHR.


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article