Skip to Content

 

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) 

 

Update 6.7.2017: Click-Demo/Training of LTMOM

https://cp.hana.ondemand.com/dps/d/preview/76a9ec56a9eb6138e10000000a44147b/1610%20001/en-US/ab242557ea516359e10000000a44147b/content.htm

 

SAP Notes

Check CA-GTF-MIG / SV-CLD-MIG for predefined content problem, check CA-LT-MC for tools problem.

(use expert search https://launchpad.support.sap.com/#/mynotes?tab=Search)

 

 

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:

 

 

Troubleshooting

 

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 https://help.sap.com/doc/saphelp_ehsext40/4.0/en-US/3e/0e1089c24611d1ad09080009b0fb56/frameset.htm

 

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.

https://launchpad.support.sap.com/#/notes/2432527/E

 

Transport DEV/QAS/PRD

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

 

Outlook

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.

28 Comments

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

  1. 深圳鸽子 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…

    (0) 
    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)

       

       

       

      (0) 
  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.

    Best,

    Frank

     

     

    (1) 
  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.

     

    Thanks,

    Kishore

     

     

    (0) 
    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.

      (0) 
  4. Monika Blauth

    Dear Joerg,

    Thank you very much for this blog, it is very valuable. I tried to follow your instructions.

     

    In the transaction LTMOM I try to extend Material migration object by adding (activating) S_MARA-NORMT field.

    I mapped rules

    T02_CLIENTDATA-STD_DESCR MOVE (S_MARA-NORMT)

    T03_CLIENTDATAX – STD_DESCR SET_X_IF_NOT_INIT (S_MARA-NORMT)

    and activated changes.

    Then, in Migration Cokpit, when I download template, I can see that the file structure has been adjusted automatically – new field S_MARA-NORMT appears on “Field List” and “Basic data” sheets.

    However, when I try to upload data from the migration file (filled with data, of course), I receive message “No data available”.

     

    Could you please suggest possible solution?

    Thank you,

    Monika

    (0) 
    1. Jörg Knaus Post author

      hi monica

      glad to hear you like this

      for me this works as described, your description looks ok to me

      what is the field type/lenght of your Field?

      sometimes i had problems with fields filled with space instead of ‘null’ (maybe somewhere in your structure), so when uploading the columns got confused, see also my other blog for LTMC

      to find out where the problem comes from:

      download a new template, enter values (only one line) material number, language key, text, industry sector, material type, material group, base unit of measure and your NORMT Field while you always go to next column with Tab (no copy paste of ranges etc)

      if you upload this it should work

       

       

      (0) 
  5. adarsha Yellenki

    Hi Jorg,

    We are facing issue while enhancing the Migration of Vendors object using LTMOM with S/4HANA 1610 package 2, by adding new structure for VAT at source structure, fields added are Country and VAT registration number and mapped structures.

    In target structure _R_IT_SUP_GENERAL_VAT-CVI field, assigned rule using defined SET_RUN_ID for increment. after creating rule, tried generate the Object, which is ending with 3 errors as below

    checked the FM ‘/1LT/LM16300000000000157FI4’ which has error at Perform statement _RULE_SET_RUN_ID_S has only with 4 parameters passed with missing returning parameter.

    tried edit and add the returning parameter at 5191 in above FM is removing the syntax error, but actual object is giving error, hence we are not able to upload data using LTMC for Vendors.

    Could you please help us in finding, why Generate Runtime Object is replacing the code without Exporting parameter as RUN_ID at perform statment in above FM.

    Regards,

    Adarsha Yellenki

    (1) 
    1. Jörg Knaus Post author

      SAP has started to deliver correction for LTMC and LTMOM

      Komponente CA-LT-MC

      (expert search https://launchpad.support.sap.com/#/mynotes?tab=Search)

      maybe this one helps:

      2453118           2          S/4 HANA OP 1610 FPS02 – Creation of Rules within LTMOM fails

       

      other interesting notes:

      2376533 – Migration Cockpit & SLT on S/4 HANA On-Premise Edition 1610

      2486472 – S/4HANA 1610 FPS02 – Syntax error during generation of runtime modules

      2498738   Migration – RABAX_STATE Termination in Migration Cockpit

      2489225 – How to handle same data from different clients in the migration object

      2487822 – How to manually activate a migration object

       

      (0) 
  6. Nitish Dhingra

    Hi Jorg

     

    Firstly many thanks for this blog, it is really helpful.

     

    So I tried getting my hands dirty on using this new tool. I didn’t see any out of the box template for GL Account creation, so started with it as it’s one of the simplest conversion object. I used function module GL_ACCT_MASTER_SAVE. Went through my learning curve, got stuck with hardcoding fixed values, read through the comments and learned that it’s a bug. Then implemented the relevant note and tried to generate the runtime object again.

     

    I am getting a new kind of error now –

    Would you know why this would be happening ?

     

    Thanks

    Nitish

    (0) 
    1. Nitish Dhingra

       

      I figured out the error, it was due to not defining the foreign keys.

      Now struggling to generate a view of the source structure as I cannot download the template from LTMC.

       

      Thanks

      Nitish

      (0) 
        1. Nitish Dhingra

          I get the following error when I try to download the template using LTMC –

           

          Despite having generated “Customer 1” View in LTMOM. Don’t know if its a system thing or I am missing something.

          (0) 
  7. Nihad Catak

    Hi Jörg,

    thank you for the blog. It’s great!

    The ‘new’ LTMOM with FPS2 is great and after all the corrections it’s working fine.

    The only problem is that the LTMC is not working with own objects and it is not giving me any errors when migrating own objects.

    Same problem as Monica described in her post – ‘No data available’.

     

    But my main question is: can I use transaction MWB instead of LTMC?

    To me, MWB looks more detailed and is a combnation of LTMOM and LTMC.

    When I download the tepmplate file via MWB, edit the file with my data and go through the migration steps, it works.

     

    Can you please help.

     

    Thanks

    Nihad

     

     

    (0) 
    1. Nitish Dhingra

      Hi Jeff

       

      The option to import/export is available in 1610 FPS02. You seem to be on a previous 1610 stack. Once you upgrade, you will have the option on the same screen as follows –

       

      (0) 
  8. Christopher Curtis

    Hi Jorg,

    I’m creating a custom LTMOM object to create Sales Contracts using BAPI_CONTRACT_CREATEFROMDATA . I have mapped the 3 main structures (Header, Item, and Partners) and the FM is generated successfully:

    My issue is when I run the object via LTMC, the FM does not seem to get called.  I have put break points in the generated FM as well as the BAPI, and none of the breakpoints are hit.  I do not get any messaging in LTMC:

     

    Any suggestions?

     

    Thanks,

    C.Curtis

     

    (0) 
    1. Juergen Sattler

      Hi Christopher.

      I had the same issue and my best guess at the moment is that there are some issues within LTMOM when creating a new object from scratch.

      One problem you might have noticed was a missing function when you generate (there should be at least four):

      • SS4ACS (this one was missing)
      • SS4IL
      • SS4OLC
      • SS4OLO

      To get the missing function I had to manual update tables in the background for given MO:

      • Table DMC_COBJ field SOURCE = M
      • Table DMC_CNTN field READING_TYPE = 6
      • Table DMC_MT_TABLES field TABCLASS = TRANSP

      Afterwards regenerate the function group. And try again via LTMC.

      Also keep an eye out for messages in the application log SLG1. I’ve found messages there that are not in LTMC web site.

      I hope that helps.
      Juergen

       

      (1) 
      1. Christopher Curtis

        Hi Juergen,

         

        Thank you very much for the information.  I did notice that the …SS4ACS include program/function was missing in the generated code. In searching for information on LTMC/LTMOM – I had found info regarding tables DMC_COBJ and DMC_MT_TABLES and had made those updates to the entries.  I did not know about DMC_CNTN – and now that I’ve updated that info – it seems to have worked!! Thanks you very much…..appreciate the help.

        One thing I will mention – is after re-generating the function group, be sure to exit out completely of LTMC….then call LTMC again to ensure you are accessing the latest version.

        Thanks again for the help.  🙂

         

        Chris Curtis

        (0) 
  9. Diego Jauregui

    Hi all, I have another question, we try to create a BP as vendor and also as customer, for this scenario we use external number, the verdor is created and the BP, but when we tried to create the customer, the message displayed is the BP A000000003 already exist, the idea of this proyecto is to create the BP with the customer and vendor role, Does anybody knows how to proceed?

    (0) 
    1. Nitish Dhingra

       

      Hi Diego

       

      The standard objects first creates a BP then adds relevant BP roles and then adds customer sales area and company code details. Since in your case the BP is already created, the system is giving an error. You can create a custom object by copying the standard customer object and remove the BP creation blocks in the used function module(RFC_CVI_EI_INBOUND_MAIN). Also ensure that you add a column for the BP number in your source gathering template and supply the BP number which got created with vendor creation. Also ensure that your program add’s the relevant roles to BP when creating customer master.

       

      Thanks

      Nitish

      (0) 
  10. Atul Khavenekar

     

    Hi Jorg,

    I’m creating a custom LTMOM object to create Asset Master using BAPI_FIXEDASSET_CREATE1 . I have mapped the main structures (Header, Item, and its fieldds) and the FM is generated successfully:

    issue here when we run the object via LTMC, the FM does not seem to get called.  I have put break points in the generated FM as well as the BAPI, and none of the breakpoints are hit.  I do not get any messaging in LTMC:

     

    And also we have an error in migration object Notifications tab that Migration object Z_ASSET_UPLOAD_00T is not assigned to mass transfer 00T, though it was assigned while creating the project itself.

     

    Please suggest.

     

    Thanks,

    Kishore

     

     

     

     

    (0) 
  11. Delon Ndlovu

    Hello Jörg

    I have created an custom object using LTMOM (Migration Cockpit Modeller) for Projects. I am using Bapi BAPI_PROJECTDEF_CREATE.

    I have done all the required mapping on the Modeller, but when activate the object on LTMC (Migration Cockpit) it goes through all the steps but when I click finish on the final step. It goes back to the object initial page with status Not started (Active).

    Am I missing something?

     

     

     

    (0) 

Leave a Reply