ahlan hamad

Setup guide · SAP Business One payroll journals · Coming soon

Set up SAP Business One payroll journals: step by step

This guide is for two people working together: your IT team or SAP Business One partner, who makes the Service Layer reachable and creates the user, and the person who runs payroll in AhlanHamad, who connects it 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 Business One is switched off. You can do the SAP side (sections 2 and 3) and connect now; until we switch posting on for your company, the Field Mapping tab says “Posting payroll journals to SAP Business One isn't switched on for your workspace yet.”

CheckWhat you need
Where it standsBuilt against SAP's Service Layer API reference for SAP Business One 10.0, and tested only against a simulated Service Layer. It hasn't posted to a real SAP Business One company yet, so start with a test company database (a copy of your company, or a demo database) and check your first journal entries closely.
SAP Business OneSAP Business One with the Service Layer installed and running (it comes with the server components, version for SAP HANA or Microsoft SQL Server). AhlanHamad talks only to the Service Layer, at /b1s/v1.
Reachable from the internetThe Service Layer must be reachable from the internet over HTTPS with a publicly trusted certificate. A server only on your internal network, or one with the installer's self-signed certificate, can't be reached (section 2).
Currency and decimalsJournal entries are posted in the company's local currency. For KWD, BHD or OMR, the company's amount decimals should be 3; with 2, SAP rounds the amounts. This has not been tried yet on a three-decimal company, so check the first entries' amounts.
An SAP Business One adminSomeone who can create users, assign licences and set authorizations in SAP Business One (usually your SAP partner or a superuser), and your IT team for the server and certificate.
In AhlanHamadA 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.

Only totals are sent to SAP Business One: one line per account, never a line per employee. Names, IDs and individual salaries stay in AhlanHamad (the journal's description carries the number of employees in the run, nothing more).

2. Make your Service Layer reachable over HTTPS

AhlanHamad runs in the cloud, so it reaches your Service Layer over the internet. SAP's Administrator's Guide says the Service Layer is normally for internal calls and doesn't need to face the internet, and recommends a reverse proxy for outside access (Administrator's Guide, version for SAP HANA). Publishing it is a decision for your IT team and SAP partner; these are the steps AhlanHamad needs.

  1. Check the Service Layer is running. Its address is the server and port, by default https://server:50000 (port 50000 is the Service Layer load balancer's default), with the API under /b1s/v1.
  2. Give it a public host name (for example sl.yourcompany.com) that resolves to a public address. AhlanHamad refuses addresses on a private or internal network.
  3. Put a certificate from a public certificate authority on that host name. The installer can generate a self-signed certificate, which SAP itself marks as not recommended; AhlanHamad can't trust it, and every call fails as a network error (Administrator's Guide: specifying the security certificate).
  4. Open your firewall or reverse proxy so that HTTPS requests from the internet reach the Service Layer on that host and port. SAP recommends a reverse proxy rather than plain port forwarding for outside requests (Administrator's Guide: enabling external access). Port 50000 has not yet been tried from AhlanHamad's side; port 443 behind a reverse proxy is the usual setup.
  5. Test it from outside your network: opening https://<your host>:<port>/b1s/v1/ in a browser should show no certificate warning.

3. In SAP Business One: create a dedicated user

Use a user of its own for AhlanHamad, not manager or another superuser: a superuser has full authorization to everything, and its authorizations can't be limited. New users start with no authorizations, so you give this one only what it needs (SAP: How to Define Authorizations). SAP's menu paths below come from SAP's guides; the screen may be named differently in your version.

  1. Administration → Setup → General → Users: create the user, for example AHPAYROLL, with a strong password. Don't tick Superuser. (The screen may be named differently in your version.)
  2. Administration → License → License Administration: give the user a named licence that allows Service Layer access and journal entries. SAP's License Guide lists types such as Professional, Limited Financials and Indirect Access (License Guide). Licence names and what they include vary by release and contract, so confirm the right type with your SAP partner.
  3. Administration → System Initialization → Authorizations → General Authorizations: select the user and set, under Financials: Journal Entry: Full Authorization, and Chart of Accounts: Read Only (How to Define Authorizations).
  4. SAP's guide says a user reaches only journal entries in numbering series it is authorized for. In the same window, under Numbering Series, give the user Full Authorization for the series group your journal entries' default series belongs to.
  5. AhlanHamad also reads the company's local currency and the Currencies list. If loading your accounts is refused later, give the user Read Only on Currencies and Company Details too, and ask your partner to confirm these rights are enough for the Service Layer in your release.
  6. Note the Company Database name exactly as SAP Business One lists it when you choose a company (for example SBODemoSA for a demo database). Use your test company's database first.

4. In AhlanHamad: connect SAP Business One

  1. Go to Integrations and open SAP Business One. Stay on the Connection tab; the card is called SAP B1 Connection.
  2. Server URL: your Service Layer address from section 2, for example https://sl.yourcompany.com:50000. Enter only https://, the host and the port: no /b1s/v1 and no slash at the end (AhlanHamad adds /b1s/v1 itself).
  3. Company Database: the database name from section 3, exactly as SAP lists it.
  4. Username and Password: the dedicated user from section 3. The form says: “A dedicated user for Ahlan Hamad with a licence that allows Service Layer access, Journal Entry: Full Authorization and Chart of Accounts: Read Only.” The password is “Stored encrypted on the server. Never shown again and never sent to the browser.”
  5. Click Connect & Verify. The button shows Verifying Connection while AhlanHamad logs in to your Service Layer with these details. When the login works it says “Connection successful!”, and the card shows Connected to SAP Business One with the Server URL and Company Database.

Only the user and password are secret; the Server URL and Company Database are shown on the card. To change any of them, click Disconnect SAP B1 and connect again with all four fields. Connecting to a different server or Company Database forgets the saved mapping: the Field Mapping tab then says “SAP Business One is now connected to a different company or database than the one this mapping was saved for. The old mapping, company and journal no longer apply: load your accounts and map them again. Nothing is posted until then.”

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 Business One too, every payroll run is posted to both and your payroll costs are booked twice. If you are moving to SAP Business One, click Cancel, disconnect the other system first, then connect SAP Business One.

5. Map your accounts

  1. Open the Field Mapping tab (it is available once you are connected). The card is called Post payroll journals to SAP Business One. There is no company or journal to pick: the company is the Company Database you connected.
  2. Click Load my accounts. AhlanHamad reads your chart of accounts and the company's local currency.
  3. Map each Ahlan Hamad account to a SAP Business One account (table below). Some expense and cash accounts may be pre-selected and marked Suggested; liability accounts you pick yourself, because SAP Business One reports assets and liabilities as the same account type. Check every one with your accountant.
  4. Click Save mapping. Until every required account is mapped the card says “Runs that use an unmapped account are held until it is mapped.”
  5. If you pay any payroll in a currency other than the company's local currency, decide on Post runs in other currencies (section 6).
  6. The Sync Settings tab is not used for payroll journals; you can leave it as it is.

Which G/L account for each payroll account

CodeAhlan Hamad accountNeededTypical SAP Business One G/L account
5100Salaries — basic, other allowances, overtime & additionsRequiredExpense account
5400Housing allowanceRequiredExpense account
5500Transport allowanceRequiredExpense account
5200Employer social-insurance contributionRequiredExpense account
5300End-of-service expenseRequiredExpense account
2100Net salaries payableRequiredLiability account
2200Social insurance payable (employee + employer)RequiredLiability account
2300End-of-service provisionRequiredLiability account
1101Bank account salaries are paid fromRequiredCash or bank G/L account (not a control account), or a salary clearing liability
2700Deductions withheld (loans, penalties, unpaid leave)Only if usedLiability account
5810Bank transfer charges on salariesOnly if usedExpense account
5310DIFC DEWS employer contributionOnly if usedExpense account
2310DIFC DEWS payableOnly if usedLiability account
5900Foreign-exchange gain/loss on payroll (only if a run in another currency is paid at a different rate)Only if usedYour exchange gain or loss account

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 AhlanHamadSAP Business One receivesDated
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 1101The day the run was signed off and paid
Bank transfer charges are recorded on a paid runBank charges: debit 5810, credit 1101The pay day
A month endsEnd-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 correctedA reversal: a new journal entry with the same accounts and amounts, debit and credit swapped, under its own marker. SAP Business One's own Cancel is not used. A corrected run is then posted again as a new journal entry.The day of the change

Every journal's description starts with what it is and AhlanHamad's own reference for it: 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). A reversal's description starts with “Reversal of” and the reference it reverses. Each journal also carries a marker: AH followed by 12 letters and digits.

7. Check your first payroll in SAP Business One

  1. In AhlanHamad, open the payroll run. The SAP Business One journals card lists each journal (Payroll accrual, Salary payment, …) with its status. Posted means SAP Business One has it.
  2. In SAP Business One, open the Journal Entry window in Find mode and search Ref. 1 for the marker the run card shows (AH…), or Ref. 2 for the reference. (The screen may be named differently in your version.)
  3. Check: the posting date (the last day of the payroll month for the accrual), one line per mapped account, amounts with the decimals you expect, and totals that match the payroll run in AhlanHamad.

Statuses on the run card: Queued and Sending (on its way), Waiting (another journal must reach SAP Business One first), Retrying (SAP Business One or the network was busy; we try again automatically), Posted, On hold (needs you; the reason is shown), Failed (SAP Business One 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 Business One 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 Business One errors are put in the email; open the payroll run to see the reason.

When connecting (Connection tab)

What you seeWhat to do
Something glitched on our end — give it another go?On this form this usually means AhlanHamad refused or couldn't reach the Server URL before logging in: it is not https://, it points at a private or internal address, its host name doesn't resolve to a public address, or the certificate is self-signed or otherwise not publicly trusted. Check section 2, then try again. If it keeps happening, contact us.
SAP B1 login failed: …The Service Layer answered but refused the login. Read SAP's message after ours: usually the Company Database name, user or password is wrong, the user is locked, or it has no licence. Fix it in SAP Business One and click Connect & Verify again.
Connection error with “SAP Business One refused the login: … Reconnect SAP Business One.”A login that worked before is now refused: usually the password was changed, the user was locked, or its licence was removed. Fix the user in SAP Business One, enter all four fields again and click Connect & Verify.
Connection error with “SAP Business One no longer accepts this connection (…). Reconnect SAP Business One from Integrations.”The Service Layer turned away a fresh login while posting. Check the user's licence and authorizations (section 3), then connect again.

When loading your accounts (Field Mapping tab)

What you seeWhat to do
SAP Business One did not report the company's local currency (Administration → System Initialization → Company Details → Basic Initialization tab → Local Currency). Set it, then load your accounts again.In SAP Business One, check the local currency on the Basic Initialization tab of Company Details (under Administration → System Initialization), then click Reload accounts. If it is set, the user may lack Read Only on Company Details (section 3).
SAP Business One's local currency "…" has no ISO code. Set its International Description (ISO code, e.g. KWD) under Administration → Setup → Financials → Currencies, then load your accounts again.Your local currency's code is not a three-letter ISO code (for example KD instead of KWD) and its ISO code isn't filled in. Fill it in on the Currencies setup (currency table), then click Reload accounts.
An account you expected is not in the listTitle accounts and inactive accounts aren't listed (account table). Make it an active account in SAP Business One, 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 seeWhat 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, map the accounts and click Save mapping, then Retry. This also shows when the connection now reaches a different server or Company Database than the saved mapping.
… 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 Business One terms: a control account, an account with manual posting blocked, a title account or an inactive account. Map those codes to an active G/L account that takes manual journal lines, 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 Business One.
The connection needs to be renewed. Reconnect and try again.SAP Business One refused the stored user and password: usually the password was changed, the user was locked or its licence was removed. On the Connection tab (it shows Connection error), enter all four fields again and click Connect & Verify. Journals held for this reason are sent automatically once you reconnect.
Not connected, or posting is switched off.Connect SAP Business One again on the Connection tab. Held journals are sent automatically once you reconnect. If SAP Business One 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 Business One, in English, with SAP Business One's own words added after ours. Fix the cause in SAP Business One or in the mapping, then press Retry. A retry never creates a second journal.

What you seeWhat to do
SAP Business One rejected the journal (400). followed by SAP Business One's own messageRead SAP Business One's message after ours (it starts with SAP's error code in brackets). Common ones: the posting date falls in a locked or closed posting period, an account takes no manual journal line, or a text is too long for an older release. Fix it in SAP Business One or in the mapping, then Retry.
SAP Business One refused access (403). The connection may lack permission to post journals, or the organisation was disconnected — reconnect SAP Business One.The user AhlanHamad logs in with can't add journal entries. In SAP Business One, check its licence and its Journal Entry and Numbering Series authorizations (section 3), then Retry.
SAP Business One 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 Business One. Click Reload accounts, fix the mapping, save, then Retry.
This run's payroll accrual journal did not reach SAP Business One. 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 Business One or the network kept failing. Check SAP Business One opens normally, then press Retry.
Network error: … — gave up after 6 attempts.AhlanHamad couldn't reach your Service Layer. Check it is running, still reachable from the internet, and that its certificate is publicly trusted and hasn't expired (section 2), then Retry.

On the payroll run: Not needed

What you seeWhat it means
Reversed in Ahlan Hamad before it reached SAP Business One; the pair nets to zero.Nothing to do: the journal and its reversal cancel out, so neither is sent to SAP Business One.
Reverses an entry that never reached SAP Business One, so there is nothing to reverse there.Nothing to do.

Two accounting systems

If the SAP Business One 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 Business One, disconnect the others so payroll costs aren't counted twice.

9. Disconnecting

  1. In AhlanHamad, go to Integrations → SAP Business One → Connection and click Disconnect SAP B1. AhlanHamad deletes the stored user, password and session.
  2. AhlanHamad cannot withdraw anything in SAP Business One for you. If you won't use the connection again, lock the dedicated user or change its password in SAP Business One, and remove its licence. A Service Layer session already open ends by itself once it has been idle (30 minutes by default).

SAP sources used in this guide

About AhlanHamad × SAP Business One· All integrations