Wednesday 13 March 2019

Working with Staging Tables in S/4HANA Migration Cockpit

S/4HANA migration cockpit is the migration tool which was initially designed for S/4HANA cloud edition but now it is also available for 1709 S/4HANA FPS1 on premises and later versions.

S/4 HANA Migration Cockpit is browser based (WordPro) interface. No additional setup or activation is required once we setup SAP S/4HANA system.

Key Features of Migration Cockpit


◈ This tool is embedded and delivered with S/4HANA system.

◈ No programming is required by the customer.

◈ As the name suggests, this tool is used for migrating data from SAP or Non SAP system to S/4HANA.

◈ This tool has predefined migration object which contains the mapping for all master and transactional data. It reduces migration cost and time.

◈ Migration activities are predefined and easy to use.
Using Staging tables in Migration Cockpit we can use Database Tables as a source for your Migration Project. These are called as ‘Staging Tables’, so you extract the data from the source system into these staging tables and import the data from there with the S/4HANA Migration Cockpit.

The Advantages are:

◈ faster overall process (export/import), less clicks
◈ Performance
◈ Use Database Tools to Extract and Transform

Method to populate Staging Tables:

◈ SAP Data Services
◈ HANA Studio
◈ Using Excel as Source in S/4 and populate Staging tables programmatically.

This document will use SAP Data Services as a method to populate Staging Database.

1. Create a Database Connection:

The first step in using Staging table is to create a Database Connection between S/4 and the schema where the Staging tables will reside. The Staging tables can exist in a remote database or in the target S/4HANA database (but in a separate Schema) .

Go to transaction DBCO to create the database connection ( or let the Basis team do their job and ask them).

S/4HANA Migration Cockpit, SAP HANA Tutorial and Materials, SAP ABAP Study Materials, SAP ABAP Guides

Once it is saved, the connection looks like this.

S/4HANA Migration Cockpit, SAP HANA Tutorial and Materials, SAP ABAP Study Materials, SAP ABAP Guides

Important tip:

Just by Creating a Database Connection does not mean you can use it as a Staging Area for Migration Cockpit. Once  the connection is available in DBCO, you have to white-list this connection in table DMC_C_WL_DBCO_OP using transaction SM30:

S/4HANA Migration Cockpit, SAP HANA Tutorial and Materials, SAP ABAP Study Materials, SAP ABAP Guides

S/4HANA Migration Cockpit, SAP HANA Tutorial and Materials, SAP ABAP Study Materials, SAP ABAP Guides

S/4HANA Migration Cockpit, SAP HANA Tutorial and Materials, SAP ABAP Study Materials, SAP ABAP Guides

Once the entry is maintained, the Database Connection is ready for use externally.

Creating a New Project for Data Migration


Go to Transaction LTMC – Migration Cockpit.

S/4HANA Migration Cockpit, SAP HANA Tutorial and Materials, SAP ABAP Study Materials, SAP ABAP Guides

Click on Create New Migration Object and Select the Transfer Option – Transfer Data from Staging Tables.

S/4HANA Migration Cockpit, SAP HANA Tutorial and Materials, SAP ABAP Study Materials, SAP ABAP Guides

When you select the Database Connection, you can see the Database connection created in DBCO in previous Step.

S/4HANA Migration Cockpit, SAP HANA Tutorial and Materials, SAP ABAP Study Materials, SAP ABAP Guides

Once you Select Click on Create. Select it and Save and the Migration Object is ready for use. I have named it as STAGING_DEMO.

S/4HANA Migration Cockpit, SAP HANA Tutorial and Materials, SAP ABAP Study Materials, SAP ABAP Guides

Click on STAGING_DEMO and it will enter the Project with all Migration Objects available. Migration object comes with the following information:

1. Status– Object can be active – available for migration, deactivate – not available for migration and started – migration has started on this object.
2. Object name– It is migration object name which is relevant to customer master or transnational data.
3. Documentation– Once we click on documentation it will open a new window where we can find all information on migration object like required structure, fields, uses.
4. Dependent migration object– It shows a list of migration object that must be loaded first or already present in the system.

S/4HANA Migration Cockpit, SAP HANA Tutorial and Materials, SAP ABAP Study Materials, SAP ABAP Guides

You can see all Conversion Objects are in Status Not Started.  For this Demo I am using BANK Master Conversion Object. When you Click on BANK Conversion Object, a popup comes asking for copying the Conversion Object and Creating Staging tables.

Click OK.

S/4HANA Migration Cockpit, SAP HANA Tutorial and Materials, SAP ABAP Study Materials, SAP ABAP Guides

Few things that you can see here:

◈ Status – Synchronized
◈ Structure – S_BNKA
◈ Staging Table – /1LT/DSR10000003

S/4HANA Migration Cockpit, SAP HANA Tutorial and Materials, SAP ABAP Study Materials, SAP ABAP Guides

Click on the table /1LT/DSR10000003 and you can see there is no records right now.

S/4HANA Migration Cockpit, SAP HANA Tutorial and Materials, SAP ABAP Study Materials, SAP ABAP Guides

Now we will validate the table name in S/4 and HANA Studio.

Go to SE11 and enter the table name  –

S/4HANA Migration Cockpit, SAP HANA Tutorial and Materials, SAP ABAP Study Materials, SAP ABAP Guides

Click Display and you can see Bank Master Transparent Table  .

S/4HANA Migration Cockpit, SAP HANA Tutorial and Materials, SAP ABAP Study Materials, SAP ABAP Guides

In HANA Studio also you can see the table under the correct schema:

S/4HANA Migration Cockpit, SAP HANA Tutorial and Materials, SAP ABAP Study Materials, SAP ABAP Guides

Filling the table with Data to be used for Cockpit Load.

As mentioned earlier we will use Data Services to populate the Staging Table .

Log into Data Services and map the HANA Database.

S/4HANA Migration Cockpit, SAP HANA Tutorial and Materials, SAP ABAP Study Materials, SAP ABAP Guides

Once it is mapped. Right Click and Select Import by Name.

S/4HANA Migration Cockpit, SAP HANA Tutorial and Materials, SAP ABAP Study Materials, SAP ABAP Guides

Once the table is Imported you can see it under Datastore tab and under Tables tab under the STG Datastore configured earlier.

S/4HANA Migration Cockpit, SAP HANA Tutorial and Materials, SAP ABAP Study Materials, SAP ABAP Guides

Create a job to pass data to the Staging Table.


I have created a Basic Job to pass 1 record to the table, which will use for the demo.

The name of the job is – JB_STAGING_AREA and it has one Data Flow – DF_STAGING_AREA.

S/4HANA Migration Cockpit, SAP HANA Tutorial and Materials, SAP ABAP Study Materials, SAP ABAP Guides

The Data Flow in details looks like this:

S/4HANA Migration Cockpit, SAP HANA Tutorial and Materials, SAP ABAP Study Materials, SAP ABAP Guides

In Query Data Query, I am passing Default values for load.

S/4HANA Migration Cockpit, SAP HANA Tutorial and Materials, SAP ABAP Study Materials, SAP ABAP Guides

And as we have to pass only First row, the filter is in where Clause.

S/4HANA Migration Cockpit, SAP HANA Tutorial and Materials, SAP ABAP Study Materials, SAP ABAP Guides

The job looks like this:

S/4HANA Migration Cockpit, SAP HANA Tutorial and Materials, SAP ABAP Study Materials, SAP ABAP Guides

Once you execute the Job.

S/4HANA Migration Cockpit, SAP HANA Tutorial and Materials, SAP ABAP Study Materials, SAP ABAP Guides

1 record is passed to the Target table:

S/4HANA Migration Cockpit, SAP HANA Tutorial and Materials, SAP ABAP Study Materials, SAP ABAP Guides

Select the table preview of the table:

S/4HANA Migration Cockpit, SAP HANA Tutorial and Materials, SAP ABAP Study Materials, SAP ABAP Guides

And we can see the same in HANA now once the job is processed:

S/4HANA Migration Cockpit, SAP HANA Tutorial and Materials, SAP ABAP Study Materials, SAP ABAP Guides

Load the data using Migration Cockpit


The last and main Step is to Migrate this Data into S/4 using the Migration Cockpit .

S/4HANA Migration Cockpit, SAP HANA Tutorial and Materials, SAP ABAP Study Materials, SAP ABAP Guides

Once you Click Start, the migration starts and progress bar will show the

S/4HANA Migration Cockpit, SAP HANA Tutorial and Materials, SAP ABAP Study Materials, SAP ABAP Guides

The Validate Data Step will come with Errors and Warnings .

S/4HANA Migration Cockpit, SAP HANA Tutorial and Materials, SAP ABAP Study Materials, SAP ABAP Guides

Click Next and you see the Mapping errors. These are technically not errors, but S/4 just validates the value we are passing matches the help values for that field.

S/4HANA Migration Cockpit, SAP HANA Tutorial and Materials, SAP ABAP Study Materials, SAP ABAP Guides

Click on each field and just Select and Press the  key

S/4HANA Migration Cockpit, SAP HANA Tutorial and Materials, SAP ABAP Study Materials, SAP ABAP Guides

S/4HANA Migration Cockpit, SAP HANA Tutorial and Materials, SAP ABAP Study Materials, SAP ABAP Guides

The field turns Green Status. DO this for the next 2 fields.

S/4HANA Migration Cockpit, SAP HANA Tutorial and Materials, SAP ABAP Study Materials, SAP ABAP Guides

S/4HANA Migration Cockpit, SAP HANA Tutorial and Materials, SAP ABAP Study Materials, SAP ABAP Guides

Once the Open Task area is Blank, Click Next to go to next Step (Convert Values)

S/4HANA Migration Cockpit, SAP HANA Tutorial and Materials, SAP ABAP Study Materials, SAP ABAP Guides

Once the task is finished and you get the message below for Conversion. Click Next to Simulate Import.

S/4HANA Migration Cockpit, SAP HANA Tutorial and Materials, SAP ABAP Study Materials, SAP ABAP Guides

Simulate Import will do the test but will not Commit to save any values.

S/4HANA Migration Cockpit, SAP HANA Tutorial and Materials, SAP ABAP Study Materials, SAP ABAP Guides

The simulate gives a Success message that the Data is good for Commit. You get the message at the Top: All data have been processed; choose “Finish” to complete the transfer

S/4HANA Migration Cockpit, SAP HANA Tutorial and Materials, SAP ABAP Study Materials, SAP ABAP Guides

Click on Finish to Finish the Load and Commit the values.The load is finished and you can see the processed records in Migration Cockpit.

S/4HANA Migration Cockpit, SAP HANA Tutorial and Materials, SAP ABAP Study Materials, SAP ABAP Guides

Go to S/4 and check the table BNKA.

S/4HANA Migration Cockpit, SAP HANA Tutorial and Materials, SAP ABAP Study Materials, SAP ABAP Guides

Go to Transaction – FI03 , to see the Data in Transaction. You can see the Bank Master Data.

S/4HANA Migration Cockpit, SAP HANA Tutorial and Materials, SAP ABAP Study Materials, SAP ABAP Guides

With this document you will be able to import data into Staging tables and then into S/4 HANA SYSTEM USING Migration Cockpit. This document will be helpful  at the time of data migration where Data is huge and coming and being Transformed in Data Services .Please note the staging concept in SAP S/4HANA Migration Cockpit is only valid for HANA Databases.

You can leverage the same steps for other Conversion objects (Vendors, Customers, Equipment, etc).The templates for each Conversion Object is different would be different, but the fundamentals remain the same.

No comments:

Post a Comment