Mass Open Item Clearing Upload from Excel (Customer, Vendor, G/L)
Short answer: A custom program that clears open items grouped in an Excel file on customer, vendor or G/L accounts in bulk. Each group becomes one clearing document; small differences within tolerance go to a difference account, and everything can be checked in test mode without posting.
- Estimated effort
- M · 4–7 working days
- System
- ECC and S/4HANA
- Tables
- 5
- Scope
- Global
- Built by
- NeKuDos Teknoloji
- Last updated
Why is the standard not enough?
F-32, F-44 and F-03 clear one account at a time on screen. F.13 automatic clearing only closes items that match exactly on configured common fields (assignment, reference); it does not take an external matching list from a reconciliation exercise or a bank. In factoring, netting or clearing-account clean-ups, hundreds of items are cleared by hand.
Who uses it? Accounts receivable and payable teams, and G/L specialists who reconcile bank and clearing accounts.
Closest standard alternatives
Tables used
The tables the program reads and updates. ECC and S/4HANA differences are marked separately.
| Table | Role | Access | System |
|---|---|---|---|
| BSIDCustomer Open Items | Customer open items to be cleared | Read | ECC + S/4 |
| BSIKVendor Open Items | Vendor open items to be cleared | Read | ECC + S/4 |
| BSISG/L Account Open Items (Secondary Index) | G/L open items to be cleared | Read | ECC + S/4 |
| BKPFAccounting Document Header | Header of the resulting clearing document | Write | ECC + S/4 |
| BSEGAccounting Document Segment | Clearing document items and the clearing data on the cleared items | Write | ECC + S/4 |
S/4HANA notes
- BSID → I_OperationalAcctgDocItem: In S/4HANA BSID is no longer filled as a separate index table; reads work through a compatibility view of the same name. For new developments the I_OperationalAcctgDocItem CDS view is recommended.
- BSIK: In S/4HANA BSIK is no longer filled as a separate index table; reads work through a compatibility view. For new developments the I_OperationalAcctgDocItem CDS view is recommended.
- BSIS → ACDOCA: In S/4HANA BSIS is no longer filled as a separate index table; it is read through a compatibility view of the same name. New developments should use ACDOCA or the related CDS views.
BAPIs and functions used
- POSTING_INTERFACE_STARTStart Internal Posting Interface. Starts the posting interface session
- POSTING_INTERFACE_CLEARINGPost with Clearing via Internal Posting Interface. Creates the clearing document for each group
- POSTING_INTERFACE_ENDEnd Internal Posting Interface. Closes the posting interface session
Selection screen parameters
| Parameter | Description | Type | Reference field | Required | Example |
|---|---|---|---|---|---|
| P_FILE | Upload file (XLSX or CSV) | Single value | — | Yes | C:\temp\denklestirme.xlsx |
| P_TEST | Test mode (check without posting) | Checkbox | — | No | X |
| P_TOL | Allowed difference per group (local currency) | Single value | — | No | 5,00 |
| P_RESID | Leave a difference outside tolerance as a residual item | Checkbox | — | No | — |
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 | Group key | By rule Rows with the same key are cleared in one clearing document | Yes |
| 2 | Company code | BKPF-BUKRS | Yes |
| 3 | Account type (D/K/S) | BSEG-KOART | Yes |
| 4 | Account | By rule Customer (KUNNR), vendor (LIFNR) or G/L account (HKONT) by account type | Yes |
| 5 | Document number | BSEG-BELNR | Yes |
| 6 | Fiscal year | BSEG-GJAHR | Yes |
| 7 | Line item | BSEG-BUZEI | Yes |
| 8 | Clearing date | BKPF-BUDAT | Yes |
| 9 | Document type | BKPF-BLART | No |
| 10 | Header text | BKPF-BKTXT | No |
Sample upload file
| 1 | Group key * | Company code * | Account type (D/K/S) * | Account * | Document number * | Fiscal year * | Line item * | Clearing date * | Document type | Header text |
|---|---|---|---|---|---|---|---|---|---|---|
| 2 | G001 | 1000 | D | 200150 | 1800012044 | 2026 | 001 | 11/17/2026 | AB | Factoring offset |
| 3 | G001 | 1000 | D | 200150 | 1400008210 | 2026 | 001 | 11/17/2026 | AB | Factoring offset |
| 4 | G002 | 1000 | S | 102150 | 100004512 | 2026 | 002 | 11/17/2026 | SA | Bank clearing account clean-up |
Result list columns
| # | Column | Source |
|---|---|---|
| 1 | Group | Calculated Group key from the file |
| 2 | Company code | BKPF-BUKRS |
| 3 | Number of items | Calculated Number of rows in the group |
| 4 | Difference | Calculated Signed amount total of the items in the group |
| 5 | Clearing document | BKPF-BELNR |
| 6 | Status | Calculated Cleared, test passed or error |
| 7 | Message | Calculated First error or success message returned by the posting interface |
Sample result list
| Group | Company code | Number of items | Difference | Clearing document | Status | Message |
|---|---|---|---|---|---|---|
| G001 | 1000 | 2 | 0 | 1400008342 | Cleared | Document 1400008342 posted |
| G002 | 1000 | 1 | 2.40 | Error | Group is not balanced; the difference is within tolerance but no difference account is defined | |
| G003 | 1000 | 4 | 0 | Error | Item 1800011987/2026/001 is already cleared |
How does the program work?
- The file is read; rows with the same group key are collected into one clearing transaction.
- Each row’s item is looked up in BSID, BSIK or BSIS by account type: the item must still be open and company code and account must match.
- The group balance is calculated; if the difference is within the P_TOL tolerance, a line to the difference account is added, otherwise the group fails (or, if selected, the remainder is left as a residual item).
- A session is opened with POSTING_INTERFACE_START, each group is cleared with POSTING_INTERFACE_CLEARING and the session is closed with POSTING_INTERFACE_END. Test mode only lists the checks and calculated differences.
- The result shows each group’s clearing document (BKPF) or error message; failed groups can be downloaded as a separate file.
Performance notes
Clearing creates one document per group; run files with a few thousand rows in the background. Open item checks read by key fields (company code, document, year, item).
Features
- Test mode (check without posting)
- Line-by-line result and error log
- Download failed lines as a separate file Failed groups can be corrected and uploaded again with the same template.
- Export to Excel An empty template and the open item list can be downloaded as Excel.
- Runs as a background job
Authorization objects
- F_BKPF_BUKPosting authorization by company code
- F_BKPF_KOAPosting authorization by account type (customer, vendor, G/L)
- F_BKPF_BLAAuthorization for the clearing document type
Frequently asked questions
Can items in different currencies be cleared in the same group?
Items with the same document currency are cleared in one group. For different currencies, a clearing currency rule is defined during installation; the exchange difference is posted to the standard exchange difference accounts.
Can customer and vendor items be closed in the same group?
Yes. When the customer is also a vendor, both account types can be in the same group for netting. The group is then closed with one clearing document.
How is a wrong clearing undone?
The clearing is reset with the standard FBRA and the document is reversed if needed. Because the program logs every document it creates, the documents to undo are easy to find.
Related reports
Unmatched Bank Statement Items on Clearing Accounts Report
A custom ALV report that lists electronic or manual bank statement items that were never posted, or were posted to a bank clearing account and are …
Customer–Vendor Netting Open Items Report
A custom ALV report that puts open receivables and payables side by side for business partners that exist both as a customer and as a vendor, and …
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.