SAP S/4HANA and AFAS integration: SAP cost centres at the AFAS employer, payroll journal posted in SAP
With an integration between SAP S/4HANA and AFAS Profit, the cost centres from SAP reach the right employer in AFAS automatically, and the payroll journal of every period is then posted in S/4HANA as a journal entry. The export file that is now converted and imported after every payroll run is no longer needed.
Organisations that keep the ledger in SAP S/4HANA and payroll in AFAS Profit maintain the cost centres in AFAS by hand and import the payroll journal into SAP as a file after every period. Because AFAS no longer supports the old exports for external accounting packages, that file is often put together in a spreadsheet.
Finance opens or changes a cost centre in S/4HANA.
KoppelHet adds the cost centre with code and description to the AFAS employer that belongs to that company code.
After a payroll period is closed KoppelHet fetches the payroll journal from AFAS.
Account, cost centre and cost unit are separated and translated to the SAP ledger.
The journal entry goes to S/4HANA; a rejected posting appears as an alert in the KoppelHet platform.
Out: Cost centres per company code · Cost centres and cost units per AFAS employer · GL accounts Back: Payroll journal per period · Amounts per account, cost centre and cost unit
What to watch for with SAP S/4HANA and AFAS Profit
Note The AFAS Profit classic token expires on 31 August 2027. An integration that still uses it has to move to OAuth before that date. Source
In AFAS cost centres for payroll belong to an employer. With several Dutch company codes in SAP, KoppelHet only adds each cost centre to the employer that belongs to that company code.
A cost centre in SAP can have several validity periods, with different data per period. KoppelHet takes the period that applies now and passes on a description that changes later only on that date.
In AFAS the account in the payroll journal can be extended with cost centre or cost unit codes. KoppelHet splits them again, because SAP wants account and cost centre as separate fields on the line.
If AFAS uses four-week periods, a payroll period does not match an SAP posting period. In agreement with finance we post on the end date of the AFAS period.
SAP processes a large journal entry best asynchronously. The result appears in the S/4HANA message monitor; KoppelHet reads it back, so finance does not have to look for whether the payroll journal was posted.
A journal entry in SAP has a limit of 999 lines in the entry view. A payroll journal per account and cost centre stays well below it; a journal per employee is not advised for larger numbers.
How we build and run it
The integration runs on the KoppelHet platform, hosted in a data centre in the EU.
Every sync and every error is visible in the functional log; on an error your administrator is notified.
A change that cannot go through is not half-applied but queued for another attempt.
KoppelHet is ISO 27001 certified. Data travels encrypted and stays on the platform no longer than needed.
After go-live we manage the integration and adjust it when your process changes.
The integration fits next to your existing integration layer. Only the fields in the design are transferred; the platform keeps no register of its own.
This is not an app you switch on. We build the integration for your organisation on our platform, with building blocks we reuse on every project. So it is custom work that does not start from scratch.
A consultant prepares the intake and analyses both systems. We then record the mapping and exceptions field by field, test in the test or acceptance environment and go live at a moment you choose. Costs are a one-off amount for the setup and a monthly amount for platform, monitoring and support.
Price indication · Complex
€ 0.000 – € 00.000
€ 000 per month
Frequently asked questions
What happens to a cost centre that is no longer valid in SAP?
KoppelHet reports it with the employees still assigned to it in AFAS. Payroll moves them, after which the cost centre can be closed in AFAS.
Does this also work with S/4HANA on premise?
The process is the same; the SAP APIs differ per edition. We agree that at the start with your SAP administrator.
Is a correction in AFAS posted as well?
Yes, as a separate journal entry with the period in the reference, so finance can see which posting belongs to which period.
Technical details for IT
For those who want to know how it works under the hood: APIs, fields and sources used.
S/4HANA Cloud through Cost Center - Read (A2X), API_COSTCENTER_SRV, and Journal Entry - Post (Asynchronous), JournalEntryBulkCreationRequest_In, with checks in the AIF message monitor.
To AFAS through the HrCostCentre and HrCostCarrier UpdateConnectors; the payroll journal is read with a dedicated GetConnector. Dedicated app connector with OAuth.
Which fields are transferred
The key fields. The full mapping is agreed per customer.
Field in SAP S/4HANA
Field in AFAS Profit
Notes
CostCenter (S/4HANA)
Kostenplaats (HrCostCentre)
Per employer in AFAS
Omschrijving kostenplaats
Omschrijving kostenplaats
CompanyCode
Werkgever in AFAS
Fixed mapping per company code
Rekening in de loonjournaalpost
Grootboekrekening in SAP
Through a lookup table
Kostenplaats in de loonjournaalpost
Kostenplaats op de journaalregel
Kostendrager in de loonjournaalpost
Extra toewijzing in SAP
Agreed per customer
Debet en credit
Bedrag met debet- of creditkenmerk
Periode en jaar
Boekingsdatum
Last day of the payroll period, unless finance prefers otherwise
Tell us which systems you use. In a 30-minute call you hear what is possible, what you arrange yourself and how we start. We begin with the smallest integration that works.