Lesson 5 of 6
Event-based test design
10 min
Listen to this lesson
HR data changes through events: hire, rehire, transfer, promotion, data change, leave, termination. Each event changes different EC entities with an effective date, and each has a different footprint in S/4HANA. Test design for this integration is therefore event-based: for each event in scope, define the EC entry, the expected S/4HANA result field by field with dates, and the downstream check in a finance or logistics process.
The event matrix
| Event | EC entry (illustrative) | Expected in S/4HANA | Downstream check |
|---|---|---|---|
| Hire | Avery Kim, Detroit, 17101101, start Nov 2 | Personnel number, 0000 hire, 0001 with 17101101 from Nov 2; BP with BUP003 | Time confirmation on an order posts labor to 17101101 |
| Transfer (future-dated) | Entered Nov 20, effective Dec 1, Chicago, 17201101 | 0001 split on Dec 1; position and manager change on Dec 1 | Expense on Nov 28 posts to 17101101; on Dec 2 to 17201101 |
| Data change | New business email | 0105 updated; BP communication updated after sync | Workflow notification goes to the new address |
| Termination | Last day Jan 31 | 0000 termination action from Feb 1; BP marked accordingly | No time recording after Jan 31; open expenses settled, no new reimbursements |
| Rehire | Rehired Apr 1, same person | Same personnel number or new one per design; history kept | Expenses pay to the correct supplier role |
| Retroactive correction | Cost center for October corrected on Nov 15 | 0001 corrected for October | Controlling sees the correction; reposting decided by Dan |
Contoso's event matrix with field-level and downstream expectations.
Step by step: running one event test
- Prepare: confirm the test employee exists in the EC test instance and CMQ with matching key mapping; note the current infotype 0001 records.
- Enter the event in EC with the agreed effective date and save; capture the EC job history.
- Wait for the scheduled run or start the query program manually in CMQ; record the run time.
- Check the Data Replication Monitor entry: success, warning or error.
- In CMQ, check the infotype records with their validity dates against the expected values, then the OM relationships, then the business partner after sync.
- Run the downstream check: post a time confirmation or an expense on dates before and after the effective date; check the cost center on the journal entries.
- File the evidence: EC screenshot, monitor entry, infotype overview with dates, journal entries.
Test data and privacy
HR data is personal data. Test employees in the EC test instance should be synthetic, with names and identifiers that cannot be confused with real people, and the S/4HANA test system must not receive real employee data unless masked. Contoso's CMR pre-production system is a masked copy of production for exactly this reason. Nadia reviews which infotypes are replicated at all: Contoso keeps to a minimal set (0000, 0001, 0002, 0105) because no S/4HANA process needs more.
Worked example: a transfer across month-end
Avery is transferred from Detroit Assembly (17101101, profit center CMC-FLEET) to Chicago Assembly (17201101, profit center CMC-AFTMKT), entered on November 20, effective December 1 (illustrative course data). Expected in CMQ after replication: infotype 0001 has one record to November 30 with 17101101 and one from December 1 with 17201101; the position and manager change on December 1; the business partner reflects the new assignment after sync. Downstream, Avery confirms 6 hours on a Detroit maintenance order on November 28 and 6 hours on a Chicago order on December 2. The labor postings must show 17101101 for November 28 and 17201101 for December 2, with the matching profit centers.
| Date | Activity | Expected cost center | Expected profit center |
|---|---|---|---|
| Nov 28 | 6 h confirmed on a Detroit order | 17101101 Detroit Assembly | CMC-FLEET |
| Dec 2 | 6 h confirmed on a Chicago order | 17201101 Chicago Assembly | CMC-AFTMKT |
| Dec 3 | Travel expense submitted | 17201101 Chicago Assembly | CMC-AFTMKT |
Downstream assertions for the month-end transfer.
What would you do?
A termination entered in EC on February 10 with last day January 31 replicates successfully. A travel expense dated January 20 is submitted on February 12. What should happen, and what should the test check?
- Design tests by HR event, each with EC entry, expected infotypes with dates, and a downstream check.
- Four gates: monitor, infotypes, business partner, downstream posting.
- Fix a test calendar with future-dated, retroactive and month-end cases.
- Use synthetic or masked employees and a minimal infotype set.
Check your understanding · not graded
Lesson check
1. A transfer is entered Nov 20 effective Dec 1. When should infotype 0001 change?
2. Which gate comes after a successful entry in the Data Replication Monitor?
3. Why does Contoso replicate only infotypes 0000, 0001, 0002 and 0105?
4. Which test-calendar rule did Contoso adopt?