Sub topic 6
Finance and Controlling
This chapter assumes you know the idea of an ERP system, basic double-entry bookkeeping (debits, credits, accounts), and basic relational database concepts such as tables, keys, and joins. It also assumes you have read the chapter on organizational structure, because every Finance object below is tied to a company code or a controlling area.
What Finance and Controlling cover
Finance and Controlling are usually written together as FI/CO. They answer two different questions.
- Financial Accounting (FI) records what the legal entity owns, owes, earns, and spends. Its output is the balance sheet and the profit and loss statement, which external parties such as auditors and tax authorities read.
- Controlling (CO) records where and why costs and revenues arise inside the company. Its output is for managers, such as cost reports per department, product, or project.
Both consume the same business events. A supplier invoice for office rent is an FI event (it creates a payable and an expense). CO asks which cost center should carry that expense. In S/4HANA both views share one posting, which the next chapter covers as the Universal Journal.
| Area | Main audience | Central objects | Typical question |
|---|---|---|---|
| FI General Ledger | Auditors, tax, group reporting | G/L accounts, chart of accounts, ledgers | What is our revenue for 2024? |
| FI Accounts Payable | Purchasing, treasury | Supplier (business partner), open items | What do we owe, and when is it due? |
| FI Accounts Receivable | Sales, credit management | Customer (business partner), open items | Who has not paid yet? |
| FI Asset Accounting | Finance, tax | Asset master records, depreciation areas | What is a machine worth today? |
| CO Cost Center Accounting | Department managers | Cost centers, cost elements | What did Marketing spend? |
| CO Profit Center Accounting | Business unit heads | Profit centers | Which unit makes a profit? |
| CO Product Costing | Production, controlling | Cost estimates, production orders | What does one unit cost to make? |
| CO Profitability Analysis | Sales management | Characteristics and value fields | Which customer or product is profitable? |
The building blocks of FI
Chart of accounts and G/L accounts
A chart of accounts is the list of G/L accounts a company uses. Each G/L account is a number with a name, such as 400000 "Revenue domestic". Two levels matter:
- The chart of accounts level holds data valid everywhere, such as the account number, account type (balance sheet or P&L), and description.
- The company code level holds data specific to one legal entity, such as the account currency and whether line item display is on.
An account must exist at both levels before a company code can post to it. Missing company-code-level data is a common cause of "account not created in company code" errors during configuration and test migrations.
Company code and fiscal year
The company code is the smallest organizational unit for which a complete, self-contained set of books can be drawn up. It carries a local currency (the company code currency), and it is the key that links to the general ledger. A fiscal year variant defines the posting periods, often 12 regular periods plus special periods 13 to 16 for year-end adjustments. A posting period variant controls which periods are open. Posting to a closed period is rejected, which is the usual error at month end.
Ledgers
A ledger holds a complete set of line items for one accounting principle. The leading ledger, ID 0L, follows the group's main principle such as IFRS. A non-leading ledger can carry a second principle such as local GAAP. Most documents post to all ledgers. Adjustments that differ by principle go to one specific ledger only.
Subledgers
Accounts Payable and Accounts Receivable keep per-partner detail. Each supplier or customer has a reconciliation account in the general ledger. Postings to the partner update the subledger and the reconciliation account together, so the two never drift apart. You cannot post directly to a reconciliation account. Attempting to do so is rejected, and this is by design.
A posting step by step
Every accounting document has a header and at least two line items, and debits must equal credits. Consider a supplier invoice for 1,000 EUR net with 19% input tax, posted in company code 1010.
| Line | Account | Debit | Credit |
|---|---|---|---|
| 1 | Expense (for example 476000, with cost center) | 1,000.00 | |
| 2 | Input tax | 190.00 | |
| 3 | Payables, supplier reconciliation account | 1,190.00 |
When the payment run pays the supplier, a second document debits the payables account and credits the bank account. The supplier's open item is cleared by a clearing document that links both postings.
The building blocks of CO
CO works inside a controlling area, which can span one or more company codes. It uses these objects:
- Cost center: a place where costs occur, such as a department. It collects costs but does not earn revenue.
- Internal order: a temporary object that collects costs for a specific job or event, such as a trade fair.
- Profit center: a unit for which you want a profit and loss view. Revenues and costs both post to it.
- WBS element: a project structure element from Project System, which can also collect costs and revenue.
- Cost element: in S/4HANA, cost elements are G/L accounts. Primary cost elements are G/L accounts of type "primary costs or revenue". Secondary cost elements are used only inside CO for allocations.
Typical CO activities are:
- Posting primary costs to cost centers through FI documents.
- Allocations such as assessments and distributions, which move costs from one object to another, for example from IT to the departments that use IT services.
- Settlement of internal orders and projects to their receivers.
- Product costing, which calculates what a material costs, based on bills of materials and routings.
- Variance calculation at period end between actual and planned production cost.
Reading FI data directly
Finance line items live in one table. This query sums the company code currency amount per G/L account for company code 1010 in the leading ledger.
SELECT rbukrs, racct, SUM( hsl ) AS balance
FROM acdoca
WHERE rldnr = '0L'
AND rbukrs = '1010'
AND gjahr = '2024'
GROUP BY rbukrs, racct
INTO TABLE @DATA(balances).rldnr is the ledger, rbukrs the company code, racct the G/L account, and hsl the amount in company code currency. Debits are positive and credits negative, so revenue accounts show negative balances. Always filter on the ledger. Without it, the sum counts the same business event once per ledger and the totals are wrong.
Common errors and edge cases
- Period closed. The posting date falls in a period the posting period variant has closed. Open the period or post in a later one.
- Missing account assignment. An expense account that requires a cost object (set through field status or account type) rejects a posting without a cost center, order, or WBS element.
- Unbalanced documents. A document with debits not equal to credits cannot be posted. This is mostly seen in custom upload programs.
- Foreign currency. A document keeps its transaction currency and also stores amounts in company code currency and, if configured, group currency. Exchange rate differences arise when open items are cleared at a different rate and are posted automatically to configured gain and loss accounts.
- Clearing versus reversal. Clearing links open items but changes nothing in the amounts. A reversal creates a new document with opposite signs. Use reversal to correct a mistake and clearing to settle items.
- Reconciliation account posted manually. Blocked for control reasons, so use the subledger.
Exercise
A supplier invoice of 2,000.00 net with 10% input tax is posted. List the three line items with debit and credit, and state which account is updated in the subledger.
Show answer
Debit expense 2,000.00 (with a cost center), debit input tax 200.00, credit supplier reconciliation account 2,200.00. The credit line also updates the supplier's open item in the Accounts Payable subledger.
Exercise
A report built on ACDOCA for company code 1010 shows twice the expected revenue after a non-leading ledger was added. What is the most likely cause and the fix?
Show answer
The query has no filter on the ledger (RLDNR), so each business event is counted once per ledger. Add a condition such as rldnr = '0L' to read only the leading ledger.
Exercise
Explain the difference between a cost center and a profit center.
Show answer
A cost center collects costs for a department and has no revenue. A profit center receives both revenues and costs, so you can see the profit of a business unit.