This Blog describes how it is possible to add custom fields to standard migration objects or even create new migration objects.

Description and Screenshots are created with S/4HANA 1610 FPS2. Some options might not be available before and there will be more features available in 1709.

Be aware the Migration Cockpit and Object Modeler are new Solutions, so at some points there are still bugs and there will be a lot of additional features in the future.


before starting LTMOM, you have to create a migration project using /NLTMC

Link to getting started with the S/4HANA migration cockpit (onpremise) 


Start Migration Object Modeler

Call Transaction code /NLTMOM

Select the Migration Object from the value-list (F4)


in most of the cases, it is the easiest solution to use an existing Migration Object and just add some Fields to an existing Source Structure. But it is also possible to create new Migration Objects or Source Structures.


Create a new Migration Object

To Create a new Migration Object select ‘create Migration Object’ from the Menu.

you can eater copy from an existing SAP Migration Object/Template or create a user defined Migration object.


User-defined Migration Object

give an Object id(No Z_ required, example MYOBJ) and description. Currently only the option Migration from File by calling Function Module is supported. (see Outlook)


Enter the Name of the Function Module (Example BAPI_MATERIAL_SAVEREPLICA)

Parameter for the Return is the Table-Parameter which contains the BAPIRET2-Error Messages (see /NSE37)

Parameter for Simulation see Function Module Description, usually there is an option like TESTRUN, where ‘X’ means no Update.


Define Source Structure / Add Fields to Source/Excel Spreadsheet

in the Section ‘Source Structure’ it is possible to add new Fields to existing structure and add new Structures.

choose ‘Add Field’ to add fields at the end of the structure. choose ‘insert Field’ to insert the field at the cursor position.


add new Source Structures (Optional)

in future it will be possible to choose the Structure Definition from DDIC or Remote Databases:


Foreign Key Relationship: You can maintain foreign Keys for Keyfields like MATNR or KUNNR. (See also Standard Objects Assignment)


for example, i want to add custom fields to the Material BAPI. The BAPI has an Input Parameter for Customer Fields which matches the Structure BAPIE1PAREX:

Enter Field name, Datatype and Length and Description (Description is shown in generated Excel Template). i usually use CHAR Fields for the Excel/Input Structure and they also can be longer than the target SAP Field.

Press on Button ‘Generate Runtime Object’.

next Time you Generate an Excel Template in LTMC, you will also see the new fields.


Target Structure

currently this comes from the assigned Function Module so there is nothing to be changed here.


Structure Mapping

each target structure you want to use/fill needs to be assigned to at least one source structure (can also be more than one). this is done by drag and drop.

best thing is to look at the standard assignments first.

the assignment triggers the loop, you can only assign fields of an assigned structure in the field mapping.


Field Mapping

when choosing field mapping, the current mapping is displayed.

i usually choose ‘more/settings/technical names on’.

there might be complex hierarchies with a lot of structures and fields, so i ‘collapse’ the target structure first and then drill down to the relevant structure. you can also use the ‘search’ function to find you target field.

then drag and drop the source field to your target field.

some BAPIs have ‘X’ Field Structures, where you have to Mark the Used Fields with an ‘X’:

double click the target field to see the mapping-rule:


here you can select from a list of existing mapping rules, or create a new mapping rule. For each Value-Mapping in LTMC, there is a Rule available:

Create new Mapping Rule

if you click on Create you can create a new Rule:

Define Input/Output Parameters

Create a Default Variant

Create Documentation

Edit Code (ABAP)



Use Mapping Templates:





seems to be a bug, but i could not yet find a note for it. Solution: just start LTMOM again


use display generated function group to see the generated ABAP Code:


Error: Different number of parameters in FORM and PERFORM

i did not really see an error as it is a standard MOVE Mapping with a Constant Value. After i changed the Constant to ‘X’, then ok, then change to ‘MYVALUE’ again, the error disappeared.


Update Custom-Specific/Additional Fields to BAPIs

you need to add these to the BAPI, see


Additional Ideas

Create a Batchinput Recording, Generate a Function Module and create a Migration Object for this Function Module. (/NSM35)

Example Material Master, Field Commodity Code MARC-STAWN currently not updated by BAPI_MATERIAL_SAVEREPLICA. I usually do a Z-Report to save it with function /SAPSLL/API_COMCO_CLS_DISTR, but it should be possible also to create a new migration object for this function module.


Transport DEV/QAS/PRD

in LTMC there is an option to export and import migration Projects.



it looks as it will be possible to create Migration Objects from IDOC and Direct DB Access to Source R/3 System.



To report this post you need to login first.


You must be Logged on to comment or reply to a post.

  1. SAPer Yang

    Wow..thanks,Jorg…I am the first one to comment on it..

    Can you give me some tips on below issue  when executing LTMOM… I checked with the BASIS guy but he also has no idea..


    Looks like some configuration or application is required to use LTMOM…

    1. Jörg Knaus Post author

      i think there is nothing special to be installed for LTMOM from SAP Basis. Do you have a Migration Project in LTMC?

      what sap release/patch are you on? are you using webgui or local sapgui installation?

      did you try log in in english? ( i see asian characters in your screenshot ), try in english first.

      (webgui can be called from browser with /sap/bc/gui/sap/its/webgui?~transaction=LTMOM

      (i do not recommend webgui here, but just to find out whats going on)




  2. Frank Finkbohner

    Hi Jörg

    starting SAP S/4HANA Cloud 1705 there is a new object (Material – Commodity code) available to  classify products. It is using the new FM /SAPSLL/COMCO_CLS_MIGR_BAPI. Probably not available before 1709 OP.





  3. Atul Khavenekar

    Hi Jorg,

    This blog is very helpful. We have followed same process to migrate the data.

    Tried to insert  Employee address details (PA20) with custom function module, where we are not getting any errors while uploading the source template.and able to proceed with  Star Transfer

    Issue here is , we are not able to see the Simulate step in the road map, only three steps are available for custom migration object. And also data is not migrating in to PA20 transaction through the source template, where as we are able to migrate through Function module.


    Can you give some helpful tips on the issue.






    1. Jörg Knaus Post author

      i think if Simulation is active or not depends on the Settings here: (Parameter for Simulation)


      what function are you using? some functions require also a post processing function (like save_adress_data), so a combination of multiple functions

      if you set a breakpoint at the beginning of function module, you should be able to see the difference between template and your migrate through function module.


Leave a Reply