VeloX Docs

S/4HANA plugins

S/4HANA Migration Cockpit

Fill SAP S/4HANA Migration Cockpit templates with source data and upload them to the Migration Cockpit

Overview

The S/4HANA Migration Cockpit plugin prepares data for the SAP S/4HANA Migration Cockpit (MC). It takes the structure of a Migration Cockpit template (an XML spreadsheet file), lets you map source fields to its sheets and columns, and writes a filled template file when the migration runs.

If you have access to the Migration Cockpit app, the plugin can also download the template, upload the filled file to a migration project, and start a simulation in the Migration Cockpit.

The plugin follows the Migration Cockpit file approach for projects of the type Migrate Data Using Staging Tables: the filled XML template is uploaded to the migration object, and the Migration Cockpit loads its content into the object's staging tables. The plugin does not write to the staging tables in the database directly and never posts data to SAP itself. Posting (Migrate) is done in the Migration Cockpit app.

You can find the plugin in the S/4HANA group on the left panel of the Designer section. It is a target plugin: map fields from any source (Excel, database, SAP table, Python, and so on) to it.

Settings

Open the Settings section of the plugin. It has two tabs.

General

Under File path to save S/4 MC Template with source data:

Field Description
Output Directory Folder for the output file. Click ... to browse. The folder is created if it does not exist.
Output File Name Name of the output file. The .xml extension is added automatically.
Add TimeStamp To FileName Adds the date and time of the run to the file name, so each run creates a new file.

Under Manual S/4 MC Template Load, use S/4 MC Template to select a template file you downloaded from the Migration Cockpit. Use this option if you have the template file but no access to the Migration Cockpit app. The plugin builds its sheets and columns from the file.

The template must be in the XML Spreadsheet 2003 format (.xml) that the Migration Cockpit produces. When the plugin reads it:

  • The Introduction and Field List sheets are skipped. All other sheets become plugin sheets.
  • Column names, data types, and descriptions are taken from the header rows of each sheet. A column whose description ends with * is mandatory.
  • The columns under the Key group are key fields.
  • Sheets that the Migration Cockpit marks as mandatory (by their tab color) are mandatory sheets.

The template content is saved with the VeloXm project, so the template file is not needed again at run time.

Advanced (with S/4 MC access)

Use this tab to work with the Migration Cockpit directly.

The connection uses a Password Manager entry. Its Options must contain a Url key with the address of the S/4HANA system, for example https://host_name:443, and a Client key. The user name and password of the entry are used to log on.

  1. Under Target System, select the Password Manager entry.
  2. Under Migration Cockpit Project, click Get Projects and select a project in Select Project. You can type to filter the list by project name or status.
  3. Under Migration Cockpit Object, select the migration object and click Get Template. The plugin downloads the object's template and builds its sheets and columns.

The template is downloaded from the Migration Cockpit as a ZIP archive, and the plugin reads the XML template file inside it. The same rules apply as for a manually loaded template. After a successful connection, the plugin shows the host, port, and user of the SAP system on its canvas item.

The plugin talks to the Migration Cockpit through the OData service MIG_MC_ODATA_SRV. These links open the Migration Cockpit app in your browser:

Link Opens
Open Project The selected project and its objects.
Create New Project (Staging Tables) The Migration Cockpit page for creating a new project that uses staging tables.
Open File List The staging table list of the selected migration object.
Open Instances The instances of the selected migration object.

Open Template saves the downloaded template to a file you choose and opens it.

Sheets and columns

Open the Sheets section to choose which template sheets appear on the canvas. Then open Columns on each sheet to choose its columns. Use Select All to add everything.

  • M marks a mandatory sheet or field.
  • K marks a key field.

Each column shows its data type (text, number, date, or time) and length from the template.

Field settings

Click a column on the canvas to open its settings:

Setting Description
Default Value Value used for the column. Choose No Default Value., Ignore Source. (always use the default value), or Only If Source Empty.
Convert To Upper Case Converts the value to upper case.
Remove Leading Zeros Removes leading zeros from the value. Only values that consist of digits are changed.

Value formats

The plugin converts date and time columns to the format of the XML template:

  • Date columns accept yyyyMMdd (the SAP internal format) and common day-first, month-first, and year-first formats with ., /, or - as separator, with two- or four-digit years, for example 31.12.2024, 12/31/2024, or 2024-12-31.
  • Time columns accept HHmm, HHmmss, HH:mm, HH:mm:ss, and 12-hour formats with AM/PM.
  • Text and number values are written as they are. The plugin does not check the length or the number of decimals given in the template; the Migration Cockpit checks them when the file is uploaded.

Values that cannot be read as a date or time are written unchanged.

Run-time behavior

Before the run starts, the plugin checks that:

  • On every selected sheet, either all mandatory fields are mapped or have default values, or none of them are. A sheet with only some mandatory fields mapped stops the run.
  • Mandatory sheets have their mandatory fields mapped. If not, the plugin asks whether to continue.
  • You can write to the output directory.

If the output file already exists, the plugin warns you that it will be deleted. During the run, the plugin collects the data for every record. When the run finishes, it writes the filled template to the output file.

With Add TimeStamp To FileName, the file name gets the suffix _yyyyMMdd_HHmmss, for example Customers_20240131_143005.xml. During the run, the collected rows are kept in a temporary SQLite file with the same name and the .sqlite extension in the output directory. The temporary file is deleted when the output file is written.

The output file contains all sheets and columns of the template in their original order, with the template's formatting. Sheets you did not select are left empty, and columns you did not select are written empty.

Click Open Export File with Migration Data to open the file.

Upload and simulate in the Migration Cockpit

After the run, on the Advanced (with S/4 MC access) tab:

  1. Click Upload to MC to upload the output file to the selected migration object. "No source data loaded" is shown until there is a file to upload.
  2. Click Simulate in MC to run the Migration Cockpit simulation for the staging tables of the selected object.

The tab shows the status of the upload and the simulation. If the staging table has no records to simulate, a warning with a link to the object's instances is shown.

Upload to MC sends the output file to the selected migration object under its file name. The Migration Cockpit then validates the file and imports it into the staging tables. The plugin reads the Migration Cockpit activity monitor for about 20 seconds and shows the result of the validate file and import file steps (success, warning, or error) with the message from the Migration Cockpit. If the import takes longer, check its status in the Migration Cockpit app with Open File List.

Before Simulate in MC starts the simulation, the plugin reads the instances (staging table records) of the migration object and checks:

  • whether the staging tables contain records that are ready to simulate or were simulated with errors. If not, the simulation does not start;
  • whether these records come from the current output file. If not, or if the output file does not exist, the plugin asks whether to simulate anyway;
  • whether records from other files are also waiting. The simulation includes them as well, and the plugin asks whether to continue.

Each of these messages has a Review MC objects button that opens the object's instances in the Migration Cockpit app. The simulation runs for all records of the object that are ready or have errors. The plugin then checks the activity monitor every few seconds and shows the simulation status when it is finished.

Simulation mode

The VeloXm simulation mode does not apply to this plugin, because the plugin writes a file and does not post data to SAP during the run. Use Simulate in MC to test the data in the Migration Cockpit.

A run in simulation mode writes the output file in the same way as a normal run.

Log

For each record, the technical log shows the plugin name and version and an input data section with the rows collected for every selected sheet. If a record cannot be written to the temporary file, the log row is marked as an error with the exception message. The upload and simulation results are shown on the Advanced (with S/4 MC access) tab, not in the log.

Prerequisites

  • Write access to the output directory.
  • For the manual option: a Migration Cockpit template file in XML format.
  • For the Advanced (with S/4 MC access) tab:
    • SAP S/4HANA with the Migration Cockpit and a migration project of the type Migrate Data Using Staging Tables.
    • The OData service MIG_MC_ODATA_SRV must be active and reachable over HTTPS.
    • A Password Manager entry with the Url and Client keys and a user who may use the Migration Cockpit. The plugin logs on with HTTP basic authentication.
    • The Migration Cockpit app (SAP Fiori launchpad) for the Open ... links and for the final migration.

Our experienced team of experts has the capability to develop customized solutions to fit your individual needs.

Please contact us for more information on how we can help you.

Esc