Sub topic 1
What the migration cockpit is and what it is for
Prerequisites
This chapter assumes you have the following background:
- Basic familiarity with SAP S/4HANA business data such as business partners, materials, and G/L accounts.
- Awareness of the difference between master data (long-lived records such as customers) and transactional data (documents such as open purchase orders).
- Ability to work with CSV or XML files and spreadsheets.
- A basic idea of the SAP Fiori launchpad and role-based authorizations.
You do not need to have used the cockpit before. Later chapters cover each step in detail. This chapter gives you the working model that the rest of the tutorial builds on.
What the migration cockpit is
The SAP S/4HANA migration cockpit is a tool for moving data from a legacy system into an S/4HANA system. It runs as a Fiori app in the target system itself. It does not need a separate server or middleware.
The cockpit works with migration objects. A migration object is a predefined package that SAP delivers. It knows three things about one kind of business data, such as customers, materials, or G/L accounts:
- Which source structures and fields the data has.
- How the source fields map to the target fields.
- Which standard SAP interface, such as an API or a business function, creates the records in the target system.
Because SAP delivers this logic, you do not write load programs. Your work is to prepare the source data, check it, convert values where the legacy and target systems disagree, and run the load. The cockpit guides you through these steps and records the result of each one.
What it is for
The cockpit is meant for the initial load of data into a new S/4HANA system. Typical uses are:
- Loading master data such as business partners, materials, and G/L accounts.
- Loading open items and balances that the business needs on the first day, such as open purchase orders or open receivables.
- Repeating the same load across test systems, so that the productive load is a rehearsed procedure.
It is not a tool for continuous synchronization between systems. It is also not a general archive tool. Historical data that nobody needs to process in the new system is usually kept elsewhere, so that the load stays small and the cutover window stays short.
How data loading is structured
Every load follows the same lifecycle, whatever the object or the source. The cockpit shows these steps in order for each migration object.
- Prepare the source data in the form the chosen transfer approach expects.
- Validate the data, so that structural and content problems appear before anything is written.
- Convert values where the legacy codes differ from the target codes, for example country keys or units of measure.
- Simulate the migration. The cockpit runs the load logic but does not save the results.
- Migrate the data, which creates the real records in the target system.
- Correct errors from the messages the cockpit reports, then repeat the steps for the affected records.
The diagram shows the main flow and the loop back after errors.
The order matters. Validation and simulation are cheap and reversible. Migration writes real records. Catching a problem in an early step costs minutes. Catching it after migration can mean cleaning up records in the target system.
Where the cockpit gets its data
The cockpit supports several ways to bring the data in. These are called transfer approaches. The next chapter compares them in detail, so only the outline is given here:
| Approach | Where the source data comes from | Typical fit |
|---|---|---|
| File upload | Files that follow SAP's templates, such as XML or CSV | Smaller volumes and sources that are not SAP systems |
| Staging tables | Tables in a database that you fill yourself | Larger volumes, or data that an ETL tool already prepares |
| Direct transfer | Tables read from a connected SAP source system | SAP ERP sources, with no intermediate files |
The approach changes how you deliver the data. It does not change the idea of migration objects, validation, simulation, and execution.
A migration project in practice
In the cockpit you work inside a migration project. The project holds the list of migration objects you chose, the data you uploaded or connected, the value mappings, and the results of every run. Several people can work on the same project, each on different objects.
A typical session looks like this:
- Open the cockpit and create or open a project.
- Select the migration objects that your scope needs, for example business partner and material.
- Prepare and provide the data for each object.
- Work through validation, value conversion, and simulation.
- Migrate, then read the messages.
Objects depend on each other. A material that references a plant needs that plant to exist first. A later chapter covers load sequence. For now, remember that "all objects are independent" is a wrong assumption, and many load failures come from it.
Checking data before you upload
The cockpit validates your data, but you will save time if you remove common problems earlier. Two frequent ones are duplicate keys and values that are longer than the target field allows. The script below reads a source CSV and reports both. The file and field names are placeholders. They are not fields from an SAP template, so adapt them to your own extract.
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)Line numbers start at 2 because line 1 holds the header. The script does not replace the cockpit's validation step. It only removes the obvious errors before you spend a validation run on them.
Common misunderstandings
- "The cockpit cleans my data." It checks data against the object's rules and lets you convert values. It does not decide which legacy records are correct or which duplicates to merge. That work happens before the load.
- "Simulation proves the real load will work." Simulation finds most errors, but the target system can change between the simulation and the real run. For example, someone may create a conflicting record, or configuration may change. Treat a clean simulation as strong evidence, not a guarantee.
- "One run is enough." Plan several test loads. Each one shows new problems, and each one gives you timing data for the cutover plan.
- "I can load objects in any order." Dependencies decide the order, as noted above.
How this chapter fits the tutorial
The remaining chapters follow the lifecycle shown above. The next chapters cover the transfer approaches, access and authorizations, and projects. After those come migration objects and their dependencies. Then come data preparation, validation, value conversion, simulation, execution, and error handling. The closing chapters cover adapting objects with the migration object modeler and planning test cycles and cutover.
Exercise
A colleague says, "We can skip simulation and go straight to migration, because validation already checked the data." Give two reasons why this is risky.
Show answer
First, validation and simulation check different things. Validation checks the data against the object's rules, while simulation runs the load logic against the target system without saving, which exposes errors that only appear when records are created. Second, migration writes real records, so an error found only at that point can leave records in the target system that need cleanup, while a failed simulation costs nothing.
Exercise
List the six lifecycle steps of one migration object in order, and say which one first creates real records in the target system.
Show answer
Prepare, validate, convert values, simulate, migrate, correct errors. Migrate is the first step that creates real records. Simulation runs the same logic but does not save the results.
Exercise
Your pre-check script reports no problems for customers.csv, but the cockpit's validation reports errors. Is that a contradiction? Explain.
Show answer
No. The script tests only two rules, duplicate keys and one maximum length. The cockpit validates against all rules of the migration object, including target system configuration, so it can find problems the script does not test for.