When enterprises run on SAP S/4HANA for finance and operations, and Keka for people and payroll, integration isn’t a luxury-it’s a necessity. But this isn’t just about syncing spreadsheets. It’s about real-time harmony between your finance and HR ecosystems.
Imagine a world where updating an employee’s department in Keka instantly reflects in SAP’s cost center mapping. Where payroll registers flow seamlessly to finance without a single manual upload. Where every promotion, transfer, or expense claim triggers automated workflows across both platforms.
That’s the power of a custom SAP-Keka integration- driven by smart APIs, robust architecture, and business logic that actually understands how enterprises operate.
In this guide, we’ll walk you through real-world integration strategies, system architecture options, and critical watchouts- so your organization can move from disconnected silos to synchronized scal
Integration objective
To enable smooth data exchange between SAP and Keka in the following areas:
-
Employee master sync (bi-directional)
-
Job and personal detail updates
-
Expense claims (bi-directional)
-
Monthly payroll (uni-/bi-directional based on process owner)
Scope of integration
Keka API capabilities
-
API flexibility: Keka provides REST-compliant APIs that return data in JSON format. Clients may manipulate this data to match their target system schema.
-
API direction: All API push/pull operations are initiated from the client (SAP) side.
-
No third-party API ingestion: Keka does not support direct consumption of external APIs.
Employee master data sync
Use case 1: New employee creation in Keka → Push to SAP
-
Flow: When a new employee is created in Keka, SAP fetches the details to create a corresponding employee record.
-
Supports bi-directional synchronization, allowing for seamless data flow between systems. For more details, please refer to the following links.

-
Key fields: Employee Code, Full Name, Email, Department, Location, etc.
Note: SAP-specific fields such as Business Unit and Legal Entity are mapped from Keka’s ![]()
Use case 2: Bi-directional sync of job and personal detail
Flow: Changes in employee job or personal details in either system sync to the other.
-
Custom Field Sync: SAP-generated Vendor ID is synced to Keka.
-
Frequency: Near real-time or hourly sync, as scheduled from SAP.
Employee Creation on SAP → Pushed to Keka
A POST API is available to create an employee in Keka from SAP.![]()
Please ensure all mandatory fields are passed for successful employee creation.
Once the employee is created, the API responds with the employee identifier of the newly created employee.
Expense policy and GL integration
Expense policy setup in Keka (mirrored with SAP)
-
Create the expense policy in Keka.
-
Set up matching expense categories (same names as SAP).
-
Assign GL codes to each category on Keka, based on SAP mapping.
Use case 1: Expenses raised on Keka, processed in SAP
Use case 2: Expenses raised in SAP, Pushed to Keka
-
Employees raise and approve expenses in SAP.
-
For record-keeping, expenses are synced to Keka using:
A new expense claim is submitted through a POST request.

The customer fetched all expense categories from Keka to SAP for alignment.

Note: Expense category names must match exactly in both systems (e.g., “Fuel” on SAP and Keka).
Payroll integration
Scenario 1: Payroll processed in Keka, released in SAP
In Keka, set each component’s Accounting code to the matching SAP GL code: Keka Portal → Payroll → Settings → Components → Accounting Code → Edit → Update. These Accounting codes will now function as your GL codes in SAP.
-
Run payroll on Keka.
-
SAP fetches pay register.
-
Salary disbursement is handled from SAP.
Scenario 2: Payroll processed in SAP, visible in Keka
-
Skip payroll processing in Keka.
-
Upload summary manually using downloadable import options.
Integration Challenges & How We Solved Them
At Keka, we know every integration has its quirks- especially when syncing with systems like SAP or QuickBooks. Here’s how we tackled some common challenges during recent deployments.
1. Component-wise Pay Register Summary
Challenge:
SAP required a summary of pay components (like Basic, HRA, etc.) in a consolidated format. But Keka’s API provides raw line-item data, not client-specific totals.
Our Solution:
We shared a custom script via API to fetch detailed salary data. Since every customer calculates totals differently, we advised the SAP team to build the final summary on their end using the API output. This gave them the flexibility they needed.
2. Tax Computation
Challenge:
The client wanted Keka to handle tax declarations but compute actual tax in SAP- without running payroll in Keka.
Our Solution:
We clarified that tax computation in Keka is auto-linked to payroll. Without running payroll, tax cannot be calculated. The client agreed to retain declarations in Keka but handle final tax processing externally (in QuickBooks or SAP).
3. LOP (Loss of Pay) Reversal Logic
Challenge:
The payroll team needed a way to reverse LOPs based on previous month’s leave data.
Our Solution:
Keka’s
API allowed them to pull historical leave data. QuickBooks used this data to apply LOP reversal logic in their system—ensuring accurate payslips.
4. S4 HANA Real-time Sync
Challenge:
SAP wanted real-time updates for activities like employee creation, job changes, or expense approvals.
Our Solution:
We enabled webhook-based triggers in Keka for key events. This allowed SAP to listen to these triggers and instantly sync changes on their side—ensuring up-to-date records at all times.
Summary
| Challenge | What We Did |
|---|---|
| Component-wise Pay Summary | Shared API + flexible format for SAP to compute totals independently |
| Tax Computation | Retained declarations in Keka; computed tax externally |
| LOP Reversal | Used Keka’s leave data API to support logic in QuickBooks |
| S4 HANA Real-time Sync | Enabled webhooks for instant data push to SAP |
Decision checklist for SAP–Keka integration
| Question | Recommended Action |
|---|---|
| Where is payroll processed? | If on Keka, use Payroll APIs. If on SAP, integration is for display only. |
| Do you need one-way or two-way sync? | Bi-directional sync supported for selected domains. Use Keka's POST/PUT APIs. |
| What SAP modules are used? | HR, Finance, Projects – Define scope clearly. |
| Preferred integration method? | API-based (recommended). File-based (SFTP/Email) for HR reports if needed. |
Webhooks for D365 (SAP): Real-time Sync from Keka
What You Can Automate
| Keka Event | Action in SAP |
|---|---|
| Employee Created | Auto-create employee record |
| Job Details Updated | Sync updated job role or department info |
| Personal Info Changed | Reflect name, contact, or ID changes |
| Leave Requested | Trigger leave recording in SAP |
| Expense Submitted | Notify SAP to begin reimbursement processing |
| Expense Approved | Record approval status in SAP |
| Exit Initiated | Block or deactivate employee ID |
Setup & Support
Where to Configure:
Admin Panel → Integrations → Webhooks
Need Help?
Your CSM and the Keka Support Team are available to assist with:
-
Endpoint setup
-
Testing connections
-
Securing event delivery
Why Use It? - Real-time sync
- No manual updates
- More accurate records in SAP
Conclusion
Keka provides flexible and secure APIs to enable SAP integration across HR, Attendance, Expense, and Payroll domains. Whether your SAP is a standard enterprise version or a custom-tailored instance, Keka’s APIs are robust, REST-compliant, and ready for enterprise-scale implementation. Let Keka handle the HR engine—so SAP can drive the rest.
For more detailed documentation, visit: developers.keka.com
Please let us know if you find this article helpful.



Comments
0 comments
Please sign in to leave a comment.