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.”
| Check | What you need |
|---|---|
| Where it stands | Built 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 One | SAP 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 internet | The 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 decimals | Journal 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 admin | Someone 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 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. |
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.
- 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. - 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. - 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).
- 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.
- 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.
- 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.) - 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.
- 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).
- 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.
- 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.
- Note the Company Database name exactly as SAP Business One lists it when you choose a company (for example
SBODemoSAfor a demo database). Use your test company's database first.
4. In AhlanHamad: connect SAP Business One
- Go to Integrations and open SAP Business One. Stay on the Connection tab; the card is called SAP B1 Connection.
- Server URL: your Service Layer address from section 2, for example
https://sl.yourcompany.com:50000. Enter onlyhttps://, the host and the port: no/b1s/v1and no slash at the end (AhlanHamad adds/b1s/v1itself). - Company Database: the database name from section 3, exactly as SAP lists it.
- 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.”
- 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
- 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.
- Click Load my accounts. AhlanHamad reads your chart of accounts and the company's local currency.
- 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.
- 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's local currency, decide on Post runs in other currencies (section 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
| Code | Ahlan Hamad account | Needed | Typical SAP Business One G/L account |
|---|---|---|---|
| 5100 | Salaries — basic, other allowances, overtime & additions | Required | Expense account |
| 5400 | Housing allowance | Required | Expense account |
| 5500 | Transport allowance | Required | Expense account |
| 5200 | Employer social-insurance contribution | Required | Expense account |
| 5300 | End-of-service expense | Required | Expense account |
| 2100 | Net salaries payable | Required | Liability account |
| 2200 | Social insurance payable (employee + employer) | Required | Liability account |
| 2300 | End-of-service provision | Required | Liability account |
| 1101 | Bank account salaries are paid from | Required | Cash or bank G/L account (not a control account), or a salary clearing liability |
| 2700 | Deductions withheld (loans, penalties, unpaid leave) | Only if used | Liability account |
| 5810 | Bank transfer charges on salaries | Only if used | Expense account |
| 5310 | DIFC DEWS employer contribution | Only if used | Expense account |
| 2310 | DIFC DEWS payable | Only if used | Liability account |
| 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 |
- Only active G/L accounts that take manual journal lines can be picked. AhlanHamad says why: “Some accounts are greyed out: SAP Business One takes no manual journal line on control accounts (they need a business partner on every line) or on accounts with manual posting blocked. Title and inactive accounts aren't listed.”
- Every line goes to a G/L account. Map 1101 to the G/L account your salaries are paid from (a cash or bank account that is not a control account), or to a “Salary clearing” liability that you clear when you reconcile the bank.
- Cost centres, distribution rules, projects and business partners are not sent: each line carries only the G/L account, the amount and a line memo.
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 Business One 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: 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 |
- Each journal is added to SAP Business One as one journal entry through the Service Layer's JournalEntries, one line per account (Service Layer API reference). Its Reference 1 (Ref. 1) is our marker (
AHfollowed by 12 letters and digits), Reference 2 is AhlanHamad's reference (for examplePAY-KW-2026-10) and Remarks describe the entry (journal entry table). The posting date, document date and due date are all the journal's date. - A reversal's Reference 3 is the marker of the entry it reverses, and its Remarks name that entry's number.
- The Service Layer has no idempotency key, so before every post AhlanHamad looks for an entry whose Reference 1 is our marker, and uses that entry instead of posting a second one.
- We never edit or delete a journal in SAP Business One. Corrections are always new journals: the reversal first, then the corrected run as a new journal.
- Each journal is sent once. If a send is cut off halfway, the next try looks the journal up by its marker instead of creating a second one.
- Amounts are in your SAP Business One base 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, and the rate is written on the journal.
- 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 Business One. The mapping card lists them under “Earlier runs not sent to SAP Business One 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.
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
- 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.
- 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.) - 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 see | What 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 see | What 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 list | Title 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 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, 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 see | What to do |
|---|---|
| SAP Business One rejected the journal (400). followed by SAP Business One's own message | Read 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 see | What 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
- In AhlanHamad, go to Integrations → SAP Business One → Connection and click Disconnect SAP B1. AhlanHamad deletes the stored user, password and session.
- 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).
- Journals already in SAP Business One stay there. We never delete or change them.
- While SAP Business One is disconnected, new payroll journals are not sent. The run card says “SAP Business One 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 Business One, and send any end-of-service months listed on the mapping card.
SAP sources used in this guide
- SAP Business One 10.0: Service Layer API reference, Administrator's Guide, version for SAP HANA (the Microsoft SQL Server version has its own guide), License Guide.
- How to Define Authorizations (SAP Business One 9.3 guide).
- SAP Business One SDK 10.0 table reference: journal entries (OJDT), G/L accounts (OACT), currencies (OCRN).
- SAP's menus differ between releases and localizations. If a name here doesn't match your screen, your SAP partner or the linked guide has the current wording.