The General Ledger (G/L) is the central accounting record in SAP. Every financial transaction in the system — whether it originates from Accounts Payable, Accounts Receivable, Asset Accounting, or Materials Management — ultimately posts to the G/L. Understanding it is the foundation of everything else in SAP FI.

In this guide, we'll walk through the core concepts step by step, using plain language and practical examples from SAP S/4HANA Cloud.

What is the General Ledger?

In traditional accounting, the general ledger is the "book of record" — the complete list of all financial transactions for a company. In SAP, the G/L serves the same purpose, but it's also the integration point between all other modules.

When a vendor invoice is posted in Accounts Payable, it automatically creates a G/L entry. When goods are received in the warehouse (Materials Management), the stock value posts to the G/L. This automatic integration is one of SAP's most powerful features — and the G/L is where it all comes together.

Key concept

In SAP S/4HANA Cloud, the Universal Journal (table ACDOCA) stores all accounting documents in a single table — combining FI, CO, asset accounting, and more. This eliminates reconciliation between modules and gives a real-time view of the financial position.

Chart of Accounts

Before any G/L posting can happen, SAP needs to know which accounts exist. This is defined in the Chart of Accounts (CoA) — a structured list of all G/L accounts available to a company.

SAP uses a three-level structure:

  • Chart of Accounts level — the account number and description (shared across all company codes that use the same CoA)
  • Company Code level — local settings per legal entity (currency, account group, tax settings)
  • Segment level — additional data for segment reporting (in S/4HANA Cloud)

G/L Account Types

Not all G/L accounts work the same way. SAP classifies accounts by their account type, which controls how they behave in postings:

Account TypeExamplesBalance Sheet / P&L
Balance Sheet AccountCash, Receivables, Fixed Assets, PayablesBalance Sheet
P&L Account — RevenueSales Revenue, Service IncomeP&L
P&L Account — ExpenseCost of Goods Sold, Rent, SalariesP&L
Primary Cost ElementDirect costs mapped to COP&L + CO
Secondary Cost ElementInternal allocations (CO only)CO only

Posting Keys & Document Types

Every G/L posting in SAP is controlled by two key configuration elements:

Posting Keys are two-digit codes that determine whether a line item is a debit or credit, and which account type it can post to. For example, posting key 40 is a G/L account debit, and 50 is a G/L account credit.

Document Types classify the nature of a posting — SA for general ledger documents, KR for vendor invoices, DR for customer invoices, and so on. They also control the number range assigned to the document.

Definition
SAP Accounting Document

Every posting in SAP creates an accounting document — a permanent, auditable record of the transaction. Each document has a header (date, company code, document type) and at least two line items that balance to zero (debits = credits).

The Posting Flow in S/4HANA

Here's how a typical financial transaction moves through the system — using a vendor invoice as an example:

SAP S/4HANA — Vendor Invoice Posting Flow
01
Vendor Invoice Received
02
Posted in Accounts Payable (MIRO)
03
G/L Document Created Automatically
04
Vendor Account Updated
05
Payment Run (F110)
Step 3 (highlighted) is where the G/L entry is created — automatically, without manual intervention.

This automatic posting is a key strength of SAP's integrated architecture. The accountant doesn't need to manually post to the G/L — it happens as a by-product of the operational transaction in AP.

Period-End Closing

At the end of each accounting period, a series of activities must be completed before the books can be closed. In SAP FI, these typically include:

  1. Posting accruals and deferrals (recurring entries)
  2. Running the foreign currency valuation (for open items in foreign currency)
  3. Clearing GR/IR accounts (goods received but not yet invoiced)
  4. Running depreciation (Asset Accounting integration)
  5. Executing profit center and segment allocation runs
  6. Closing the posting period (so no further postings can be made)
  7. Generating the financial statements (balance sheet, P&L)
Tip for SAP professionals

In SAP S/4HANA Cloud, many period-end activities are automated via Financial Closing Cockpit, which lets you schedule, monitor, and track closing tasks across multiple company codes in a single dashboard.

Key Terms Glossary

Company Code

The smallest organisational unit in SAP FI for which a complete, self-contained set of accounts can be drawn up. Represents a legal entity.

Posting Period

A time interval (usually a calendar month) during which financial transactions can be posted. Controlled via the posting period variant.

Document Number

A unique identifier assigned to every accounting document in SAP. Together with company code and fiscal year, it uniquely identifies a posting.

Fiscal Year Variant

Defines the structure of the fiscal year — how many periods it contains and whether they align with the calendar year.

Reconciliation Account

A G/L account that is automatically updated when postings are made to a sub-ledger (e.g., vendor account). Cannot be posted to directly.


Ready to master SAP Finance hands-on?

Master the intelligent ERP at the heart of modern enterprises. Comprehensive SAP training designed for career changers.