Skip to Content
Technical Articles
Author's profile photo Thiago Rigo

Custom Migration Objects using BAPI

In a SAP S/HANA project is often required to migrate master data from the current system (SAP or Non-SAP) to the new one, or also create massive master data.

Since the first release of SAP S/4HANA, it’s highly recommended by SAP to use LTMC(Legacy Transfer Migration Cockpit) tool, for massive master data loading.

The purpose of this blog is to enhance your knowledge about migration cockpit resources, if you are not familiar with this technology I suggest you read this blog (credits: Ruthvik Chowdary) before reading this one.

SAP delivers plenty of migration objects, such as business partners, cost centers, accounts, conditions records. Nevertheless, there are master data objects which are not supported.

The solution for those cases is customize your own migration object using a BAPI function which maintain the desired master data.

Below I’ll explain the steps how to do it by using master data of TM Resources as example.

Before starting, it is important to mention that the functional consultant may have the basics of technical knowledge, such as data types and BAPI execution, if necessary a technical consultant may help on the whole process.

I’m going to use BAPI function module BAPI_RSSRVSCMB_SAVEMULTI2 in order to fullfill the requirement of massive resource creation.

  1. Once the migration project is set, go to transaction code LTMOM in change mode and create a migration data object as “User defined”:
  2. Define a object name, its description and select option “Function Module”, and click on “Next”:
  3. On the next screen, fullfill the desired BAPI function name.
    In section of “Simuation Settings” fullfill with BAPI parameters which controls the db commit command, if aplicable.
    Click on “Next”:
  4. The new migration object will be created. Navigating throught the paths on the left side, select path “Source Structure”, select “Append structure to Lower Level” and then define a name for the structure:

  5. A window on the right side will be displayed where you can define the input file fields, click on “Insert field” button to create.
    TIP: Using same field names from BAPI function will help on automatic mapping afterwards.

  6. After defining source fields, you should map them to the BAPI structures, go to “Structure Mapping” path on the left side and then drag source structure to the BAPI structure, do the same for each field of the source structure.
  7. Go to “Field Mapping” path and click on “Rule Proposals”, the system will propose automatically field mapping.


    In case of fields that the system didn’t match automatically the rule proposal will get in blank, you may define it manually.
    Click on Continue.
  8. Now you can generate the migration object, click on “Activate” button.
  9. The activation result will be displayed at bottom of the screen, in case of no errors occurred you may test your custom migration object.

Master data is always a topic in SAP projects which demands time and dedication of the project team.
Using custom migration objects is an option to acelerate process of loading master data which are not covered by standard migration objects.

I hope you enjoyed this topic and it helps you on your SAP S/4HANA projects.

Assigned tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo Renan Ferreira
      Renan Ferreira

      Tks for sharing!