Lesson 6 of 6
Regression packs for mappings
14 min
Listen to this lesson
EDI partners notice every change you make. A mapping fix for Great Lakes can break Lakeside's 850 if both use a shared helper or value mapping; a converter version update can change an envelope; a new S/4HANA support package can add a field to an IDoc. A regression pack per partner and message is how Contoso proves, after every change, that what partners receive hasn't changed unless it was meant to.
What a regression pack contains
| Item | Contoso example (Lakeside 850) | Why |
|---|---|---|
| Input files | ORDERS05 for PO 4500002210 and nine edge cases | Real structures, anonymized where needed |
| Expected outputs | 850 XML (before conversion) and X12 text (after) | Proves both the mapping and the converter |
| Volatile field list | ISA09 date, ISA10 time, ISA13, GS04/GS05, GS06, ST02 control numbers | Ignored or normalized when comparing |
| Run instructions | Simulate the mapping; post to the test endpoint | Anyone can rerun it, not just the author |
| Owner and partner contact | Theo's B2B developer; Lakeside EDI contact | Who updates expected outputs, who confirms changes |
The contents of one regression pack. Keep it in source control and link it to the interface's test case in SAP Cloud ALM.
Choosing the cases
Start with real traffic. During the migration Contoso pulled a month of messages per interface from XP1, removed personal data and kept one example for every structural variant seen: single and many items, every partner function present and missing, every unit used, amounts with and without cents, and the largest message. Add the cases that should fail: missing header segment, unknown unit (with the value mapping's not-found behavior), and a sender ID with no alternative partner. Ten to twenty files per partner and message is typical.
Running the pack
- TriggerMapping, value mapping, Partner Directory, script, converter or IDoc structure change
- Mapping levelSimulate each input; compare XML output with the expected file
- Flow levelPost each input to the test flow's endpoint in CMC_TEST; compare the delivered EDI text
- NormalizeMask volatile fields such as control numbers and timestamps before comparing
- DecideEvery difference is intended (update expected file, tell the partner) or a defect
- RecordStore the run's results with the change in SAP Cloud ALM
The comparison is the step people skip. Compare the outputs field by field after removing volatile values, not just "did the message complete". A completed message with a different PO103 is a failed regression test. Where the pack runs through the deployed flow, use a test copy of the flow with an HTTPS sender in CMC_TEST, so you can post inputs on demand without involving S/4HANA or the partner.
Changes you don't make
SAP updates Cloud Integration regularly. Existing flows keep the component versions they were built with until you choose Update Version on an adapter or step, so new features may not be available until then, and the update is itself a change. Treat a version update of the XML to EDI Converter or the IDoc adapter like a mapping change: run the packs of every flow you update. On the S/4HANA side, support packages and new IDoc extensions follow the same rule.
- One regression pack per partner and message: inputs, expected outputs, volatile fields, run steps and owners.
- Build cases from real traffic plus deliberate failure cases; ten to twenty files is typical.
- Compare outputs field by field after normalizing control numbers and timestamps.
- Run the pack for every change that can alter partner output, including SAP component version updates you apply.
Check your understanding · not graded
Lesson check
1. Which fields belong on the volatile list for an X12 regression comparison?
2. A flow completed, but PO103 now reads PC instead of EA. What is the regression result?
3. SAP releases a new XML to EDI Converter version. When does it affect Contoso's flows?
4. A shared helper changes for Great Lakes. Which packs must run?