Sub topic 5
Understanding Migration Objects
A migration object is the unit of work in the SAP S/4HANA migration cockpit. You don't load "a file of customers" into a table. You load data for the migration object that represents customers, and that object decides how your data becomes valid S/4HANA records. This chapter explains what is inside a migration object, how to read one, and which properties affect your planning.
This chapter assumes you know what a migration project is, which transfer approach you use, and the difference between master data and transactional data. It also assumes you are comfortable with business partners, materials, and G/L accounts.
What a migration object is
A migration object describes how data for one business object is moved into the target system. SAP delivers predefined objects for common cases, such as customers, suppliers, materials, G/L account balances, and fixed assets. The list depends on your release and deployment, so check the object list in your own system.
Each object bundles several things:
- Source structures. The layout of the data you provide. It matches the template fields in the file approach or the staging tables in the staging approach.
- Target structures. The S/4HANA fields that receive the data.
- Field mapping. The link between each source field and each target field.
- Rules. Conversion and default logic, such as fixed values, value mappings, and derived values.
- A load mechanism. The standard SAP interface that creates the records, such as a released API or function module. You don't call it yourself. The cockpit does.
Because loading goes through standard interfaces, the usual business checks apply. A record that couldn't be created in the normal transaction usually can't be created by the migration either.
Anatomy of an object
A single business object usually spans several tables. A customer, for example, has general data, address data, company-code data, and sales-area data. The migration object models this as a hierarchy of source structures.
Two terms matter when you work with the hierarchy:
- Header structure. The top-level structure. Each row identifies one instance, which is one business object to be created, such as one customer.
- Subordinate structures. Child structures that hold repeating or optional data, such as several addresses or several company codes for one customer. Rows in these structures point back to their instance through a key field.
If a child row carries a key that has no matching row in the header structure, the cockpit can't assign it to an instance. This is one of the most common reasons for an error message about missing parent data.
Reading the fields of an object
You usually inspect an object's fields before you prepare any data. In the migration project you can open the object and review its structures and fields. In the file approach, the downloaded template shows the same structures.
For each field, check these properties:
| Property | What it tells you | Why it matters |
|---|---|---|
| Mandatory | The load fails if the field is empty. | Fill these first. |
| Optional | The field can stay empty. | Fill it only if your target process needs it. |
| Not relevant or hidden | The field is not offered for your approach or scope. | Don't expect to load it. |
| Key field | The field links rows across structures. | Keep it consistent in every structure. |
| Length and type | Maximum length, data type, and format. | Over-long values and wrong formats are common validation errors. |
| Value mapping | The field can be converted from source to target values. | Plan the mapping table before you run the conversion. |
Mandatory fields in the template are not always the full story. The target system's configuration can add its own requirements. For example, a field may be optional in the template but required for your company code by a field-status setting. Expect some errors to appear only at load time.
Types of migration objects
Objects fall into groups that behave differently when you plan a load.
- Master data objects, such as business partners, materials, and cost centers. These need the largest preparation effort, because they are reused by everything else.
- Transactional data objects, such as open purchase orders or open items. These depend on master data being in place.
- Balance and historical objects, such as G/L account balances or fixed-asset values. These often need agreement with finance on cut-off dates and reconciliation.
Check the scope of each object before you promise it to the project. Some objects migrate only open items or current balances, not full history. If a stakeholder expects full document history, you need a different solution, because the cockpit object won't provide it.
Pre-delivered objects and custom changes
You normally start with the pre-delivered object and use it as delivered. Adapting an object takes effort and has upgrade consequences, so exhaust the standard options first:
- Check whether the field you need already exists as an optional field in the object.
- Check whether a value mapping or fixed default solves the problem.
- Only then consider a change with the migration object modeler, which a later chapter covers.
Adding fields or changing rules changes what the object does. Document each change and retest the object after every system upgrade.
Selecting objects for a project
Adding an object to a project does not load anything. It makes the object available and creates its template or staging tables, depending on the approach. Add only the objects in scope. Every extra object creates preparation, validation, and testing work.
When you select objects, record these facts for each one:
- the business owner who supplies and approves the data
- the source system or extract it comes from
- the objects it depends on
- the expected record volume
- the transfer approach, because large volumes may favor staging tables
The dependency column becomes the load sequence in the next chapter. Write it down now.
Instances, counts, and status
The cockpit counts work in instances. If a customer file has 5,000 header rows, the object has 5,000 instances, no matter how many child rows exist. The status of an object in the project follows the steps of the process: preparing data, validating, converting values, simulating, and migrating. Counts of instances with errors let you judge progress at each step.
An object can be partly successful. If 4,980 of 5,000 instances load and 20 fail, the 4,980 exist in the system. Correct the 20 and process them again. Don't reload the whole file, or you risk duplicates. Whether a repeat run is safe depends on the object, so confirm it in a test system before you rely on it.
Common mistakes
- Treating the template as a table dump. The structures are hierarchical. Keys must match across them.
- Ignoring field lengths. Names, descriptions, and text fields are the most frequent over-long values. A pre-check script on the legacy extract catches most of them before upload.
- Assuming standard scope. Confirm what the object migrates before you design around it.
- Customizing too early. Change an object only when no standard option works.
- Skipping the owner. An object without a business owner stalls at the first data question.
Check your understanding
Exercise
A migration object for customers has a header structure and a child structure for addresses. After validation, many address rows report that no parent instance exists. What is the most likely cause, and where do you look first?
Show answer
The key field in the address rows does not match any key in the header structure, so the cockpit can't assign those rows to an instance. Compare the key values in both structures, looking for typos, leading zeros, trailing spaces, and header rows that were removed or never included.
Exercise
An object loads 4,980 of 5,000 instances, and 20 fail. Why is reloading the full file risky, and what do you do instead?
Show answer
The 4,980 successful instances already exist in the target system, so a full reload can create duplicates or produce further errors. Read the messages for the 20 failed instances, correct their source data, and process only those instances again. Confirm the repeat behavior of the object in a test system first.