Sub topic 7
Data Migration Basics: Objects, Mapping, and Cleansing
This chapter assumes you know what master data and transactional data are, you can read an SAP landscape (development, quality, production), and you have seen the main ECC modules: finance, logistics, and procurement. It covers the data migration concepts that every transition path relies on. Later chapters apply them to greenfield, brownfield, and selective data transition.
Why data migration matters in every path
Data migration is the work of moving business data from a source system into the target S/4HANA system. It is the core of a greenfield project. A brownfield conversion moves the database in place, but it still has data work: cleansing, converting business partners, and checking consistency. A selective transition is mostly data migration, because it moves chosen data into a new or restructured system.
Poor data quality is one of the most common reasons for late go-lives. Migrating bad data into a faster system gives you bad data in a faster system.
Migration objects
A migration object is SAP's unit of data transfer. It describes one business entity, such as a customer, a material, or an open purchase order. The object defines which source structures it reads, which target structures it fills, and which rules it applies.
Examples of objects commonly used in a new implementation:
- Master data: business partner (customer and supplier), material, bill of materials, G/L account, cost center.
- Open transactional data: open purchase orders, open sales orders, open items for accounts payable and receivable.
- Balances: G/L balances, asset balances, inventory stock quantities and values.
Two points shape your planning:
- Objects have dependencies. A purchase order needs its supplier, material, and plant to exist first. You load objects in a defined sequence.
- You usually migrate open items and balances, not every closed document. How much history to bring is a separate scope decision, covered in a later chapter.
Tools that provide migration objects
| Tool | Typical use | Notes |
|---|---|---|
| SAP S/4HANA Migration Cockpit, file or staging table approach | Greenfield loads from files or staging tables | Predefined objects, templates, and mapping screens. Works with both on-premise and cloud editions. |
| Migration Cockpit, direct transfer approach | Reading directly from an SAP source system | Uses a connection to the source. No intermediate files. |
| Custom migration objects | Data that has no predefined object | Built with the Migration Object Modeler (transaction LTMOM). Takes more effort and testing. |
| SAP Data Services and other ETL tools | Large or complex transformations | Often used when cleansing rules are heavy. |
The Migration Cockpit is accessed through the Fiori app "Migrate Your Data" and runs on the S/4HANA target system. Check current SAP documentation for the list of objects available in your release, since it grows between versions.
The migration flow
Each load follows the same stages, whatever the tool.
The loop back from reconciliation matters. Plan several full trial loads before cutover. Each trial finds new defects in the data or the rules.
Mapping
Mapping defines how a source value becomes a target value. There are two kinds.
Structure mapping
Structure mapping connects source fields to target fields. If the source stores a customer's tax number in a custom field, the mapping says where that value lands in the target business partner. The Migration Cockpit supplies this for standard objects. You only edit it where your data differs from the standard.
Value mapping
Value mapping translates codes. The target system may use different organizational structures than ECC, especially in a greenfield project where you redesign them. Typical examples:
- Company codes: old code
1000becomes new codeA100. - Payment terms: three old terms collapse into one.
- Material groups: a legacy classification becomes a cleaner one.
- Plants and storage locations when you consolidate sites.
Keep value mappings in a controlled table that the business owns, not in the head of a consultant. When a value is missing from the table, the load for that record fails. That failure is useful, because it exposes an unmapped value before production.
A small mapping example
The following Python script shows the idea behind value mapping and a check for unmapped values. It runs as written.
import csv
import io
# Value mapping table: old plant -> new plant
PLANT_MAP = {"1000": "A100", "1100": "A100", "2000": "B200"}
source_csv = """material,plant
MAT-001,1000
MAT-002,1100
MAT-003,3000
"""
mapped, unmapped = [], []
for row in csv.DictReader(io.StringIO(source_csv)):
new_plant = PLANT_MAP.get(row["plant"])
if new_plant is None:
unmapped.append(row)
else:
mapped.append({"material": row["material"], "plant": new_plant})
print("Mapped:", mapped)
print("Unmapped (needs a decision):", unmapped)The output lists two mapped rows and one unmapped row (MAT-003, plant 3000). Real tools do the same thing at scale, and the unmapped list goes back to the business for a decision.
Cleansing
Cleansing improves data before it reaches the target. Typical problems:
- Duplicates: the same customer exists three times with slightly different spellings.
- Incomplete records: missing tax numbers, addresses, or units of measure.
- Obsolete records: suppliers with no activity for years, materials flagged for deletion.
- Inconsistent formats: phone numbers, country codes, and free-text fields.
- Wrong classification: materials in the wrong group or with the wrong valuation class.
A practical approach has four steps:
- Profile the data. Count records, find blanks, and find likely duplicates.
- Decide the rule for each problem, such as "merge duplicate suppliers" or "drop materials with no movement in five years".
- Correct the data in the source or in a staging area. Correcting in the source keeps ECC and S/4HANA aligned during the project, but it changes a live system. Correcting in staging is safer but requires the same fixes to be repeated on each load unless you automate them.
- Re-profile and measure. Track the error count per object across trial loads.
What changes in S/4HANA that affects migration
Some data structures differ in the target, so migration is not a plain copy.
- Business partner: in S/4HANA, customers and suppliers are maintained as business partners. Customer and supplier records from ECC must be linked to business partners with the right roles. This is called customer/vendor integration, and it is a mandatory step in a conversion.
- Material numbers: the material number field is longer in S/4HANA (up to 40 characters). Mappings and interfaces must allow for this.
- Finance: ECC's separate general ledger, controlling, and asset tables are replaced by the universal journal. Balances and open items must fit that model.
The chapter on what changes in S/4HANA covers these in full. Here the point is that mapping rules and validations must reflect the new model.
Validation and reconciliation
A load that finishes without errors is not proof that the data is right. Reconcile in two ways:
- Quantity checks: record counts per object, source versus target, with the expected differences explained (for example, records removed in cleansing).
- Value checks: totals that must match, such as G/L balances per account, open payables per supplier, and inventory value per material.
Business users should do spot checks with real transactions. For instance, they can create a goods receipt against a migrated purchase order. Doing this in a test system catches wrong defaults and missing fields that counts will never reveal.
How data migration differs by path
| Path | Role of data migration |
|---|---|
| Greenfield | Central. Master data, open items, and balances are loaded into a new system, with mapping and cleansing as the main workload. |
| Brownfield | Limited. Data stays in place, so work focuses on cleansing before conversion and on business partner and finance conversion. |
| Selective data transition | Heavy and tool-supported. Specific companies, time ranges, or data sets are moved, often with specialist tooling and a larger testing effort. |
Common errors
- Starting data work after the design is finished. Mapping decisions often change the design.
- Loading in the wrong sequence, so dependent objects fail.
- Treating cleansing as an IT task. The business owns the meaning of the data.
- Running only one trial load. Defects found in the final weeks have no time left to fix.
- Skipping reconciliation of values and relying on record counts.
Exercise
In a greenfield project, a trial load of purchase orders fails for 40 records. The error says the plant is not found. Name the two most likely causes and the first place you would look.
Show answer
Most likely the plant value is missing from the value mapping table (the old plant has no new plant assigned), or the plant object was loaded or configured after the purchase orders, so it did not exist yet. Look first at the value mapping table for the failing plant codes, then at the load sequence and whether the plant exists in the target.
Exercise
Why is a load that finishes with zero errors still not enough to approve the migration?
Show answer
A load with zero errors only shows that the records met the technical rules. It does not show that every expected record arrived or that values are correct. You must also reconcile record counts and totals, such as G/L balances and open payables, and have business users test real transactions on the migrated data.