Setup guide · SAP S/4HANA Cloud payroll journals · Coming soon
Set up SAP S/4HANA Cloud payroll journals: step by step
This guide is for two people working together: your SAP S/4HANA Cloud administrator, who creates the communication user and arrangements, and the person who runs payroll in AhlanHamad, who connects them and maps the accounts with your accountant. Follow it in order. Every AhlanHamad label below is the one you will see on screen.
Updated 14 October 2026
1. Before you start
Coming soon. Posting payroll journals to SAP S/4HANA Cloud is switched off. You can do the SAP side (sections 2 and 3) now, and you can already connect: the connection reads your chart of accounts and posts nothing. Until we switch posting on for your company, the Field Mapping tab says “Posting payroll journals to SAP S/4HANA Cloud isn't switched on for your workspace yet.”
| Check | What you need |
|---|---|
| Where it stands | Built against SAP's documentation for SAP S/4HANA Cloud Public Edition, and tested only against a simulated SAP system. It hasn't posted to a real SAP S/4HANA Cloud system yet, so start in your Quality (test) system, not production, and check your first journal entries closely. |
| SAP S/4HANA Cloud | SAP S/4HANA Cloud Public Edition only. This is not SAP S/4HANA Cloud Private Edition, RISE with SAP or on-premise: those have no communication arrangements, and this connector was not built for them. |
| Sign-in | A communication user with a user name and password, nothing else. There is no API key and no OAuth client: SAP's Journal Entry - Post service accepts a communication user or a certificate, and AhlanHamad uses the communication user (SAP Help). |
| Currency and decimals | Journal entries are posted in the company code currency. Three-decimal amounts (KWD, BHD, OMR) are sent with three decimals; we haven't yet seen how a real system rounds them, so check the first entry. |
| An SAP administrator | Someone with the administrator business role (SAP_BR_ADMINISTRATOR) who can use the Maintain Communication Users, Communication Systems and Communication Arrangements apps. Your SAP consultant or accountant should also confirm the two settings in section 3. |
| In AhlanHamad | A company admin who can manage settings (to connect and save the mapping), and the person who finalizes and pays payroll. Your accountant should help with the mapping and choose the payroll cost center. |
Only totals are sent to SAP S/4HANA Cloud: one line per account, never a line per employee. Names, IDs and individual salaries stay in AhlanHamad.
2. In SAP S/4HANA Cloud: create the communication user and system
In SAP S/4HANA Cloud Public Edition, an outside system calls your SAP system as a communication user, through a communication system that represents it, and only for the services in the communication arrangements it is assigned to (SAP Help: communication management). Sign in to the SAP Fiori launchpad as the administrator. The screen may be named differently in your version.
- Open the Maintain Communication Users app and choose New. User Name: for example
AHLANHAMAD. Description: for exampleAhlanHamad payroll journals. Set a strong password (the app can propose one) and copy it now (SAP Help: create a communication system and user). - Open the Communication Systems app and choose New. System ID and System Name: for example
AHLANHAMAD. AhlanHamad only calls into your system and never receives calls from it, so no outbound users or services are needed. If your version insists on a host name, ask us before you fill it in. - Under Users for Inbound Communication, add the communication user from step 1 with the authentication method User Name and Password. Save the communication system.
- Keep the user name and password for section 4. The password is entered once in AhlanHamad and never shown again there.
3. In SAP S/4HANA Cloud: the three communication arrangements
AhlanHamad needs three communication arrangements, all on the communication system from section 2 and with the same inbound communication user. Each one opens a set of SAP services to that user, and nothing else (SAP Help: create a communication arrangement; APIs for General Ledger Accounting).
| Communication scenario | What AhlanHamad does with it |
|---|---|
SAP_COM_0002 | Posts each payroll journal entry, and its reversal, through Journal Entry - Post (Synchronous) (SAP Help). |
SAP_COM_0087 | Reads your company codes, G/L accounts and cost centers (Company Code, G/L Account and Cost Center read services; cost centers). The connect test uses this one. |
SAP_COM_0303 | Reads G/L account line items, to find an entry it already posted before posting again, and to check whether an entry is already reversed (SAP Help). |
- Open the Communication Arrangements app and choose New. Scenario:
SAP_COM_0002. Keep the proposed arrangement name or enter your own, then Create. - Under Common Data, choose the communication system from section 2. Check that the inbound communication user is the one from section 2 and that the authentication method is user name and password. Leave outbound services off. Save.
- Do the same for
SAP_COM_0087andSAP_COM_0303, with the same communication system and the same user. SAP shows each scenario's own name in the app; it may read differently from the short descriptions on our connect page (SAP Help: display communication scenarios). - On any of the three arrangements, copy the API URL shown for inbound communication. It looks like
https://my123456-api.s4hana.cloud.sap(older systems may end in.s4hana.ondemand.com). Note the-api: your Fiori launchpad address (https://my123456.s4hana.cloud.sap) doesn't accept these calls. - Ask your SAP consultant or accountant to confirm two settings we haven't been able to check on a real system: that journal entries of document type
SAcan be posted through this service, and that reversal reason02exists and allows a posting date other than the original's. Also choose the cost center payroll costs should go to, in the company code payroll posts to.
4. In AhlanHamad: connect SAP S/4HANA Cloud
- Go to Integrations and open SAP S/4HANA; the page is called SAP S/4HANA Cloud. Stay on the Connection tab. The card is called S/4HANA Connection and says “Connect to your SAP S/4HANA Cloud system using Communication User credentials”; the box under it repeats sections 2 and 3 in short.
- Environment URL: the API URL from section 3, for example
https://my123456-api.s4hana.cloud.sap. Only the address up to.cloud.sapis kept, so pasting the arrangement's full service URL works too. If you paste your Fiori launchpad address (https://my123456.s4hana.cloud.sap), AhlanHamad adds-apiand says “We changed this to your system's API host:” with the new address. - Communication User: the user name from section 2. Password: its password. It is “Stored encrypted; never shown again.”
- Click Connect & Verify. While it checks, the button says Verifying Connection. AhlanHamad reads your company code service as a test; when SAP answers you see “Connection successful!” and the card shows Connected to SAP S/4HANA Cloud with the Environment URL.
The test only proves SAP_COM_0087. SAP_COM_0303 and SAP_COM_0002 are first used when the first journal is sent; if one is missing, that journal shows Failed with the 403 message in section 8.
There is no button to replace the password on a working connection. To change it (for example after a new password in SAP), click Disconnect S/4HANA, then enter the Environment URL, user and new password again and click Connect & Verify. Connecting to the same address keeps your company code, cost center and mapping; connecting to a different address (another SAP system) forgets them. The Sync Settings tab is not used for payroll journals.
Already sending payroll to another accounting system? If another one is connected and receiving payroll, AhlanHamad asks first: “Connect a second accounting system?” If you connect SAP S/4HANA Cloud too, every payroll run is posted to both and your payroll costs are booked twice. If you are moving to SAP S/4HANA Cloud, click Cancel, disconnect the other system first, then connect SAP S/4HANA Cloud.
5. Pick the company code and cost center, and map your accounts
- Open the Field Mapping tab. The card is called Post payroll journals to SAP S/4HANA Cloud.
- Click Load my accounts. If the communication user reaches more than one company code, Choose the company asks which one payroll journals go to; each is listed by its code and name.
- Payroll cost center: pick it under Choose a cost center. The card explains: “SAP S/4HANA needs a cost center on every expense line posted to a cost element (G/L account type “Primary costs or revenue”). Payroll journals carry totals only, so they all go to this one cost center; balance-sheet lines carry none.” Until one is chosen it says “Posting is on hold until a cost center is chosen.” Only cost centers of that company code that are valid today and not blocked for primary costs are listed.
- Map each Ahlan Hamad account to an SAP S/4HANA Cloud account (table below). Some are pre-selected and marked Suggested when the match is clear; check every one with your accountant.
- Click Save mapping. Until every required account is mapped the card says “Runs that use an unmapped account are held until it is mapped.”
- If you pay any payroll in a currency other than the company code currency, decide on Post runs in other currencies (section 6).
Which G/L account for each payroll account
| Code | Ahlan Hamad account | Needed | Typical SAP G/L account type |
|---|---|---|---|
| 5100 | Salaries — basic, other allowances, overtime & additions | Required | Primary costs or revenue (P) |
| 5400 | Housing allowance | Required | Primary costs or revenue (P) |
| 5500 | Transport allowance | Required | Primary costs or revenue (P) |
| 5200 | Employer social-insurance contribution | Required | Primary costs or revenue (P) |
| 5300 | End-of-service expense | Required | Primary costs or revenue (P) |
| 2100 | Net salaries payable | Required | Balance sheet account (X) |
| 2200 | Social insurance payable (employee + employer) | Required | Balance sheet account (X) |
| 2300 | End-of-service provision | Required | Balance sheet account (X) |
| 1101 | Bank account salaries are paid from | Required | Cash account (C), or a salary clearing balance sheet account (X) |
| 2700 | Deductions withheld (loans, penalties, unpaid leave) | Only if used | Balance sheet account (X) |
| 5810 | Bank transfer charges on salaries | Only if used | Primary costs or revenue (P) |
| 5310 | DIFC DEWS employer contribution | Only if used | Primary costs or revenue (P) |
| 2310 | DIFC DEWS payable | Only if used | Balance sheet account (X) |
| 5900 | Foreign-exchange gain/loss on payroll (only if a run in another currency is paid at a different rate) | Only if used | Your exchange gain or loss account |
- Some accounts can't be picked. The card says why: “Secondary cost elements are greyed out: they take no financial posting. Blocked accounts aren't listed. SAP can't tell us which accounts are customer or vendor reconciliation accounts — if you pick one, SAP refuses the journal and it is held here until you change the mapping.”
- One payroll cost center, nothing finer. Lines on accounts of type “Primary costs or revenue” carry the cost center you chose; balance sheet lines carry none. No cost centers per employee or department are sent: every expense line on a cost element goes to the one payroll cost center.
- 1101 is a G/L account. Map it to the G/L account your salaries are paid from, or to a “Salary clearing” balance sheet account that you clear when you reconcile the bank. Ask your accountant which your company uses.
End-of-service is not on the payroll journal. It is its own journal entry each month (5300 End-of-service expense / 2300 End-of-service provision).
6. What gets posted, and when
| When this happens in AhlanHamad | SAP S/4HANA Cloud receives | Dated |
|---|---|---|
| A payroll run is finalized (Finalize) | Payroll accrual: salaries and allowances, employer social insurance and the payables they create (debits 5100–5500, credits 2100, 2200 and, if used, 2700) | The last day of the payroll month |
| The run is paid (Mark as Paid, or CEO Sign-off & Pay) | Salary payment: debit 2100 Net salaries payable, credit 1101 | The day the run was signed off and paid |
| Bank transfer charges are recorded on a paid run | Bank charges: debit 5810, credit 1101 | The pay day |
| A month ends | End-of-service accrual: debit 5300, credit 2300 — sent automatically on the 1st of the next month. You can also run it by hand for a finished month with Run Monthly Accrual on the Finance page. | The last day of that month |
| A run is deleted, or a posted journal is corrected | A reversal: when the original is in the same company code, SAP's own reversal of that entry, linked to it (reversal reason 02); an entry SAP already shows as reversed is not reversed twice. If SAP refuses the reversal (for example because the original is cleared), or the original is elsewhere, a new journal entry with debit and credit swapped is posted instead. A corrected run is then posted again as a new journal entry. | The day of the change |
- Each journal is posted through Journal Entry - Post (Synchronous) as one journal entry of document type
SAin the company code you chose (journal entry fields). Its DocumentReferenceID and every line's AssignmentReference carry our marker (AHfollowed by 12 letters and digits), and Reference1InDocumentHeader carries AhlanHamad's reference (for examplePAY-KW-2026-10) (line fields). - Each journal is sent once. The service has no duplicate check of its own, so before posting AhlanHamad looks for the marker in the G/L account line items of the leading ledger
0L; if a cut-off attempt already posted it, that entry is used instead of a second one. - We never edit or delete a journal entry in SAP S/4HANA Cloud. Corrections are always new entries: the reversal first, then the corrected run as a new entry (SAP Help: reversal).
- Amounts are in the company code currency. A run in another currency is held unless you switch on Post runs in other currencies; then it is converted at AhlanHamad's daily exchange rate. The rate is not sent to SAP: the entry has no field for it.
- Runs finalized or paid before you saved the mapping are not sent on their own. Open each run and press Send this run's journals to SAP S/4HANA Cloud. The mapping card lists them under “Earlier runs not sent to SAP S/4HANA Cloud yet”.
- End-of-service months booked before you connected are listed on the mapping card. Press Send them, check the list of months and amounts, and confirm. They go oldest first, each dated at its own month end.
The reference tells you where each entry comes from: PAY-KW-2026-10 for the October 2026 Kuwait payroll accrual, PAY-KW-2026-10-PMT for its salary payment, PAY-KW-2026-10-FEES for its bank charges, IND-KW-2026-10 for that month's end-of-service accrual (the country code is the run's own). The header text is the first 25 characters of the journal's description, and each line's text says what it is. A reversal posted as a new entry has a header text starting Rev and the original's marker.
7. Check your first payroll in SAP S/4HANA Cloud
- In AhlanHamad, open the payroll run. The SAP S/4HANA Cloud journals card lists each journal (Payroll accrual, Salary payment, …) with its status. Posted means SAP has it.
- In SAP, open your journal entry list (for example Manage Journal Entries; the screen may be named differently in your version) and search for the marker the run card shows (
AH…) in the document reference field, or for the reference (PAY-…). - Check: the posting date (the last day of the payroll month for the accrual), document type
SA, one line per mapped account, the payroll cost center on the expense lines, and totals that match the payroll run in AhlanHamad. - Before you rely on corrections, delete or correct a test run once and check that SAP's reversal (reason
02) arrives as expected.
Statuses on the run card: Queued and Sending (on its way), Waiting (another journal must reach SAP S/4HANA Cloud first), Retrying (SAP S/4HANA Cloud or the network was busy; we try again automatically), Posted, On hold (needs you; the reason is shown), Failed (SAP S/4HANA Cloud refused it; the reason is shown), Not needed (nothing to send; the reason is shown).
8. Troubleshooting
Company admins who can manage settings, and finance managers, also get an in-app notice and an email when SAP S/4HANA Cloud journals are held or fail: one per problem, a reminder after three days, and a short note when it clears. No amounts, names or SAP S/4HANA Cloud errors are put in the email; open the payroll run to see the reason.
When connecting (Connection tab)
| What you see | What to do |
|---|---|
| Please fill in all fields | Fill in the Environment URL, the communication user and the password, then click Connect & Verify. |
| Enter the full address, for example https://my123456-api.s4hana.cloud.sap. | The address couldn't be read. Copy the API URL from a communication arrangement (section 3). |
| SAP S/4HANA refused the communication user (…). Check the user name and password, and that the user is assigned to communication arrangements for SAP_COM_0002 (posting), SAP_COM_0087 (company code, G/L accounts, cost centers) and SAP_COM_0303 (G/L account line items). Use the API URL shown on the arrangement (https://my<id>-api.s4hana.cloud.sap). | Check the password (type it again), that the user is the inbound user of the communication system, and that the SAP_COM_0087 arrangement is saved with that system. The card also shows this under Connection error. |
| Connection failed (…): … | SAP answered, but not as expected: often the address is not the API host. Use the API URL from the arrangement, then connect again. |
| Something glitched on our end — give it another go? | Try again. If it repeats, check the address starts with https:// and is your SAP system's public address: AhlanHamad refuses http:// and private addresses. |
When loading your accounts (Field Mapping tab)
| What you see | What to do |
|---|---|
| Could not read the SAP S/4HANA Cloud company (…). … | SAP refused or didn't answer the company code read. Check the SAP_COM_0087 arrangement, then click Reload accounts. With 401 or 403, connect again with the right password. |
| SAP S/4HANA did not report company code …'s currency. | Ask your SAP consultant to check the company code's currency, then click Reload accounts. |
| Could not read the SAP S/4HANA Cloud journals (…). | On this page “journals” are the cost centers: SAP refused the cost center read. Check the SAP_COM_0087 arrangement, then click Reload accounts. |
| Your cost center is not in the Payroll cost center list | Only cost centers of the chosen company code, valid today and not blocked for primary costs, are listed. Fix it in SAP, then click Reload accounts. |
On the payroll run: On hold
A held journal is waiting, not lost. Fix the reason and it goes, either by itself or when you press Retry on the run card.
| What you see | What to do |
|---|---|
| Map these accounts first: 5400, 5500. | Map the listed account codes on the Field Mapping tab and click Save mapping, then Retry. |
| Load your accounts and save the mapping on the integration page first. | On the Field Mapping tab, click Load my accounts, choose the company code and the Payroll cost center, save the mapping, then Retry. This also shows when the Environment URL now points at a different SAP system than the saved setup. |
| … mapped to an account that can't be used in a journal (Accounts Payable or Receivable, a system or bank account, or an account with no code). Pick another account on the integration page. | In SAP terms: a secondary cost element, or a customer or vendor reconciliation account (SAP refuses those, and the journal is held here instead of failing). Map those codes to an ordinary G/L account, save, then Retry. |
| This run's currency differs from your books. Allow other-currency posting to send it. | Switch on Post runs in other currencies on the Field Mapping tab, then Retry. Or keep that run out of SAP S/4HANA Cloud. |
| The connection needs to be renewed. Reconnect and try again. | SAP stopped accepting the communication user: usually its password was changed, or the user or communication system was deleted. It also shows for a connection saved earlier with an API key or OAuth client, which can't post. On the Connection tab, enter the Environment URL, user and password and click Connect & Verify (if the page still says Connected to SAP S/4HANA Cloud, click Disconnect S/4HANA first). Journals held for this reason are sent automatically once you reconnect. |
| Not connected, or posting is switched off. | Connect SAP S/4HANA Cloud again on the Connection tab. Held journals are sent automatically once you reconnect. If SAP S/4HANA Cloud is connected and you still see this, ask us: posting may have been switched off for your company. |
On the payroll run: Failed
These come back from SAP S/4HANA Cloud, in English, with SAP S/4HANA Cloud's own words added after ours. Fix the cause in SAP S/4HANA Cloud or in the mapping, then press Retry. A retry never creates a second journal.
| What you see | What to do |
|---|---|
| SAP S/4HANA rejected the journal (400). followed by SAP S/4HANA Cloud's own message | Rare here: most refusals come back as “SAP S/4HANA did not post the journal.” (below). Read SAP's words after ours, fix the cause, then Retry. |
| SAP S/4HANA could not find the company or an account this journal points at (404). Check the account mapping belongs to the connected company. | A mapped account was deleted or archived in SAP S/4HANA Cloud. Click Reload accounts, fix the mapping, save, then Retry. |
| This run's payroll accrual journal did not reach SAP S/4HANA Cloud. Retry the accrual first, then retry this payment, so it clears exactly the salaries payable the accrual booked. | Retry the Payroll accrual line first, then the Salary payment line. |
| No exchange rate from … to … is available. | Try again later, or contact us. |
| … — gave up after 6 attempts. | SAP S/4HANA Cloud or the network kept failing. Check SAP S/4HANA Cloud opens normally, then press Retry. |
| SAP S/4HANA did not post the journal. SAP's log: … | SAP checked the entry and refused it; its log says why. Likely causes: the posting period is closed for that date, document type SA isn't allowed for this service, the cost center isn't valid on that date, or an account can't take the posting. Fix it in SAP or in the mapping, then Retry. |
| SAP S/4HANA refused access (403). The communication user needs communication arrangements for SAP_COM_0002 (posting), SAP_COM_0087 (company code, G/L accounts, cost centers) and SAP_COM_0303 (G/L account line items). | One of the three arrangements is missing or uses another user. In Communication Arrangements, check that SAP_COM_0002, SAP_COM_0087 and SAP_COM_0303 all use the communication system and user from section 2, then Retry. |
On the payroll run: Not needed
| What you see | What it means |
|---|---|
| Reversed in Ahlan Hamad before it reached SAP S/4HANA Cloud; the pair nets to zero. | Nothing to do: the journal and its reversal cancel out, so neither is sent to SAP S/4HANA Cloud. |
| Reverses an entry that never reached SAP S/4HANA Cloud, so there is nothing to reverse there. | Nothing to do. |
Two accounting systems
If the SAP S/4HANA Cloud page or the payroll run says “Payroll is being posted to …” with more than one system, every run is booked in each of them. If you keep your books only in SAP S/4HANA Cloud, disconnect the others so payroll costs aren't counted twice.
9. Disconnecting
- In AhlanHamad, go to Integrations → SAP S/4HANA Cloud → Connection and click Disconnect S/4HANA. You see “Integration disconnected”, and AhlanHamad deletes the stored user name and password.
- AhlanHamad cannot withdraw anything in SAP for you: SAP offers no call for it. If you won't use the connection again, delete the three communication arrangements, the communication system and the communication user in SAP.
- Journals already in SAP S/4HANA Cloud stay there. We never delete or change them.
- While SAP S/4HANA Cloud is disconnected, new payroll journals are not sent. The run card says “SAP S/4HANA Cloud is not connected, so new journals are not being sent.”
- If you connect again later, open each payroll run from that time and press Send this run's journals to SAP S/4HANA Cloud, and send any end-of-service months listed on the mapping card.
SAP sources used in this guide
- Setting up: communication management, create a communication system and user, create a communication arrangement, display communication scenarios.
- Posting and reading: APIs for General Ledger Accounting, Journal Entry - Post (Synchronous), journal entry and item fields, journal entry reversal, G/L account line items, cost centers, and the service's definition on the SAP Business Accelerator Hub.
- SAP's apps and menus change between releases. If a name here doesn't match your screen, the linked page has SAP's current wording.