Sub topic 16
Test cycles and cutover planning
This chapter assumes you know how to create a migration project, simulate a migration, run it, and read the messages it produces. It covers how to repeat that work in test cycles and how to turn the result into a plan for the productive cutover.
Why you run test cycles
A productive migration usually runs once. You can't afford surprises in it, so you rehearse. Each test cycle is a full or partial run of the same steps you will use at cutover: load the source data, validate it, convert values, simulate, and migrate.
A test cycle gives you three things:
- A list of data errors to fix in the source system, not in the target.
- Run times for each migration object, which feed the cutover schedule.
- Confirmation that the load sequence and the value mappings work together.
A typical cycle structure
Most projects use several cycles with growing scope.
| Cycle | Data volume | Main goal |
|---|---|---|
| Cycle 1 | Small sample | Prove templates, mappings, and authorizations work |
| Cycle 2 | Large subset | Find data quality errors and fix them at the source |
| Cycle 3 | Full volume | Measure run times and test the full load sequence |
| Dress rehearsal | Full volume, final data cut | Run the cutover plan end to end with the real team |
Use a fresh, clean test system for each full cycle where you can. Data left over from an earlier cycle can hide errors such as duplicate keys, because the system rejects the second load of a record.
Fixing errors at the source
Correct errors in the legacy data, not by editing the target after the load. If you patch the target, the fix is lost in the next cycle. A pre-check script catches common problems before the cockpit's own validation step. The following example reports duplicate keys and over-long values in a CSV extract. The file and field names are placeholders, not SAP template fields.
import csv
from collections import Counter
def precheck(path, key_field, max_lengths):
"""Return a list of problems found in a source CSV before upload."""
problems = []
keys = Counter()
with open(path, newline="", encoding="utf-8") as f:
for line_no, row in enumerate(csv.DictReader(f), start=2):
keys[row[key_field]] += 1
for field, limit in max_lengths.items():
if len(row[field]) > limit:
problems.append(f"line {line_no}: {field} is longer than {limit} characters")
problems += [f"duplicate key {k}" for k, n in keys.items() if n > 1]
return problems
for problem in precheck("customers.csv", "CustomerId", {"Name": 40}):
print(problem)Run it on every new extract. An empty output means the file has no problems of these two kinds.
Planning the cutover
Cutover is the controlled switch from the legacy system to S/4HANA. Build the plan from what the test cycles measured.
- List every migration object and its load position, based on the dependencies you established earlier.
- Enter the run time measured in the full-volume cycle for each object.
- Add time for validation, simulation, and error correction between loads.
- Define the freeze point, after which users no longer change legacy data.
- Name an owner for each step and a check that proves it finished.
- Agree a go/no-go decision point and a fallback if it fails.
Reconciliation
After each migration, compare the target with the source. Check record counts per object and, for financial objects, balances. Record the results in each test cycle so that you know the productive check works before you need it.
Exercise
Why should you fix a duplicate-key error in the legacy extract instead of editing the record in the target system after loading?
Show answer
The fix in the target is lost in the next test cycle or at cutover, because those runs load the source data again. A fix in the source extract carries through every later run.
Exercise
Which test cycle gives the run times you need for the cutover schedule, and why?
Show answer
The full-volume cycle, because run times measured on small samples do not scale reliably to the real data volume.