Journal Interface from External Systems with Account Mapping
Short answer: A general-purpose interface that converts transactions from non-SAP systems such as a hotel management system, insurance, payroll or a front-office accounting package into SAP G/L accounts, cost centers, customers and vendors through mapping tables, checks them, posts them as accounting documents and emails errors to the owners.
- Estimated effort
- L · 10–15 working days
- System
- ECC and S/4HANA
- Tables
- 8
- Scope
- Global
- Built by
- NeKuDos Teknoloji
- Last updated
Why is the standard not enough?
FB50 and FB01 enter postings by hand; LSMW or standard accounting APIs can create documents from a file. But maintenance screens that translate the source system's own account codes, departments and partner codes to their SAP equivalents, pre-posting checks on period, balance and validity, error tracking per source system and reprocessing do not come ready. A separate upload is written for each new source and errors cannot be followed up.
Who uses it? General ledger, integration and IT teams, accounting owners of group companies.
Closest standard alternatives
Tables used
The tables the program reads and updates. ECC and S/4HANA differences are marked separately.
| Table | Role | Access | System |
|---|---|---|---|
| SKB1G/L Account Master (Company Code) | Whether the G/L account is open for posting in the company code | Read | ECC + S/4 |
| CSKSCost Center Master Record | Cost center validity | Read | ECC + S/4 |
| KNB1Customer Master (Company Code) | Company code data of the mapped customer | Read | ECC + S/4 |
| LFB1Vendor Master (Company Code) | Company code data of the mapped vendor | Read | ECC + S/4 |
| BKPFAccounting Document Header | Created accounting documents; duplicate reference check | Read / write | ECC + S/4 |
| BSEGAccounting Document Segment | Document items (written through the BAPI) | Write | ECC + S/4 |
| BALHDRApplication Log Header | Interface run log | Write | ECC + S/4 |
| T001Company Codes | Company code currency and chart of accounts | Read | ECC + S/4 |
BAPIs and functions used
- FI_PERIOD_CHECKCheck Whether Posting Period Is Open. Checks that the posting period is open
- BAPI_ACC_DOCUMENT_CHECKAccounting: Check Document. Checks the document without posting
- BAPI_ACC_DOCUMENT_POSTAccounting: Post Document. Posts the accounting document
- BAPI_TRANSACTION_COMMITCommit a BAPI transaction. Saves successful documents
- SO_DOCUMENT_SEND_API1SAPoffice: Send Document with Attachments. Emails the error summary
Selection screen parameters
| Parameter | Description | Type | Reference field | Required | Example |
|---|---|---|---|---|---|
| P_SRC | Source system code | Single value | — | Yes | OTEL |
| P_BUKRS | Company code | Single value | BKPF-BUKRS | Yes | 2000 |
| P_FILE | File (if not read from the interface table) | Single value | — | No | /interface/otel/2026-11-28.csv |
| S_BUDAT | Posting date | Range / multiple | BKPF-BUDAT | No | — |
| P_REPR | Reprocess failed and mapping-pending records | Checkbox | — | No | — |
| P_TEST | Test mode | Checkbox | — | No | X |
Input file columns
The columns of the upload template and the SAP fields they are written to. Columns with an asterisk are mandatory.
| # | Column | Target field | Required |
|---|---|---|---|
| 1 | Source document number | By rule Voucher number in the source system; written to the SAP reference field | Yes |
| 2 | Document date | BKPF-BLDAT | Yes |
| 3 | External account code | By rule Converted to an SAP G/L account with the mapping table | Yes |
| 4 | External department | By rule Converted to a cost center with the mapping table | No |
| 5 | External partner code | By rule Converted to a customer or vendor with the mapping table | No |
| 6 | Debit/credit | BSEG-SHKZG | Yes |
| 7 | Amount | BSEG-WRBTR | Yes |
| 8 | Currency | BKPF-WAERS | Yes |
| 9 | Text | BSEG-SGTXT | No |
Sample upload file
| 1 | Source document number * | Document date * | External account code * | External department | External partner code | Debit/credit * | Amount * | Currency * | Text |
|---|---|---|---|---|---|---|---|---|---|
| 2 | OT-20261128-01 | 28.11.2026 | 4010 | FB-ODA | H | 184,500 | TRY | Room revenue | |
| 3 | OT-20261128-01 | 28.11.2026 | 1200 | ACN-0071 | S | 184,500 | TRY | Travel agent receivable | |
| 4 | OT-20261128-02 | 28.11.2026 | 6150 | MUTFAK | S | 12,400 | TRY | Kitchen supplies |
Result list columns
| # | Column | Source |
|---|---|---|
| 1 | Source document number | Calculated Voucher number in the source system |
| 2 | G/L account | BSEG-HKONT |
| 3 | Cost center | BSEG-KOSTL |
| 4 | Amount | BSEG-WRBTR |
| 5 | Accounting document | BKPF-BELNR |
| 6 | Status | Calculated Posted, mapping pending, duplicate or error |
| 7 | Message | Calculated Check or BAPI return message |
Sample result list
| Source document number | G/L account | Cost center | Amount | Accounting document | Status | Message |
|---|---|---|---|---|---|---|
| OT-20261128-01 | 600100 | 184,500 | 100008812 | Posted | ||
| OT-20261128-02 | 770150 | 12,400 | Mapping pending | No cost center mapping for department MUTFAK | ||
| OT-20261127-05 | 600100 | 96,300 | Duplicate | Reference already posted with 100008790 |
How does the program work?
- A source code is defined for each source system (for example hotel, payroll, insurance): file format or interface, document type, posting date rule and error recipients.
- Mapping tables are maintained per source code: external account → SAP G/L account (SKB1), external department → cost center or profit center (CSKS), external partner code → customer or vendor (KNB1, LFB1). A record without a mapping stays in status ‘mapping pending’.
- Pre-posting checks: is the period open (FI_PERIOD_CHECK), is the account open for posting, is the cost center valid (CSKS-DATBI), does the document balance; then BAPI_ACC_DOCUMENT_CHECK runs.
- Records that pass are posted with BAPI_ACC_DOCUMENT_POST; the source system’s document number is written to the reference field (XBLNR) and posting the same reference twice is blocked.
- The result of each run is written to the application log (BALHDR) and the interface table. Failed and mapping-pending records are sent as a summary to the recipients defined per source code with SO_DOCUMENT_SEND_API1.
- The monitor lists records by source, date and status; after mapping is completed the selected records are processed again. In S/4HANA the same logic can also be fed through the released journal entry API.
Performance notes
Load the mapping tables for the source code into memory once. For large files group by the source document number and commit every 500 documents; use the daily summary option to condense lines.
Features
- Test mode (check without posting)
- Line-by-line result and error log
- ALV list (sort, filter, subtotals)
- Send the result by email A summary of failed and mapping-pending records goes to the source system owners.
- Runs as a background job Runs as a scheduled job per source.
- Download failed lines as a separate file
Authorization objects
- F_BKPF_BUKPosting authorization for the company code
- F_BKPF_BLAPosting authorization with the interface document type
- F_BKPF_KOAPosting authorization by account type
Frequently asked questions
If the source system calculates VAT, how are tax lines handled?
If the source sends amounts with tax, the tax code is taken from the mapping table and the BAPI calculates the tax line in SAP, or uses the source tax amount after checking it. The approach is chosen per source system during installation.
Does adding a new source system require code changes?
If the file format fits one of the existing templates, only the source code and mapping tables are maintained. For a different format or a direct interface a new class is added to the reading layer.
Related reports
Mass G/L Journal Entry Upload from Excel
A custom program that posts multi-line G/L documents (accruals, reclassifications, allocation entries) in bulk from Excel or CSV rows. It checks every …
Automatic Posting of Utility, Telecom and Fuel e-Invoices with Account and Cost Center Determination
A program that distributes the monthly electricity, gas, water, telecom and fuel e-invoices to the right G/L account and cost center by rules based on …
Let us build this program for your system
Briefly describe your system and expectations. We will clarify the scope and come back with an effort and price quote.