Lesson 6 of 6
Testing cost center postings and reports
9 min
Listen to this lesson
Cost center accounting is easy to test badly: post an invoice, see a number, call it passed. Good testing proves the rules that put costs in the right place, the corrections that move them, the structures that total them, and the reports that show them. Priya's team built the cost center part of Contoso's finance regression pack around four questions, and the evidence for each is concrete: line items and report totals that match the postings made.
Test data that makes results checkable
Use amounts that are easy to trace: $1,111.11 to Detroit Maintenance, $2,222.22 to Chicago Maintenance, in a period with no other test traffic for those cost centers, or with a known starting balance recorded before the test. Use test cost centers that exist in client 100 of CMQ with the same profit center assignments as production. And record document numbers, because evidence that says "posted an invoice" without a number cannot be re-checked.
| ID | Test | Expected result | Evidence |
|---|---|---|---|
| CO-CC-01 | Post a supplier invoice with cost center 17101102 | Line item on 17101102; profit center and segment derived as designed | Journal entry and cost center line item, document number |
| CO-CC-02 | Post on the maintenance materials account without a cost center | Validation stops the posting with the agreed message | Screenshot or log of the message |
| CO-CC-03 | Automatic price difference in plant 1710 | Default account assignment puts it on Detroit Assembly | Line item with the default cost center |
| CO-CC-04 | Repost the CO-CC-01 line to Chicago Maintenance | Detroit reduced, Chicago increased, reference to the original document, combined total unchanged | Reposting document, both line item lists |
| CO-CC-05 | Create test cost center; run the IT allocation test run | New cost center receives its share as a member of the receiver group | Allocation test run log |
| CO-CC-06 | Standard hierarchy totals | Top node of CMC_STD equals the sum of all cost center actuals for the period | Report totals by node |
| CO-CC-07 | Plan/actual report for test cost centers | Plan column equals the saved plan; actual column equals test postings | Report output compared with the planning sheet and documents |
| CO-CC-08 | Posting to a locked or expired cost center | Posting rejected | Error message |
Extract of Contoso's cost center regression tests.
Allocations: test run first
Allocation cycles are tested with their own safety net. SAP's material describes the Run Allocations app, which runs cycle groups as a test run or productive run and can reverse a run, with a protocol documenting the results. Contoso runs every changed cycle as a test run in CMQ, compares the protocol with the expected sender credits and receiver debits, then runs it productively and checks that the sender's credited amount equals the receivers' total. Segment reversal and rebooking are part of the test too, because they are what the team will use when a real allocation goes wrong at month-end. In Private Edition the classic cycles (KSU5, KSV5) still run alongside the Fiori allocation apps; Contoso's design document names one tool per allocation, so the regression pack never tests a cycle that nobody runs in production, and no cost is allocated twice.
- Record starting balancesSender and receiver cost centers for the period
- Test runProtocol shows planned credits and debits; compare with the expected tracing factors
- Productive runPostings created; sender credited, receivers debited
- Check totalsSender credit equals sum of receiver debits; company total unchanged
- Reverse and rerunReverse the run, confirm balances return, run again
Hierarchy totals and completeness
Because every cost center must be in the standard hierarchy, its top node is a completeness control. The test compares the top node's actuals for the period with the total of cost-center-relevant postings in the Universal Journal for the same company codes, period and ledger. They must be equal. Then the test checks a few nodes: the Detroit plant node equals the sum of its cost centers. A difference usually means a cost center in the wrong node, or a report using an outdated runtime hierarchy.
What would you do?
In the regression run, CO-CC-06 fails: the CMC_STD top node is $3,450 lower than total cost center actuals for the period. All other tests passed. What is the most useful next step?
- Test four layers: derivation, corrections, structures and allocations, planning and reporting.
- Use traceable amounts and record document numbers as evidence.
- Test allocation cycles with a test run, a productive run, a total check and a reversal.
- The standard hierarchy top node is a completeness control against total actuals.
- Reports pass only when they show exactly the plan saved and the postings made.
Check your understanding · not graded
Lesson check
1. What is the best evidence for a derivation test?
2. After a reposting between two cost centers, what must stay unchanged?
3. What does a test run in Run Allocations give you?
4. Why use amounts like $1,111.11 in tests?