SAP Knowledge Base Article - Public

3210687 - Additional Information about Transferring Data from CSV Template Files to Staging Tables for the Migration Cockpit for SAP S/4HANA Cloud


You are using the SAP S/4HANA migration cockpit to migrate data to SAP S/4HANA Cloud and want to learn more about the new feature of the Migration Cockpit: Transferring Data from CSV Template Files to Staging Tables.


You are using SAP S/4HANA 2208 onwards.

  • SAP S/4HANA Cloud
    • Migrate your Data - Migration Cockpit app


The SAP S/4HANA migration cockpit allows users to migrate master data and transactional data to SAP S/4HANA, and it facilitates this process by providing predefined migration content and mapping. You can fill the staging tables with data either using XML templates, CSV files, manually or by using third party or SAP’s ETL tools (for example SAP Agile Data Preparation).

The CSV feature is available with SAP S/4HANA Cloud 2208. With this new feature, you can use CSV files to populate the staging tables with data in the Migration Cockpit - Migrate Your Data app. For more details see:


General CSV upload process 

The general process to upload CSV files to the SAP S/4HANA migration cockpit is as follows:

  1. Verify and adjust the CSV file options available within the SAP S/4HANA migration cockpit.
  2. Download the CSV template files for the relevant migration object.You can either use these CSV templates and enter data directly in the CSV files or you can use the CSV templates as a basis to populate new CSV files with data.
  3. Create your CSV files. You prepare the data according to the CSV file options within the Migrate your data – Migration Cockpit and create your CSV files. You can also include all your single CSV files in one Zip file.Note: For every data structure of a migration object, you must create a single CSV file containing the relevant data.
  4. Upload your Zip or CSV files. After preparing your CSV files or your Zip file containing your single CSV files, you have two options for uploading your CSV files.
    1. Option A. Upload a Zip file which contains all your CSV files.
    2. Option B. You create a CSV folder for a migration object and then upload single CSV files. 
  5. Map your CSV file to a data structure. An automatic mapping of the CSV files to the corresponding data structure will occur if the name of the CSV file is same as the data structure name. Otherwise, you must map each of the CSV files to the relevant data structure manually.
  6. Validate and transfer the data to the staging tables. Once you have uploaded your single CSV files or Zip file and the mapping has been successfully completed, you can then validate and transfer the data to the staging tables. Note that if you upload a zip file that contains the CSV files the system will automatically validate the data in the CSV files and transfer the data to the staging tables.

For more information as well as detailed steps for uploading CSV files to the SAP S/4HANA migration cockpit, see the following user guide:


Tips and Recommendations for creating your CSV files:

  • Before creating your CSV files, you must verify (and adjust if required) the CSV file options available within the Migrate your Data app.
  • CSV files must have the extension .csv
  • CSV files must include, preferably as the header row, the technical name of the fields of the table.
  • The fields must appear in the same order as the staging table definition (see the screenshot below). This ensures that the fields can be mapped more easily, or even automatically by using options for mapping.
  • Depending on the definition of the field in the source structure, some fields of the staging tables are defined as NOT NULL and expect a value. The database management system will not add a row to the staging table unless the row has a value for that field.
  • Fields that are marked as NOT NULL in the data definition need to contain values for the corresponding columns in the file. Otherwise, the system displays an error message stating that the system cannot insert NULL or update to NULL.
  • In addition, if leading zeros are required, you need to add them to the relevant values in the CSV file as the ABAP database layer will not add these.
  • You must include ALL fields of the staging table in the csv file and populate them with at least NULL values or empty data. Otherwise, you will get an error message saying that the columns do not match. 

For example, for BANK CSV template file:

  • Example for Mandatory and NULL data (CSV file): DE,20000016,Commerzbank,,,,,,,,


For more information about transferring data from staging tables, leading zeros, default values, and correctness of values of certain data types (for example DATE, DECIMAL, TIME, and so on), see SAP KBA 2733253 and the SAP Help Portal: SAP HANA SQL and System Views Reference for SAP HANA Platform → SQL Reference → Data Types.

Other relevant information:

  • Similar to the XML file templates available within Migration Cockpit for data migration, the size limitation for CSV files is 100MB. Note that this limitation does not depend on the file format, but on SAP GUI, as NetWeaver does not allow more than 100MB. However, compared to that of the XML file templates, a CSV file can contain more migration object instances.


  • Comparing CSV template files with XML template files, a single CSV file corresponds to a worksheet in the XML template file. For example, for the migration object Bank you only need to upload one mandatory CSV file for Bank Master (S_BNKA.CSV), as there is only one mandatory data structure (S_BNKA) (corresponds to one worksheet in the XML template file). Whereas the migration object Customer has multiple data structures. You need to upload one CSV file for each mandatory data structure. For example, the migration object Customer has the mandatory data structure General Data (S_CUST_GEN), as well as the data structures Additional Addresses (S_ADDRESS), Address Usages (S_ADDR_USAGE), International Address Versions (S_ADDRESS_IAV), and so on. You can find the information about mandatory and optional data structures on the SAP Help Portal (Available Migration Objects) at On the Migration Object Tables screen, you can also download a metadata file for each migration object. You can also find information about mandatory fields in the CSV file template files.

See Also

The Data Migration landing page on the SAP Help Portalat → Migrate Your Data - Migration Cockpit → Transferring Data from CSV Template Files to Staging Tables.


CSV files, transfer data to staging tables using csv files, migration cockpit, CSV format, CSV upload, CSV Template Files, Migrate your Data – Migration Cockpit, Migration Cockpit Cloud, data migration, new implementation , KBA , CA-LT-MC , S/4HANA Migration Cockpit , How To


SAP S/4HANA Cloud 2208