Sub topic 7
Data migration basics: objects, mapping, and cleansing
This chapter assumes you know the difference between master data and transactional data, and that you have seen an SAP landscape with development, quality, and production systems. Data migration is the work of moving business data into a new S/4HANA system. It is central to greenfield projects and is also used, in a reduced form, in selective data transition.
Migration objects
A migration object describes one kind of business data and how to load it. Examples are "Material", "Business partner", "Open purchase order", and "G/L account balance". Each object bundles the target structures, the fields you must supply, and the rules that check the data before it is posted.
SAP delivers predefined objects. The usual tool is the SAP S/4HANA migration cockpit. It offers two common approaches:
- Transfer data using files. You fill in XML or CSV templates and upload them.
- Transfer data directly from an SAP system. The cockpit reads tables from the source ECC system through a staging area.
Many objects depend on others. A purchase order needs vendors and materials to exist first, so the load order matters.
Mapping
Mapping connects source values to target values. There are two levels:
- Structure mapping. Which source field fills which target field. For example, ECC vendor and customer records become business partners, which is a structural change in S/4HANA.
- Value mapping. Which source value becomes which target value. For example, old plant codes, payment terms, or units of measure may be consolidated or renamed.
Keep value mappings in one reviewed table. Business owners should approve them, because a wrong mapping posts quietly and shows up later as a reporting error.
Cleansing
Cleansing is the work of fixing data before it is loaded. A new system is the cheapest time to remove duplicates and obsolete records. Typical tasks:
- Remove duplicate vendors and customers.
- Block or exclude materials with no movement for years.
- Complete missing mandatory fields, such as tax numbers.
- Standardize addresses and formats.
Do this in the source system or in a staging area, not in the target.
Reconciliation
After each load, compare the result to the source. Check record counts per object and balances such as open items or inventory value. A small script can check a count comparison once you export both sides.
source = {"vendors": 1200, "materials": 45000, "open_pos": 830}
target = {"vendors": 1200, "materials": 44980, "open_pos": 830}
for obj, expected in source.items():
loaded = target.get(obj, 0)
status = "OK" if loaded == expected else f"MISMATCH ({expected - loaded} missing)"
print(f"{obj}: {status}")This prints a mismatch for materials, which you would then trace in the cockpit's error log.
Common errors
- Loading in the wrong order, so dependent objects fail.
- Cleansing too late, so the same errors repeat in every test cycle.
- Treating migration as a single event. Plan several trial loads, and finish with a full dress rehearsal.
- Skipping business sign-off on value mappings.
Where this fits
In a greenfield project, migration is the main way data reaches the new system. In a brownfield conversion, the existing data is converted in place, so you do little mapping. In selective data transition, you migrate only the chosen scope. Later chapters cover how historical data scope affects this work.
Exercise
A load of open purchase orders fails for many records. The vendors and materials were loaded successfully the day before. Name two likely causes you would check first.
Show answer
First, check the load order within the same cycle: the purchase orders may have run before the vendor or material load was activated in that environment. Second, check value mapping, such as plant, payment terms, or purchasing organization codes that have no target value. The cockpit's error log shows which field failed.