Sub topic 2
Choosing a transfer approach: files, staging tables, or direct transfer
This chapter assumes you know what the migration cockpit is for (the previous chapter) and that you can work with CSV or XML files. It also assumes you have a basic idea of SAP HANA databases and of how a legacy system exposes its data.
Every migration project in the cockpit must decide how source data gets into the cockpit. The predefined migration objects, the validation, the value mapping, the simulation and the load are the same in every case. The approach only changes how data arrives and who is responsible for extracting and shaping it.
The three approaches
The cockpit offers three ways to bring data into a migration project. You choose one when you create the project.
Transfer data using files
You download a template for each migration object you need. Each template contains the source structures of the object, with a sheet or file for each structure and a column for each field. You fill the templates from your legacy data and upload them to the cockpit.
- Templates come as XML (a spreadsheet-style file with several sheets) or as CSV (one file per structure, bundled in a ZIP archive).
- You decide how to extract and transform the data. The cockpit gives you no extraction tool, only the target layout.
- Upload size is limited per file, and the limits depend on the release and edition. Check the current documentation before you plan large loads.
This is the lowest-effort approach to set up. It needs no database access to the legacy system and no connectivity. Its weak points are volume and repeatability. A spreadsheet with hundreds of thousands of rows is slow and error-prone, and each test cycle means regenerating and re-uploading files.
Transfer data using staging tables
The cockpit creates database tables for each migration object, with the same structure as the file template. You fill these tables with SQL, an ETL tool, or a replication tool, and the cockpit reads them as its source. Which tool you use is your decision. The cockpit only defines the table layout.
- The tables live in an SAP HANA schema. Depending on the release, this can be the S/4HANA system's own database or a separate schema that you connect to the project.
- Because the data is already in a database, you can fill the tables with set-based operations and re-run the load script without manual file handling.
- You are responsible for the data types and key columns. Loading text that exceeds a column length fails in your load script, before the cockpit sees it.
This approach suits large volumes and many test cycles. It needs someone who can write the extraction and load logic and can reach the HANA schema.
Transfer data directly from an SAP system
The cockpit connects to a source SAP system (for example an SAP ERP system) through an RFC connection and reads the data itself. You select the source system and the objects. The cockpit already knows which source tables each object needs and how they map to the target structures.
- No templates and no extraction scripts.
- It only works when the legacy system is an SAP system of a supported release. Check the supported source releases, and any required technical components on the source side, in the documentation for your target release.
- Because the cockpit reads the source tables as they are, data quality problems in the source show up as messages during validation and conversion, so you fix them in the source or in the mapping rules.
This approach is the least work when it is available. You give up control over extraction. Anything the predefined mapping does not cover needs a value mapping rule or an adaptation of the migration object (see the chapter on the migration object modeler).
Comparing the approaches
| Criterion | Files | Staging tables | Direct transfer |
|---|---|---|---|
| Source system | Any | Any | Supported SAP systems only |
| Who extracts the data | You | You (SQL, ETL, replication) | The cockpit |
| Typical volume | Small to medium | Medium to very large | Medium to very large |
| Repeating a test cycle | Rebuild and upload files | Re-run a load script | Re-select and re-read |
| Skills needed | Spreadsheets, CSV or XML | SQL, ETL, HANA access | RFC setup, SAP source knowledge |
| Setup effort | Low | Medium | Medium (connectivity) |
| Availability | All editions | Depends on edition and release | Depends on edition and release |
Availability differs between SAP S/4HANA on-premise, private cloud and public cloud editions, and it changes between releases. Confirm what your system offers before you choose.
How to decide
Work through the questions in this order. Constraints come first, then volume, then team skills.
The same logic in words:
- Is the source a supported SAP system and is direct transfer offered in your edition? If so, start with it. It removes the extraction step.
- Does the predefined mapping fit your scenario? If you must reshape the data heavily, for example merge two legacy systems, direct transfer loses its advantage.
- How much data will you load, and how often? Many thousands of rows per object, or ten test cycles, favor staging tables over files.
- Who will do the work? Staging tables need people who can write and run load logic. If the team consists of business users with spreadsheets, files are realistic.
Mixing approaches
A project uses one approach. A migration as a whole often does not. You can run a project for large master data such as business partners with staging tables, and another project for a handful of configuration-like objects with files. Dependencies between objects hold across projects, because they come from the target system (see the chapter on dependencies and load sequence). Load in the right order, whichever project holds the object.
Common errors
- Choosing files for a volume that does not fit. Symptoms are upload failures, long upload times, and spreadsheets that freeze. Switch to staging tables early. Do not split files by hand across dozens of uploads.
- Treating the template as the extraction specification. A template tells you the target layout. It does not tell you which legacy fields feed which column. Write down that mapping yourself, per object.
- Assuming direct transfer means no data cleansing. The cockpit reads what is in the source. Duplicates, inconsistent codes and over-long values all still need to be addressed.
- Filling staging tables with the wrong keys. Primary keys in the staging tables must be unique. Duplicate keys cause load failures in your script, or silent overwrites if your script upserts.
- Not checking availability. A feature described in a blog post may not exist in your edition or release. Check the documentation for your exact version.
What does not change
Once data is in the cockpit, the approach no longer matters. Validation, value mapping, simulation and migration run in the same way, and the messages look the same. This is why the cockpit is a good place to standardize: you can change the source of the data between test cycles, for example from files to staging tables, without relearning the later steps. The chapters that follow cover those steps in order.
Exercise
A company moves 2 million material master records from a non-SAP legacy system. The team has strong SQL skills and expects at least five test migrations. Which approach fits best, and why is direct transfer ruled out?
Show answer
Staging tables. The volume and the number of test cycles favor a scripted, repeatable load over manual file handling, and the team has the SQL skills to fill the tables. Direct transfer is ruled out because it reads from a supported SAP source system through an RFC connection, and the legacy system is not an SAP system.
Exercise
A project uses the files approach. Halfway through, the team finds that the extract no longer fits into the allowed file sizes. What should they have considered earlier, and what is the usual remedy?
Show answer
They should have checked the file size limits for their release against the expected volume before choosing the approach. The usual remedy is to move to staging tables (or direct transfer, if the source is a supported SAP system), which typically means a new project, because the approach is set per project.