FI Program Custom development Mass upload

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

  • FB50 G/L Account Posting (Single Screen). Enters a G/L document manually on one screen; no bulk posting from a file and no result per row.
  • F-02 Enter G/L Account Posting. General posting screen; every document is entered separately.

Tables used

The tables the program reads and updates. ECC and S/4HANA differences are marked separately.

TableRoleAccessSystem
BKPFAccounting Document HeaderAccounting document header: company code, document type, dates, referenceWriteECC + S/4
BSEGAccounting Document SegmentDocument line items: account, amount, cost center, profit center, assignmentWriteECC + S/4
SKB1G/L Account Master (Company Code)Check that the account exists in the company code and is not automatic-onlyReadECC + S/4
CSKSCost Center Master RecordValidity of the cost center on the posting dateReadECC + 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

ParameterDescriptionTypeReference fieldRequiredExample
P_FILEUpload file (XLSX or CSV)Single value—YesC:\temp\tahakkuklar_ekim.xlsx
P_TESTTest mode (check without posting)Checkbox—NoX
P_ALLOKPost only if all documents are error-freeCheckbox—NoX

Input file columns

The columns of the upload template and the SAP fields they are written to. Columns with an asterisk are mandatory.

#ColumnTarget fieldRequired
1Document keyBy rule Rows with the same key are collected into one documentYes
2Company codeBKPF-BUKRSYes
3Document typeBKPF-BLARTYes
4Document dateBKPF-BLDATYes
5Posting dateBKPF-BUDATYes
6CurrencyBKPF-WAERSYes
7ReferenceBKPF-XBLNRNo
8Header textBKPF-BKTXTNo
9G/L accountBSEG-HKONTYes
10AmountBy rule Positive = debit, negative = credit; written to the BAPI amount structure in document currencyYes
11Cost centerBSEG-KOSTLNo
12Profit centerBSEG-PRCTRNo
13Internal orderBSEG-AUFNRNo
14AssignmentBSEG-ZUONRNo
15Item textBSEG-SGTXTNo

Sample upload file

1Document key *Company code *Document type *Document date *Posting date *Currency *ReferenceHeader textG/L account *Amount *Cost centerProfit centerInternal orderAssignmentItem text
211000SA10/31/202610/31/2026TRYTAH-2026-10October electricity accrual77010045,0004100EKIM2026Electricity expense
311000SA10/31/202610/31/2026TRYTAH-2026-10October electricity accrual381000-45,000EKIM2026Expense accrual
421000SA10/31/202610/31/2026TRYSNF-0412Cost center correction76020012,8004390Marketing expense reclass
521000SA10/31/202610/31/2026TRYSNF-0412Cost center correction760200-12,8004200Marketing expense reclass
631000SA10/31/202610/31/2026TRYTAH-2026-11Consulting accrual7703008,5004500Consulting expense
A view built with fictional sample data; not real system data.

Result list columns

#ColumnSource
1Document keyCalculated Document key from the file
2LinesCalculated Number of file rows in the document
3StatusCalculated From the BAPI return messages: posted, checked or error
4Document numberBKPF-BELNR
5Fiscal yearBKPF-GJAHR
6MessageCalculated First error or success message from the BAPI return table

Sample result list

Document keyLinesStatusDocument numberFiscal yearMessage
12Posted1000045212026Document 100004521 posted in company code 1000
22ErrorCost center 4390 is not valid on 31.10.2026
31ErrorDocument is not balanced: debit 8,500.00, credit 0.00
A view built with fictional sample data; not real system data.

How does the program work?

  1. 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.
  2. 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.
  3. 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.
  4. In test mode only the check runs and all messages are listed.
  5. 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

CA Package Custom

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 …

5 components · v1.0

Related reports

CO Program Custom Mass upload

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 …

COSP · CSKS · CSKB

FI Report Custom ALV report

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 …

VBKPF · BKPF · VBSEGS · T001

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.

Related report: Mass G/L Journal Entry Upload from Excel