Open Item Management (OIM) is one of the most core features in SAP Financials (FI). For G/L accounts like clearing accounts, goods receipt / invoice receipt (GR/IR) accounts, or bank sub-accounts, OIM allows you to track and offset related postings (e.g., matching a vendor invoice with its outgoing payment).
With the advent of SAP S/4HANA and the Universal Journal (ACDOCA table), the data modeling and technical handling of these open items have evolved drastically. In this article, I will shed light on how to interact with open items at the table level and discuss some common pitfalls.
Data Modeling in ACDOCA
In traditional ECC systems, open and cleared items for AR/AP were physically split across tables like BSIK/BSAK, whilst G/L open items lived in BSIS/BSAS. Under S/4HANA, every single line item merges directly into the central ACDOCA table.
The old BS* tables technically still exist, but they now function as Core Data Services (CDS) / DDL SQL-Views (Compatibility Views), projecting data on-the-fly from ACDOCA and BKPF to prevent legacy ABAP code from crashing.
To separate open from cleared items directly in ACDOCA using pure SQL or ABAP, we focus predominantly on two key fields:
AUGDT(Clearing Date)AUGBL(Clearing Document Number)
A simple Open-Item SQL Select:
SELECT rbukrs, racct, belnr, drcrk, hsl
FROM acdoca
WHERE rclnt = @sy-mandt
AND rbukrs = '1000'
AND racct = '0000113100' " Bank Clearing Account
AND augdt IS INITIAL " Empty = Still completely open!
INTO TABLE @DATA(lt_open_items).
S/4HANA’s architecture leans heavily on in-memory performance. You no longer need to calculate aggregated balances from sluggish totals tables (GLT0, FAGLFLEXT) within your views; you simply crunch the exact line items filtering dynamically via AUGDT IS INITIAL.
Retrospectively Activating OIM
A classic scenario in nearly every Corporate IT SAP migration project: A G/L account was mistakenly created without the Open Item Management flag ticked, and postings have already occurred. Suddenly, the accounting department realizes: “We urgently need to clear items on this account!”
In older systems, this necessitated dragging balances around and building custom z-Reports. In S/4HANA, we leverage the official framework. The critical transaction for this is:
Transaction: FAGL_ACTIVATE_OP (or program FAGL_ACTIVATE_OP)
Prerequisites for a smooth conversion:
- The account balance must be zero (depending on your exact ledger approach, or handled cautiously otherwise).
- The account must be unblocked for posting within the company code segment master data (Control Data tab).
- Ensure you trigger the report in a test run first.
Behind the scenes, the report alters the master record (Table SKB1, setting XOPVW = 'X') and sweeps through your existing entries in ACDOCA, forcefully restamping them with an “open” status. The previously booked amounts will surface as one or more open item blocks, documenting the precise date OIM commenced.
Automated Clearing within the System
If you want to drastically automate the clearing of your OIM-managed accounts in an S/4HANA landscape, you utilize the Fiori application “Clear G/L Accounts Automatically” (the successor to the good old F.13).
Technically, the machinery here ingests rules derived from your configuration (OB74). The exact fields you map there (such as ZUONR / Assignment Number or Reference XBLNR) act as the algorithm’s matching criteria. If both the debit and credit combinations balance to zero and share identical criteria, the program instantaneously generates a pure clearing document (populating AUGBL)—completely bypassing manual dialogue processing via FB05.
Conclusion
OIM-managed accounts enforce critical discipline on clearing, tax, and payroll-related accounts. With S/4HANA’s consolidation into ACDOCA combined with highly optimized Fiori apps, SAP has provided incredibly potent tools. However, developers designing ABAP reports or CDS views must adapt to the new data structures around AUGDT to prevent erroneous balance reads.