Lesson 6 of 6
Keeping extensions upgrade-safe
8 min
Listen to this lesson
The extension itself is upward compatible. Everything around it is not automatically so: the exit's interface can change, the data your class reads can move, a support package can change how the standard function module fills a neighboring segment, and the middleware mapping depends on all of it. Upgrade safety comes from three habits: documentation, ownership and a regression pack.
Document every extension
| Item | Contoso entry for ZCMCINV1 |
|---|---|
| Business reason and partner | Great Lakes Fleet Services needs core agreement numbers to match core deposits |
| Objects | Segment Z1CMCCORE, extension ZCMCINV1, WE82 entry, CMOD project with LVEDF001, class ZCL_CMC_CORE_AGR_READER |
| Data sources | CDS view ZI_CMC_CoreAgreement over ZCMC_CORE_AGR; statuses OPEN and CLOSED |
| Partners and profiles | KU 17100001 outbound INVOIC; no other partner |
| Middleware | XP1 mapping INVOIC02.ZCMCINV1 to 810; reference qualifier agreed with Great Lakes |
| Owners | Kenji (ABAP), Theo (integration), Maria (order-to-cash key user) |
| Tests | Regression cases EXT-INV-01 to 04 in the interface regression pack |
An extension register entry. One row set per extension, kept with the interface catalog.
Contoso's interface catalog lists about 25 IDoc interfaces. When the team inventoried them before the conversion, it found 11 extensions carried over from ECC, four of them with no known owner and two filling segments no partner still read. The register exists so that the next inventory, before the move to SAP Integration Suite, takes an afternoon instead of three weeks.
A regression pack for extended IDocs
Regression tests for an extension compare IDoc content, not just status. The most effective technique is a golden IDoc: a known billing document whose IDoc content was checked and approved, kept with the test. After an upgrade or support package, the same billing document is output again in the test system and the new IDoc is compared segment by segment with the golden one, including the custom segment, before the 810 is checked end to end.
| ID | Case | Expected result |
|---|---|---|
| EXT-INV-01 | Invoice item with an OPEN core agreement | Z1CMCCORE under that E1EDP01 with agreement, status and deposit; 810 carries the reference |
| EXT-INV-02 | Invoice item without an agreement | No Z1CMCCORE for the item; IDoc status 03; 810 without the reference |
| EXT-INV-03 | Invoice for a customer without the extension in WE20 | Plain INVOIC02; no custom segment; status 03 |
| EXT-INV-04 | Golden IDoc comparison after upgrade | Segment-by-segment equal to the approved IDoc, except dates and IDoc number |
Regression cases for extension ZCMCINV1.
Upgrades and the clean core conversation
During an upgrade, the check list for each extension is short. Is the exit still called at the same point with the same parameters (SMOD documentation, a quick debugger run with WE19)? Do the CDS views and tables the class reads still exist and mean the same? Does ATC report new clean core findings for the class? Does the golden IDoc still match? If any answer is no, the fix goes into the class, not into the include.
Longer term, Contoso's clean core goal for integration is fewer, smaller extensions. When interfaces move to SAP Integration Suite after hypercare, each extension is reviewed again: can the partner's need now be met from a standard API or event, can middleware derive the value, or is the extension still the simplest stable option? An extension that passes that review stays, documented and tested. That is a perfectly good outcome; clean core is about knowing and controlling extensions, not about having none.
Who approves a new extension
Because every extension adds custom code to a business-critical interface, Contoso treats a new one like any other custom development. Theo records the extend-or-map decision with the partner's requirement, Kenji estimates the exit work and confirms which data sources the class will read, Priya adds the regression cases before development starts, and the request goes to the same design authority that approves other custom code under the clean core rules. Small as it is, ZCMCINV1 went through that path in two days; the point is not bureaucracy but making sure the next upgrade test knows the extension exists.
What would you do?
Before Contoso's first support package after go-live, Luis asks whether the extensions need testing at all, since SAP says extensions are upward compatible. What is the right answer?
- Extensions are upward compatible; exits, data sources and mappings around them are not automatically so.
- Keep an extension register: reason, objects, data sources, partners, middleware, owners and tests.
- Regression-test with golden IDocs compared segment by segment, plus with-data, without-data and other-partner cases.
- Review each extension when interfaces move to SAP Integration Suite: retire, keep, replace with mapping, or rework.
Check your understanding · not graded
Lesson check
1. What does SAP's upward compatibility promise for extensions cover?
2. What is a golden IDoc?
3. Which regression case protects other customers from the Great Lakes extension?