# G/L Line Items with Offsetting Account and Business Partner Report

> A custom ALV general ledger report that lists the line items of selected G/L accounts with debit, credit and running balance, and adds the offsetting account, the customer or vendor and the trading partner to every row. It produces one file for auditor and tax advisor requests.

- Type: Report, Custom development, ALV report
- Module: FI
- Estimated effort: M (4–6 working days)
- Last updated: 2026-11-17
- URL: https://nekuhub.com/en/reports/gl-line-items-offsetting-account-partner-report/


## Why is the standard not enough?

FBL3N and FAGLL03 list G/L line items, but the offsetting account and the customer/vendor name from the same document are not on the row; even with extra fields only the partner on that line is filled. A running balance and separate debit/credit columns are not part of the standard layout either. For the classic ledger format auditors ask for, the data is matched document by document in Excel.

### Closest standard alternatives

- FBL3N: Lists G/L line items; the offsetting account and the document's partner are not on the row.
- FAGLL03: Shows new G/L line items; gives no running balance or offsetting account name.

## Tables used

| Table | Role | Access | Join | System |
|---|---|---|---|---|
| BKPF | Document header: posting date, document type, reference (driving table) | Read | - | ECC + S/4 |
| BSEG | Document lines: account, amount, partner, cost center, trading partner | Read | BSEG-BUKRS = BKPF-BUKRS AND BSEG-BELNR = BKPF-BELNR AND BSEG-GJAHR = BKPF-GJAHR | ECC + S/4 |
| SKAT | G/L and offsetting account names | Read | SKAT-KTOPL = T001-KTOPL AND SKAT-SAKNR = BSEG-HKONT AND SKAT-SPRAS = SY-LANGU | ECC + S/4 |
| KNA1 | Customer name | Read | KNA1-KUNNR = BSEG-KUNNR | ECC + S/4 |
| LFA1 | Vendor name | Read | LFA1-LIFNR = BSEG-LIFNR | ECC + S/4 |
| T001 | Chart of accounts and company code currency | Read | T001-BUKRS = BKPF-BUKRS | ECC + S/4 |
| ACDOCA | All line items including the offsetting account (GKONT) on S/4HANA | Read | RBUKRS = BKPF-BUKRS AND BELNR = BKPF-BELNR AND GJAHR = BKPF-GJAHR | S/4HANA only |

## Selection screen parameters

| Parameter | Description | Type | Reference field | Required |
|---|---|---|---|---|
| S_BUKRS | Company code | Range / multiple | BKPF-BUKRS | Yes |
| S_HKONT | G/L account | Range / multiple | BSEG-HKONT | Yes |
| S_BUDAT | Posting date | Range / multiple | BKPF-BUDAT | Yes |
| S_BLART | Document type | Range / multiple | BKPF-BLART | No |
| S_KOSTL | Cost center | Range / multiple | BSEG-KOSTL | No |
| S_PRCTR | Profit center | Range / multiple | BSEG-PRCTR | No |
| P_OPEN | Show opening and running balance | Checkbox | - | No |

## Output columns

| Column | Source |
|---|---|
| G/L account | BSEG-HKONT |
| Account name | SKAT-TXT50 |
| Posting date | BKPF-BUDAT |
| Document | BKPF-BELNR |
| Document type | BKPF-BLART |
| Reference | BKPF-XBLNR |
| Text | BSEG-SGTXT |
| Debit | Calculated: BSEG-DMBTR when SHKZG = S |
| Credit | Calculated: BSEG-DMBTR when SHKZG = H |
| Running balance | Calculated: Opening balance + debit − credit (cumulative per account) |
| Offsetting account | Calculated: BSEG-HKONT of the opposite-side line in the same document (largest amount when several) |
| Offsetting account name | Calculated: SKAT-TXT50 text of the offsetting account |
| Partner | Calculated: BSEG-KUNNR or BSEG-LIFNR from the line or from the document's D/K line |
| Partner name | Calculated: KNA1-NAME1 or LFA1-NAME1 |
| Trading partner | BSEG-VBUND |
| Cost center | BSEG-KOSTL |

## How does the report work?

1. Document headers are read from BKPF by company code, posting date range and document type; reversals and parked documents are excluded.
2. The BSEG lines of the documents are read; lines within the S_HKONT range become report rows.
3. Partner: when KUNNR/LIFNR is filled on the line it is used; otherwise it is taken from the customer (KOART = D) or vendor (KOART = K) line of the same document. The name is added from KNA1/LFA1.
4. Offsetting account: in a two-line document, the account of the other line; in a multi-line document, the account of the largest line on the opposite side, flagged as "multiple" when there are several. The account name is read from SKAT (with T001-KTOPL).
5. The amount goes to the debit or credit column by SHKZG; the opening balance comes from the totals before the period and a running balance is calculated per account.

## Authorization objects

- F_BKPF_BUK: Accounting document display authorization by company code
- F_SKA1_BUK: G/L account authorization by company code
- F_BKPF_KOA: Document authorization by account type (customer/vendor lines)

## Frequently asked questions

### How is the offsetting account determined in multi-line documents?

The account of the largest opposite-side line is used, and the row is flagged as "multiple" when there are several. Optionally, a view that produces one row per offsetting line can be added.

### Where does the opening balance come from?

It is taken from the account totals before the period (FAGLFLEXT in the new G/L), so the running balance agrees with the G/L account balance.

### Is it still needed on S/4HANA?

On S/4HANA the offsetting account is already in ACDOCA and the report is simpler to build; for the running balance, partner names and the audit layout a custom list is still preferred.

---
Let us build this report for your system: https://nekuhub.com/en/request-a-quote/?report=fi-gl-line-items-partner-offset
