Sub topic 12
Running a simulation
This chapter assumes you have already uploaded or staged data, validated it, and converted its values. It covers what a simulation run does, what it cannot tell you, and how to use it before you load data for real.
What a simulation is
A simulation run is a trial import. The migration cockpit processes your data through the same import logic that the real migration uses, but it does not save the results to the database. You get the messages the application would produce, such as missing customizing entries, inconsistent combinations, or failed authority checks. No business data is created.
Validation and simulation catch different problems:
| Step | What it checks | Where the check comes from |
|---|---|---|
| Validate data | Field formats, lengths, mandatory fields, and checks inside the migration object | The migration object's own rules |
| Convert values | Whether each source value has a target value | Your value mapping rules |
| Simulate import | Whether the target application would accept the converted records | The application logic of the target system |
A record can pass validation and still fail simulation. For example, a customer record can have well-formed fields but refer to a payment term that is not configured in the target client. Only the application logic knows this, so only the simulation finds it.
Where simulation sits in the project
Simulation is the last step before execution. It depends on value mapping, because it works on the converted data.
Because the loop returns to validation, a correction to the source data means you reload the file or staging table and repeat the steps. A correction to a value mapping rule only needs the conversion step and the simulation to run again.
Running a simulation
The exact screens vary by release and by transfer approach, but the sequence is stable.
- Open your migration project and select the migration object.
- Check that the earlier steps (data load, validation, value conversion) show as completed.
- Choose the simulate action for that object and start it.
- Wait for the background job. The cockpit processes records in parallel, so large volumes finish faster than a single sequential run would.
- Open the messages and the list of records with errors.
Read the result at two levels. The first is the overall status: how many records were processed, how many succeeded, and how many failed. The second is the individual messages, which tell you why each record failed.
Not every migration object supports simulation, and the cockpit may not offer the action for those that do not. If a simulation is unavailable, plan a test migration in a test client instead. See the test cycles chapter.
What a clean simulation does and does not prove
A clean simulation shows that, at that moment, the application would accept every record. It does not prove the following.
- Dependent objects will pass. Simulation does not persist data. Suppose you simulate a business partner and then simulate an object that refers to that partner, such as a contract. The second simulation can report the partner as missing, because the partner was never saved. Dependencies are why the load sequence matters: you can only fully check a dependent object once its prerequisites have been executed. This is a normal consequence of how simulation works, not a defect in your data.
- The system state will stay the same. Someone can change customizing, lock a record, or load overlapping data between your simulation and your execution. A simulation is a snapshot.
- The data is correct from a business viewpoint. The application accepts a customer with the wrong address as readily as one with the right address. Reconciliation after the real load still has to confirm that values and counts are right.
- Generated numbers will match. If the target system assigns keys from a number range, do not rely on keys you saw during a simulation. Treat them as informational only.
Reading simulation messages
Messages have a severity, a text, and a reference to the record they concern. Sort the problems by cause rather than by record. Hundreds of failed records often come from a handful of root causes.
| Typical cause | What you see | Where to fix it |
|---|---|---|
| Value with no valid target | Message that an entry does not exist in a check table | Value mapping, or customizing in the target system |
| Missing prerequisite object | Message that a referenced record does not exist | Execute the prerequisite object first |
| Inconsistent field combination | Message that two fields cannot be used together | Source data |
| Missing authorization | Authorization or permission error for the migrating user | The user's roles |
| Duplicate or locked record | Message that a record already exists or is locked | Source data or the target system's state |
The chapter on reading messages covers correction in detail. For simulation, the point is to decide whether a failure is a data problem, a mapping problem, a configuration problem, or a sequence problem. That decision determines where you fix it.
Summarizing messages with a script
When the message list is long, export it and count it by message text. The exact export columns depend on your release, so this script uses placeholder column names (Record and Message) and a small inline sample. Adapt the names to your file.
import csv
import io
from collections import Counter
SAMPLE = """Record,Message
1001,Payment term ZX99 does not exist
1002,Payment term ZX99 does not exist
1003,Country XX is not defined
1004,Payment term ZX99 does not exist
"""
def summarize(rows):
"""Count how many records fail for each distinct message."""
counts = Counter(row["Message"] for row in rows)
return counts.most_common()
reader = csv.DictReader(io.StringIO(SAMPLE))
for message, count in summarize(reader):
print(f"{count:>4} {message}")The output shows the cause that affects the most records at the top:
3 Payment term ZX99 does not exist
1 Country XX is not definedFixing the top cause first, here a missing value mapping for ZX99, clears most of the failures with one change.
A repeatable simulation routine
Use the same routine for each migration object so that results are comparable between runs.
- Check the load sequence. Confirm that prerequisite objects were executed in this system.
- Run the simulation and note the counts of processed, successful, and failed records.
- Group the messages by root cause.
- Fix the highest-volume cause first. Decide whether the fix belongs in the source data, the mapping, or the target configuration.
- Rerun the affected steps and simulate again.
- Stop when the failures are zero, or when the remaining failures are understood and accepted (for example, records you will deliberately exclude).
- Record the final counts. You will compare them with the execution results.
Keep the counts from each run. If the simulation shows 9,950 of 10,000 records passing and execution later loads 9,950, the two agree. If execution loads a different number, something changed between the runs, and you should find out what.
Common mistakes
- Skipping simulation to save time. A failed real import can leave a partly loaded object that is harder to clean up than a failed simulation.
- Simulating before value conversion is complete. Unmapped values then show up as application errors that you could have found earlier and more cheaply.
- Simulating in the wrong client or system. Check the target before you start. A simulation does not save data, but the result is only meaningful for the system you ran it in.
- Treating dependent-object errors as data errors. See the warning above.
- Running the simulation once and moving on. If you fixed anything after the run, run it again.
Summary
Simulation tests converted data against the target system's application logic without saving anything. It finds problems that validation cannot, mainly missing configuration, inconsistent combinations, and authorization gaps. It cannot confirm that dependent objects will load, that business content is right, or that the system will stay unchanged until execution. Group the messages by cause, fix the largest cause first, repeat until the result is clean or understood, and keep your counts for comparison with the real run.
Exercise
You simulate a business partner object and it passes with no errors. You then simulate an object that refers to those partners, and every record fails with a message that the partner does not exist. The partner records are correct. What is the most likely cause, and what do you do?
Show answer
Simulation does not save data, so the partners from the first simulation do not exist in the system when the second object is simulated. The records are not wrong. Execute the business partner migration (in a test system), then simulate the dependent object again. This is why the load sequence of objects matters.
Exercise
A simulation of 5,000 records reports 1,200 failures. The messages show 1,100 records failing on "Payment term ZX99 does not exist". What should you do first, and which steps do you repeat afterward?
Show answer
Fix the largest cause first. Either add a value mapping rule that converts ZX99 to a valid target payment term, or create the missing payment term in the target system if it is genuinely needed. If you changed the mapping, rerun the value conversion and then the simulation. If you changed only the target customizing, simulate again. Then review the remaining failures, which are about 100 records.