Lesson 2 of 5
Derivation tests
11 min
Listen to this lesson
Most controlling defects in a new or converted system are not calculation errors. They are derivation errors: the right amount on the wrong object. A purchase posts to the wrong cost center, a billing document gets the default profit center, a market segment is missing the customer group. Each posting balances, nothing errors, and the month-end report is wrong. Derivation tests check, process by process, that each posting lands on the right cost object, profit center and market segment, and that missing information fails safely instead of landing somewhere convenient.
Where objects come from
| Object | Typical source | Process example at Contoso |
|---|---|---|
| Cost center | Account assignment on the document, or a default by account | Non-stock PO for workshop tools: cost center 17101101 Detroit Assembly |
| Order | Production or internal order on the document | Material issue to a CMC-ALT-100 production order |
| Profit center | Material plant data, cost center or order master data | Sale of CMC-ALT-100 from plant 1710: profit center Fleet |
| Market segment | Derived at posting from customer, product, sales area and derivation rules | Billing to Great Lakes Fleet Services: customer, product, sales org 1710, customer group |
In S/4HANA margin analysis, market segment characteristics are attached to the journal entry when it posts, so each revenue and COGS line carries them immediately. That makes derivation testable in the same transaction: post the billing document and inspect the journal entry lines. Profit center derivation is just as visible: the profit center sits on every line of the Universal Journal, and document splitting or inheritance carries it to offsetting lines where configured.
- Pick the processOrder-to-cash for CMC-ALT-100 to Great Lakes Fleet Services
- Predict the objectsProfit center Fleet; sales org 1710; customer group fleet; product CMC-ALT-100
- Post the documentsSales order, delivery and goods issue, billing
- Inspect the journal entryRevenue and COGS lines show predicted profit center and characteristics
- Record evidenceJournal entry number, the lines, and the expected-versus-actual table
Negative tests: failing safely
Every derivation rule has a gap. What happens when the material has no profit center in plant 1720, when a G/L account that needs a cost object is posted without one, or when a new customer has no customer group? A good system either blocks the posting with a clear message or posts to a visible default that someone reviews every day, such as a dummy profit center. A bad system posts quietly to a real object. Negative tests prove which of those happens, and they are often where conversion defects hide, because ECC data that was "always fine" meets stricter S/4HANA validations.
| Negative test | Expected safe behavior | Unsafe result to look for |
|---|---|---|
| Expense to a cost-relevant P&L account with no cost object | Posting blocked: account assignment to a CO object required | Posting accepted with a default cost center nobody reviews |
| Sale of a material with no profit center in plant 1720 | Blocked, or posted to the dummy profit center and reported daily | Posted to profit center Fleet by an old substitution |
| Billing for a customer without customer group | Characteristic blank and visible in an exception report | Characteristic filled with a wrong default from a derivation rule |
| Order settlement with no settlement rule | Settlement error; order balance stays visible | Settled to a default receiver without approval |
Negative derivation tests for Contoso. Each one should fail visibly.
Derivation tests need deliberate test data. For each process, prepare one record with complete master data and one with a known gap: a material with and without a profit center in plant 1720, a customer with and without a customer group, a G/L account with and without a default cost center. Name the records so their purpose is obvious in the test case, and protect them from being "fixed" by well-meaning data stewards during the test cycle. Run the same cases again after any change to substitutions, derivation rules or master data governance, because derivation is where small changes have wide effects.
- Does the posting carry an explicit object (cost center, order) from the user?Yes → test that it is kept · No → next question
- Is the object derived from master data (material plant data, cost center)?Yes → test with complete and incomplete master data · No → next question
- Is the object derived by a rule or substitution?Yes → test each rule branch, including the "no match" path · No → it should be blocked: test the block
What would you do?
A tester finds that a sale of CMC-ALT-100 from plant 1720 Chicago posts revenue to profit center Fleet, although the design says Aftermarket. The material's plant 1720 data has no profit center. What is the most likely cause, and what should the test record?
- Most controlling defects are derivation errors: the right amount on the wrong object.
- Predict the cost object, profit center and market segment before posting, then inspect the journal entry.
- Negative tests prove that missing data blocks the posting or lands on a visible default.
- Test every converted substitution and derivation rule, including its "no match" path.
Check your understanding · not graded
Lesson check
1. What is a derivation error?
2. Where does margin analysis store market segment characteristics?
3. What is the safe outcome when a cost-relevant expense has no cost object?
4. Why test converted ECC substitutions?