Mass G/L Journal Entry Upload from Excel
Short answer: A custom program that posts multi-line G/L documents (accruals, reclassifications, allocation entries) in bulk from Excel or CSV rows. It checks every document first, shows all errors in test mode without posting, and lists the document numbers per row at the end.
- Estimated effort
- M · 3–5 working days
- System
- ECC and S/4HANA
- Tables
- 4
- Scope
- Global
- Built by
- NeKuDos Teknoloji
- Last updated
Why is the standard not enough?
FB50 and F-02 enter postings one by one on the screen; accrual or allocation files with hundreds of lines are typed by hand. Pasting from Excel in FB50 is limited to the screen and gives no cross-document check or result list per row. File-based entries that repeat every month at the close need an upload program with a test mode.
Who uses it? General ledger teams, accountants who run the period close and finance teams that bring entries calculated in external systems into SAP.
Closest standard alternatives
Tables used
The tables the program reads and updates. ECC and S/4HANA differences are marked separately.
| Table | Role | Access | System |
|---|---|---|---|
| BKPFAccounting Document Header | Accounting document header: company code, document type, dates, reference | Write | ECC + S/4 |
| BSEGAccounting Document Segment | Document line items: account, amount, cost center, profit center, assignment | Write | ECC + S/4 |
| SKB1G/L Account Master (Company Code) | Check that the account exists in the company code and is not automatic-only | Read | ECC + S/4 |
| CSKSCost Center Master Record | Validity of the cost center on the posting date | Read | ECC + S/4 |
BAPIs and functions used
- BAPI_ACC_DOCUMENT_CHECKAccounting: Check Document. Checks the document without posting (test mode and pre-check)
- BAPI_ACC_DOCUMENT_POSTAccounting: Post Document. Posts each document with all its lines
- BAPI_TRANSACTION_COMMITCommit a BAPI transaction. Saves successful documents permanently
Selection screen parameters
| Parameter | Description | Type | Reference field | Required | Example |
|---|---|---|---|---|---|
| P_FILE | Upload file (XLSX or CSV) | Single value | — | Yes | C:\temp\tahakkuklar_ekim.xlsx |
| P_TEST | Test mode (check without posting) | Checkbox | — | No | X |
| P_ALLOK | Post only if all documents are error-free | 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 | Document key | By rule Rows with the same key are collected into one document | Yes |
| 2 | Company code | BKPF-BUKRS | Yes |
| 3 | Document type | BKPF-BLART | Yes |
| 4 | Document date | BKPF-BLDAT | Yes |
| 5 | Posting date | BKPF-BUDAT | Yes |
| 6 | Currency | BKPF-WAERS | Yes |
| 7 | Reference | BKPF-XBLNR | No |
| 8 | Header text | BKPF-BKTXT | No |
| 9 | G/L account | BSEG-HKONT | Yes |
| 10 | Amount | By rule Positive = debit, negative = credit; written to the BAPI amount structure in document currency | Yes |
| 11 | Cost center | BSEG-KOSTL | No |
| 12 | Profit center | BSEG-PRCTR | No |
| 13 | Internal order | BSEG-AUFNR | No |
| 14 | Assignment | BSEG-ZUONR | No |
| 15 | Item text | BSEG-SGTXT | No |
Sample upload file
| 1 | Document key * | Company code * | Document type * | Document date * | Posting date * | Currency * | Reference | Header text | G/L account * | Amount * | Cost center | Profit center | Internal order | Assignment | Item text |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2 | 1 | 1000 | SA | 10/31/2026 | 10/31/2026 | TRY | TAH-2026-10 | October electricity accrual | 770100 | 45,000 | 4100 | EKIM2026 | Electricity expense | ||
| 3 | 1 | 1000 | SA | 10/31/2026 | 10/31/2026 | TRY | TAH-2026-10 | October electricity accrual | 381000 | -45,000 | EKIM2026 | Expense accrual | |||
| 4 | 2 | 1000 | SA | 10/31/2026 | 10/31/2026 | TRY | SNF-0412 | Cost center correction | 760200 | 12,800 | 4390 | Marketing expense reclass | |||
| 5 | 2 | 1000 | SA | 10/31/2026 | 10/31/2026 | TRY | SNF-0412 | Cost center correction | 760200 | -12,800 | 4200 | Marketing expense reclass | |||
| 6 | 3 | 1000 | SA | 10/31/2026 | 10/31/2026 | TRY | TAH-2026-11 | Consulting accrual | 770300 | 8,500 | 4500 | Consulting expense |
Result list columns
| # | Column | Source |
|---|---|---|
| 1 | Document key | Calculated Document key from the file |
| 2 | Lines | Calculated Number of file rows in the document |
| 3 | Status | Calculated From the BAPI return messages: posted, checked or error |
| 4 | Document number | BKPF-BELNR |
| 5 | Fiscal year | BKPF-GJAHR |
| 6 | Message | Calculated First error or success message from the BAPI return table |
Sample result list
| Document key | Lines | Status | Document number | Fiscal year | Message |
|---|---|---|---|---|---|
| 1 | 2 | Posted | 100004521 | 2026 | Document 100004521 posted in company code 1000 |
| 2 | 2 | Error | Cost center 4390 is not valid on 31.10.2026 | ||
| 3 | 1 | Error | Document is not balanced: debit 8,500.00, credit 0.00 |
How does the program work?
- The file is read from the user’s PC or, in a background job, from the application server; the first row is skipped as the header and rows with the same document key are collected into one document.
- Every document is checked: company code and document type must exist, the account must be open in the company code and must not be an automatic-postings-only account (SKB1-XINTB), the cost center must be valid on the posting date (CSKS), and total debits must equal total credits.
- The document is mapped to the header, G/L line and amount structures and checked with BAPI_ACC_DOCUMENT_CHECK; closed periods and account assignment errors show up here.
- In test mode only the check runs and all messages are listed.
- In a real run each document is posted with BAPI_ACC_DOCUMENT_POST followed by BAPI_TRANSACTION_COMMIT. With P_ALLOK, nothing is posted if a single document in the file has an error. The document number and fiscal year are taken from the returned object key to build a result list per row.
Performance notes
Run files above a few thousand rows as a background job. Committing per document isolates failed documents; a single document must not exceed 999 lines.
Features
- Test mode (check without posting)
- Line-by-line result and error log
- Download failed lines as a separate file Rows of failed documents can be downloaded to a separate file, corrected and uploaded again.
- Export to Excel An empty upload template can be downloaded as Excel.
- Runs as a background job
Authorization objects
- F_BKPF_BUKAccounting document posting authorization by company code
- F_BKPF_BLAPosting authorization by document type
Frequently asked questions
Can accruals be reversed automatically at the start of the next month?
The standard version posts the documents and lists their numbers. By adding a reversal date column, the uploaded documents can be reversed on that date with BAPI_ACC_DOCUMENT_REV_POST; this extension adds 1–2 days to the effort range.
Can entries with tax be uploaded?
Yes. When a tax code column is added to the template, the tax line is calculated through the BAPI tax structure and added to the document. The tax codes are checked against local regulation during installation.
Can it be used on S/4HANA?
Yes. BAPI_ACC_DOCUMENT_POST is supported on S/4HANA as well and the posting is written to ACDOCA. Where the Fiori journal entry upload app is not used or company-specific checks are needed, this program works with the same template.
Packages that include this solution
Excel Mass Data Upload Pack
A pack that puts the five bulk uploads key users run most often into one upload structure: material master, equipment master with installation at a …
Related reports
Cost Center Cost Plan Upload from Excel
A custom program that loads periodic plan amounts per cost center and cost element from a budget file into the CO plan in bulk. It checks every row in …
Parked Documents Aging Report
A custom ALV report that lists parked accounting documents that are not yet posted by user, document type and waiting time. Before the period close it …
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.