SAP G/L line-item extract (FBL3N / BSEG / ACDOCA, documented shape)
A dump of posted general-ledger line items, which people read as signed amounts in one currency, when the amounts are unsigned magnitudes carrying a separate debit/credit flag, sit in several parallel currencies, and are keyed to a fiscal calendar that need not be the Gregorian one.
The shape, how the file is really laid out
Each line carries a debit/credit indicator (SHKZG: 'S' debit / 'H' credit) and
amount fields that are unsigned magnitudes, WRBTR in document currency, DMBTR
in company-code (local) currency, and parallel DMBE2 / DMBE3 for group or hard
currency. Three dates coexist: document date (BLDAT), posting date (BUDAT), and
entry date (CPUDT); the period (MONAT) and fiscal year (GJAHR) follow a fiscal-
year variant, with special periods 13-16 for year-end adjustments. The key is
company code (BUKRS) + document (BELNR) + year (GJAHR), line (BUZEI); the G/L
account is HKONT. An FBL3N ALV export ships whatever column layout variant the
user chose, and locale rendering may show a trailing-sign amount like
1.234,56- with a comma decimal.
The traps
Sign lives in SHKZG, not the number: DMBTR and WRBTR are positive magnitudes, so summing them without applying 'S'/'H' yields nonsense, every posting looks like a debit.
- Every trap in this export, worked through
- The reconciliation anchor, the total the file asserts about itself
- The refusal cases, when to stop and ask instead of guess
Reference: SAP Help Portal, G/L Account Line Item Display (FBL3N) and Financial Accounting document structure (BKPF/BSEG) · SAP Help Portal, Universal Journal (ACDOCA), fiscal year variant and special periods; parallel currencies (reference only)