Lesson 5 of 5
Testing and transporting objects
11 min
A modeled object is software. It needs the same discipline as any other development: tests at several levels, a defect process, and a controlled path from development through test into production. Migration teams that treat modeler changes as "just configuration" find out in the final load that the object in production is not the object they tested.
Test levels for a modeled object
Start small. The developer tests the function module directly: valid data, each kind of invalid data, the test-run flag (nothing saved, all messages returned) and repeated calls. Then the specialist runs a targeted set through the cockpit. Only when that set behaves does the object join a mock with full volume.
A targeted test set for a custom object
| Case | Example record | Expected result |
|---|---|---|
| Valid header with several items | Flotillas Monterrey with deposits for two alternator models | Agreement created; items match; success messages |
| Missing reference | Agreement for a customer not yet loaded | Rejected with a clear message naming the customer |
| Invalid value | Deposit category not in the translation object | Reported as a mapping task or error; never defaulted |
| Boundary | Longest allowed text; zero and maximum deposit amounts | Accepted or rejected exactly as specified |
| Simulation | Any valid record in simulation | Messages returned; nothing saved in the target table |
| Repeat load | The same record loaded twice | Second attempt rejected as duplicate, or behavior as specified |
Targeted tests for the Wave 2 core return agreement object. Each case has a written expected result.
Moving objects across systems
Build and change migration projects and objects only in the development system. In current on-premise and Private Edition releases, a staging table migration project can be transported with the standard change and transport system: the project is assigned to a development package when it is created in the Migrate Your Data app, and in LTMOM you add projects, objects and rules to a transport request. A project in the local package $TMP cannot be transported, and the package assignment cannot be changed later, so choose it deliberately. In quality and production systems, which are normally not modifiable, transported projects can be run but not changed.
- Development (CMD)Build ABAP objects, project and modeler changes; record them on transport requests
- Release transportsDictionary objects and function modules with or before the migration project
- Quality (CMQ)Import; run the targeted set; maintain mapping values for this system
- Mock loadsRun full Wave 2 mocks in a production-like copy with the same transports
- Production (CMP)Import the same, tested transports; run the final load from the cutover plan
Release support for transporting projects has grown over time, and details differ for the staging table and direct transfer approaches. Check SAP's documentation and notes for your release before the first transport, and rehearse the full path in the first mock rather than discovering a gap on go-live weekend.
- Was the change made in the development system?No → redo it in development; never change objects in test or production · Yes → next question
- Are the function module and dictionary objects on transports released with or before the project?No → fix the transport order · Yes → next question
- Were mapping values maintained and checked in the target system?No → maintain from the approved specification · Yes → run the targeted tests in that system
What would you do?
During Wave 2 Mock 3, the specialist finds a mapping error in the core return object and offers to fix it directly in the mock system "to save a day". What should Priya decide?
- Test modeled objects at four levels: unit, object in the cockpit, reconciliation and validation, full volume and timing.
- Targeted test sets cover valid, missing reference, invalid value, boundary, simulation and repeat cases.
- Change only in development; transport projects, objects and rules with their ABAP objects; $TMP cannot be transported.
- Mapping values do not travel with definitions; maintain and reconcile them in each system.
Check your understanding · not graded
Lesson check
1. What should the unit test of a custom object's function module include?
2. Why can a project in package $TMP not move to the test system?
3. Which of these is not carried by transporting a translation object definition?
4. A defect is found in a mock system. Where is it fixed?