quinta-feira, 4 de julho de 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).


Once it is saved, the connection looks like this.

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:



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.


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

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

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 .


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.

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.

Few things that you can see here:
  • Status – Synchronized
  • Structure – S_BNKA
  • Staging Table – /1LT/DSR10000003

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

Now we will validate the table name in S/4 and HANA Studio.
Go to SE11 and enter the table name  –

Click Display and you can see Bank Master Transparent Table  .

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

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.

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

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

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.

The Data Flow in details looks like this:

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

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

The job looks like this:

Once you execute the Job.

1 record is passed to the Target table:

Select the table preview of the table:

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

Load the data using Migration Cockpit

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

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


The Validate Data Step will come with Errors and Warnings .

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.

Click on each field and just Select and Press the  key



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



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

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

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


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

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.

Go to S/4 and check the table BNKA.

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

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.

References:
SAP Notes and Blogs
Source: https://blogs.sap.com/2019/03/13/working-with-staging-tables-in-s4hana-migration-cockpit/


Nenhum comentário:

Postar um comentário