Migration of CRM one order transactions from SAP CRM 7.0 to SAP S/4 Hana Customer Engagement

SAP S/4 HANA Customer Engagement is a simplified version of SAP CRM embedded in S/4HANA. It was initially available as an add-on under the name “customer management. For a better understanding of the SAP S/4 HANA Customer Engagement data model, please refer to the below content

CRM One Order model redesign in S/4 Hana for Customer Management

Here in this blog, we only talk about how we performed the migration of SAP CRM one-order transactions to the SAP S/4 Hana customer engagement system for one of our customer implementations. This process is exclusively designed for migrating the SAP CRM one-order transactions. Following this procedure, we have successfully migrated the below CRM one-order transactions

  1. Service requests with attachments
  2. Interaction records along with email and MIME attachments

We also migrated the change processing log for the above CRM one-order transactions. The challenges faced while we migrated the data about the address number, person number, and SMTP address transformation. We also had some complexities in migrating the attachments. I shall detail more about this in my next blog. Let us get into the details of the framework we built for carrying out the CRM one-order migration from SAP CRM to SAP S/4 Hana.

SAP%20CRM%20to%20SAP%20S/4%20Hana

SAP CRM to SAP S/4 Hana

Our approach is one of the several approaches used to carry out the migration. In this approach we followed a migration of table to table. Transactional data is extracted and transformed from the SAP CRM standard tables and loaded into SAP S/4 Hana standard application tables with the help of ABAP reports and custom staging area both in the source and the target systems.

Here are the prerequisites for this approach:

  1. Completed migration of Master data such as Business partners and Products
  2. Imported all the Customizing Transports into to the target system
  3. Completed the manual configurations in the target system
  4. Completed manual migration of the enhancements
  5. Completed the creation of KUT fields in the SAP S/4 Hana tables as per the requirement

Here are the system requirements for this approach:

  1. Minimum requirement is SAP S/4 Hana runtime licence
  2. SLT server – This comes as a free product with the SAP S/4 Hana runtime licence

 This method suits best for cases where it requires,

  1. Faster data load for a high volume of transactional data
  2. A high degree of like-for-like – Retaining the CRM one order guids and object Ids
  3. Intact referential integrity, where the CRM one order transactions are referred other transactions e.g., ISU contracts
  4. To migrate the transactions with their attachments (MIME, image, PDF) – E.g., Migrating the service requests with pdf attachments, or migrating the interaction record with an email attachment

Migration%20Framework

Migration Framework

Our Source system is SAP CRM 7.0, and the target system is SAP S/4 Hana Customer engagement. SAP Landscape Transformation server replicates the data from the source system to the target system. This approach is best suited for migrating the CRM one-order transactions like Service requests and Interaction records.

Though we follow a table-to-table migration approach, it is not pretty straightforward. The data undergoes a lot of transformation. The reason is – The one Order Model from SAP CRM 7.0 has undergone a redesign in SAP S/4 HANA for Customer Engagement. 

Below are the building blocks of this migration approach: 

  1. Creation of staging area in source and target system
  2. Developing ABAP ETL Programs in the source system
  3. SLT server configuration between source and the target system
  4. Creation of ETL Programs in the target system

Creation of Staging area in source and the target system

To handle high data volumes, we need to create an exclusive staging area in the source and the target system.

Staging%20area

Staging area

Creation of staging tables in SAP CRM 7.0

The Source system staging area involves the creation of custom tables in SAP CRM, which are identical to the standard tables in the SAP S/4 Hana customer engagement system. SAP S/4 Hana standard tables are identified based on the segments involved in the CRM one-order object.

Creation of Staging schema in SAP S/4 HANA system

Building the staging area in the SAP S/4 Hana system is much simpler when compared to the process in the SAP CRM system. All we need to do here is to create a custom schema in the HANA DB. Configure The SLT server to load the Staging area data extracted from the source system into the custom schema created in the target system. The custom schema in the SAP S/4 Hana system is inevitable because they serve as a two-step verification of the data before we write it into the application tables. Moreover, the ETL tools like the SLT server are refrained from writing directly into the Sap S/4 HANA application schema.

Creation of ABAP ETL program in the Source system

Custom programs are developed in SAP ABAP to read the required SAP CRM standard table. The data is then transformed to Sap S/4 Hana format and loaded into the Staging tables in the SAP CRM source system. This process requires a detailed understanding of the CRM one-order framework in both source and the target system. It’s a two-step process where each SAP CRM standard table gets mapped to the respective SAP S/4 Hana standard table, and in turn, each field in the SAP CRM source table gets mapped with that of the SAP S/4 Hana target table.

When we migrate service requests from SAP CRM to SAP S/4 Hana Customer engagement, our mapping sheet will look like the below image. The Same logic goes into the ABAP program.

Table/Field%20mapping

Table/Field mapping

Configure the SLT server between the SAP CRM system and SAP S/4 Hana system

SLT server is the SAP first ETL (Extract, Transform, Load) tool that allows you to load and replicate data in real-time from the SAP/Non-SAP source system into SAP HANA Database. Establish the connection between the SLT server and the SAP CRM 7.0 using an RFC connection. Establish a DB connection between The SAP SLT server and the SAP S/4 HANA. When the replication starts, the system loads the data into the target staging schema. Once the entire data is loaded, the system goes into the replicate mode.

Having an SLT server in the architecture is of a great advantage.

  1. No data loss
  2. No conversion issues of SAP data types while loading into SAP HANA DB
  3. Multiple times faster data load compared to file upload
  4. Execute parallel threads for a high volume of data

Creation of ETL Programs in the target system

The data loaded from the SAP CRM staging area into the SAP S/4 Hana staging area, must be extracted, transformed, and loaded into the SAP S/4 Hana application tables.

Extracting data from SAP S/4 Hana custom schema

There are several ways to expose the HANA database tables into the application layer. One approach is to create attribute views out of the tables in the custom schema and then to create an external database view on top of the attribute views so that the table is made accessible by the programs in the application layer.

External%20view

External view

The other approach is the creation of AMDP (ABAP Managed Database Procedures) to read from the staging tables present in the custom schema.

AMDP

AMDP

The advantage of the AMDP over the creation of external views is that,

  1. We faced a scenario where The SAP data type NUMC gets represented as NVARCHAR in SAP HANA DB. The same gets reflected in the Hana external view as well. Due to this reason, an additional data type conversion is required when read by the ABAP programs. In the AMDP approach, the framework takes care of the data type conversions between the SAP HANA DB and the SAP ABAP layers.
  2. We can write most of our transformation logic for required tables within the AMDP and have a generic ABAP Program to load data into the application tables. For example, the Business Partner address numbers in the SAP CRM one-order transactions will have to be transformed following the address numbers in the SAP S/4 Hana. The transformation logic conveniently gets placed inside the AMDP.

Loading data into SAP Standard tables in SAP S/4 Hana

If we can push most of the transformation logic into the AMDP methods, we can create a generic SAP ABAP program for loading the data into the application tables.
The generic program calls AMDP methods for the respective tables and loads the data extracted from the staging area into the application tables in the SAP S/4 Hana customer engagement system.
We can parameterize the program to take the table name, Package size of data (Say limit and offset) and pass it to the AMDP methods. This technique avoids memory dumps.

Hence, this approach can seamlessly achieve a table-to-table migration of SAP CRM one-order transactions into the SAP S/4 Hana customer engagement system.

Cheers,
Santhosini