Lesson 4 of 5
Margin reconciliation
9 min
Listen to this lesson
The margin report is the controlling result executives look at first, and the one auditors ask about. The test is simple to state: revenue and cost of goods sold in the margin report agree with revenue and COGS in finance for the same company code, period and ledger. Every difference is either a known design difference that is documented, or a defect.
Why margin analysis should reconcile by design
In S/4HANA, margin analysis is part of the Universal Journal. Revenue, sales deductions and COGS are posted once, on G/L accounts, and the same journal entry lines carry the market segment. SAP describes the result as reconciled with the income statement. That gives you a powerful test: if the margin report and the P&L disagree on the same accounts, the difference is not timing or valuation, it is a reporting or derivation issue, such as lines without a market segment, a report filter, or a hierarchy that misses an account.
Contoso adds one complication. Its ECC system used costing-based CO-PA, and for the first year after the conversion Contoso keeps it running alongside margin analysis so that management reports can be compared. Costing-based CO-PA stores its data separately in value fields, and SAP's own comparison notes that reconciling it with financial accounting is a challenge. Differences there can be legitimate: different valuation of COGS, statistical conditions, or timing.
| Margin analysis (account-based) | Costing-based CO-PA | |
|---|---|---|
| Storage | Universal Journal lines | Separate CO-PA tables with value fields |
| Expected match with the G/L | Exact for the same accounts, period and ledger | Close, with documented differences |
| Common reasons for differences | Missing characteristics, report filters, account hierarchy | Valuation, timing, statistical values, value field mapping |
| Test approach | Tie out to the trial balance; zero difference expected | Bridge table explaining each difference |
The reconciliation itself
- Fix the scopeCompany code 1710, May, leading ledger 0L, revenue and COGS accounts
- Pull both sidesMargin report totals by account; trial balance for the same accounts
- Compare by accountRevenue, sales deductions, COGS; zero difference expected for margin analysis
- InvestigateLines with blank market segment; filters; accounts outside the hierarchy
- BridgeFor costing-based CO-PA, a table that explains each difference with amounts
Start with totals, then go down. If revenue matches but COGS does not, look at the COGS split: in S/4HANA, COGS can be split into cost components on separate accounts at goods issue, based on the material's cost estimate. A margin report built on the old single COGS account will miss the split accounts, and the difference equals exactly the split amount: labor is USD 26 of the USD 150 Detroit standard, so a missing labor split account hides 26/150 of COGS. If both match in total but a customer's margin looks wrong, go back to derivation tests: the total is right, the segment is not.
| Line | Trial balance | Margin report | Difference | Explanation |
|---|---|---|---|---|
| Revenue | $1,240,000 | $1,240,000 | $0 | Matches |
| Sales deductions | ($37,200) | ($37,200) | $0 | Matches |
| COGS | ($744,000) | ($615,040) | ($128,960) | Report misses the labor COGS split account: 26/150 × $744,000 = $128,960; defect in report definition |
| Lines without market segment | $0 | None found this month |
Contoso May reconciliation for company code 1710 (illustrative values).
Below the totals
Once totals agree, reconcile one level down along the dimensions management actually uses: by profit center (Fleet and Aftermarket), by sales organization, and for the top customers such as Great Lakes Fleet Services. At this level you are checking derivation again, but with real volumes. A useful control is a daily or weekly report of journal entry lines on revenue and COGS accounts with a blank market segment or a dummy profit center. In a healthy system it is empty or nearly empty; during testing it is the fastest way to find derivation gaps nobody wrote a test case for. Build it once on the Universal Journal: lines in company code 1710, ledger 0L, on the revenue and COGS account ranges, where the market segment fields (customer, product) are empty or PRCTR is the dummy profit center. In Fiori a saved view of the journal entry line item apps does the job; in Private Edition a released CDS view or query works too. Avoid direct table reads in custom code, which a clean-core design discourages. Add the intercompany view too: revenue that company code 1710 records for sales to 1810 Toledo should appear as internal revenue in the margin report and be eliminated, not counted as external sales.
What would you do?
In UAT, margin analysis revenue for May is $1,240,000 and finance revenue is $1,252,000 for the same company code, period, ledger and accounts. Maria says the difference is "probably timing." What should the tester do?
- Margin analysis and finance read the same journal lines; for the same scope they should match exactly.
- Differences point to missing market segments, report filters, account hierarchies or the COGS split.
- Costing-based CO-PA, if kept in parallel, needs a bridge table that explains each difference.
- Reconcile totals first, then use derivation tests to check segment-level margins.
Check your understanding · not graded
Lesson check
1. Margin analysis revenue differs from finance revenue on the same scope. What is likely?
2. Why might costing-based CO-PA differ from the G/L?
3. A margin report misses one COGS split account. What does the difference equal?
4. Contoso runs costing-based CO-PA in parallel for the first year. What evidence does Dan ask for each month?