11.5 SAP S/4HANA Migration Object Modeler
In SAP S/4HANA, on-premise, editions, you can customize business processes according to your specific requirements better than in SAP S/4HANA Cloud. If the predefined migration objects in the SAP S/4HANA migration cockpit do not meet your technical requirements, you can use the SAP S/4HANA migration object modeler to adjust them. This tool is only available in SAP S/4HANA, on-premise. Fields that are missing in the target structure of the provided template, but still exist in the used default import interface, can be displayed using the migration object modeler.
Default APIs (BAPIs or function modules), released by SAP for SAP S/4HANA, are used to transfer data via the migration cockpit.
Some of these APIs, in particular BAPIs, include so-called function module documentation. You can access this documentation, which provides useful information on import structures and their fields, via the Function Builder (Transaction SE37).
Table 11.5 provides an overview of the APIs the migration cockpit uses for each migration object. To update data, some of these APIs require a chain of function module calls and are thus called using so-called wrapper function modules. In the “Wrapper” column in Table 11.5, the APIs that require being called via these wrapper function modules are indicated. In the “APIs Used” column, this wrapper function module is specified if using a complex call of multiple function modules is necessary.
Migration Object | APIs Used (BAPI or Function Module) | Wrapper |
---|---|---|
Activity type | BAPI_ACTTYPE_CREATEMULTIPLE | |
Cost center | BAPI_COSTCENTER_CREATEMULTIPLE | |
Activity price | BAPI_ACT_PRICE_CHECK_AND_POST | |
Internal order | BAPI_INTERNALORDER_CREATE | X |
Profit center | BAPI_PROFITCENTER_CREATE | X |
Bank | BAPI_BANK_CREATE | X |
Customer | RFC_CVI_EI_INBOUND_MAIN | |
Supplier | RFC_CVI_EI_INBOUND_MAIN | |
Accounts receivable (Customer) open item | BAPI_ACC_DOCUMENT_POST | X |
Accounts payable (Vendor) open item | BAPI_ACC_DOCUMENT_POST | X |
Fixed asset incl. Balances | BAPI_FIXEDASSET_OVRTAKE_CREATE | |
G/L account balance | BAPI_ACC_DOCUMENT_POST | X |
G/L account open item | BAPI_ACC_DOCUMENT_POST | X |
Exchange rate | BAPI_EXCHRATE_CREATEMULTIPLE | X |
Inventory balances | BAPI_GOODSMVT_CREATE | |
Material | BAPI_MATERIAL_SAVEREPLICA | |
Material – Long text | BAPI_MATERIAL_SAVEREPLICA | |
Material consumption | BAPI_MATERIAL_SAVEREPLICA | |
Purchasing info record | DMC_MIG_PURCH_INFO_RECORD | X |
Purchase order | BAPI_PO_CREATE1 | |
Contracts (Purchasing) | BAPI_CONTRACT_CREATE | |
Source list | DMC_MIG_SOURCE_LIST | X |
Sales order | BAPI_SALESORDER_CREATEFROMDAT2 total | |
Batch | BAPI_BATCH_SAVE_REPLICA | X |
Bill of material (BOM) | CSAP_MAT_BOM_MAINTAIN | X |
Work center | CRAP_WORKCENTER_CREATE | X |
Routing | BAPI_ROUTING_CREATE | |
Equipment | BAPI_EQUI_CREATE | X |
Maintenance task list | DMC_MIG_EAM_TASKLIST | X |
Functional location | BAPI_FUNCLOC_CREATE | X |
Characteristic | BAPI_CHARACT_CREATE | X |
Class | BAPI_CLASS_CREATE | X |
Table 11.5 APIs Used in the SAP S/4HANA Migration Cockpit for the Migration
You can call the SAP S/4HANA migration object modeler using Transaction LTMOM in SAP S/4HANA, on-premise. Because the modeler changes migration objects, you’ll first have to select the project containing the migration object that you want to modify, as shown in Figure 11.45.
Figure 11.45 Selecting the Project in the Migration Object Modeler
Then, you’ll select the migration object that you want to modify (as shown in Figure 11.46).
Figure 11.46 Selecting the Migration Object
The full range of modeler functions for this migration object is now available. As shown in Figure 11.47, the modeler consists of a selection area on the left and a workspace on the right.
Figure 11.47 SAP S/4HANA Migration Object Modeler Structure
The modeler has the following functions, which are divided into Activities and Advanced Activities. These functions can be selected in the left-hand selection area:
-
The following functions are listed in Activities:
- Edit Source Structures
- Display Target Structures
- Display Structure Mapping
- Edit Field Mapping
-
The migration objects provided by SAP can be, if required, adapted to your modified business processes in every release. If an object that you created and modified in an earlier release needs to be adapted after a release change, the system will prompt you to perform one of the following Advanced Activities:
- Prepare Migration Object For Update
- Update Migration Object
In addition, the Migration Object menu item and the functions in the application bar provide the following technical functions:
-
Generate Runtime Object
-
Display Generated Function Group
(You cannot select this function until a new function group has been generated.)
The following sections describe these functions in detail.
11.5.1 Edit Source Structures
The interface for transferring a migration object usually contains more structures and fields than SAP Best Practices covers. You can use the Edit Source Structures function to add missing fields to the migration template of an object. First, switch to the change mode by clicking the Display<->Change button in the application bar. Then, select the Edit Source Structures activity, which will take you to the view shown in Figure 11.48.
Figure 11.48 Edit Source Structures
You can edit the fields of a structure by double-clicking on the field in the structure tree in the central pane of the modeler. By navigating to Settings • Technical Names on/off, you can show or hide the technical names of the fields in the structure tree.
Above the field list, in the right-hand pane of the modeler, you can find the following three functions:
-
Add Field
-
Insert Field
-
Delete Field(s)
In our example, we added a new field, PSTKO (Post office bank current account number), to the source structure of the bank data that we previously used as sample data in Section 11.3. To add a new field, select the Add Field function and enter the desired values for field name, data type, field length, etc., into the new line, as shown in Figure 11.49.
Figure 11.49 Adding a Field to the Source Structure
Now, click on Save to save your changes. Your source structure now includes the new field.
You can use the Edit Source Structures function to modify the migration template view of any SAP S/4HANA, on-premise, edition. First, select the Display View function in the context menu of the source structure. You can now change the visibility of structures and fields of the already assigned views. The example shown in Figure 11.50 shows the source structure view Bank Master (S_BNKA) of the migration object for the bank master.
Figure 11.50 Modifying the Migration Template View
To assign a new view, select the view that you want to assign using the Assign View function , as shown in Figure 11.51.
You can change the visibility of structures and fields with the following values:
- Not Visible: The field or structure will not be visible in the migration template. However, hidden structures and fields may cause the data import to be terminated with an error.
- Visible: The field or structure is visible in the migration template and can be populated.
-
Required: The structure or field is mandatory and needs to be populated.
Figure 11.51 Selecting the View to Be Assigned
Then, press (Enter) to activate the Save button in the system function bar. Click on the Save button to save your changes.
11.5.2 Display Target Structures
The Display Target Structures function displays all fields and structures of the function module used to transfer the data of the migration object. On the right (as shown in Figure 11.52), you can have the system display the fields of the target structure by double-clicking on the desired structure or field. Alternatively, you can use the Display Structure entry in the context menu.
The root node includes the name of the function module used for the data transfer. As shown in Figure 11.52, we are using the DMC_MIG_BANK function module, which is a wrapper function module that wraps and calls the BAPI_BANK_CREATE function module, as mentioned in Table 11.5.
Figure 11.52 Display Target Structure
11.5.3 Display Structure Mapping
The Display Structure Mapping activity displays the mapping of the source structures (right area of the screen) to the target structures (left area of the screen). You can view the assigned source structures in the left area next to the target structures. After the name of the target structure, separated by <<, the system displays all source structures assigned to this structure. Figure 11.53 shows an example of a bank master migration object (Bank Master).
Figure 11.53 Display Structure Mapping
11.5.4 Edit Field Mapping
In Edit Field Mapping, you can drag and drop so-called customer fields, which you assigned to the source structure previously in Section 11.5.1, to an unassigned field in the target structure on the right. (The unassigned field is marked by a red circle with a white cross .) See Figure 11.54.
Figure 11.54 Edit Field Mapping
If the field definitions of the customer fields and the target structure differ, the system shows a dialog box indicating this conflict and asks whether you really want to implement this field assignment. A MOVE rule that specifies a 1:1 mapping is defined for the assignment. Thus, the values to be migrated to this new field must be written in the migration template file in the appropriate target format and cannot be converted in the migration cockpit using validation rules. The result of such an assignment is shown in Figure 11.55.
Figure 11.55 Modeler: Assigned Customer Field
Save your changes by clicking the Save button in the system function bar.
11.5.5 Technical Functions
You can use the technical function Generate Runtime Object in the application bar to generate a local function module for the Migration Workbench (MWB) to use in the background for the migration cockpit. This newly generated function module is required after the source structures or fields have been mapped because the fields will not be processed otherwise.
You can use the Display Generated Function Group function to view the entire function group of the newly generated function module in the application bar. The ABAP Editor then displays the function group, as shown in Figure 11.56.
Figure 11.56 Display Generated Function Group
11.5.6 Advanced Activities
You can only perform the Prepare Migration Object for Update step if an update from SAP affects your modified customer migration objects. If you try to start such a migration object using the migration cockpit, the system will display a message indicating that the migration object contains modifications, and you’ll have to perform the Prepare Migration Object for Update activity to validate this object before the object can be updated with the new migration object content provided by SAP.
The system will only display this activity if you have changed the field mapping. These changes or modifications will be deleted after you’ve carried out the Prepare Migration Object for Update activity. You should therefore save all modifications that you want to continue to use.
If you have not modified the field mapping, you can simply carry out the Update Migration Object activity, which copies all changes to the migration content provided by SAP.
[»] SAP S/4HANA Migration Object Modeler Help
You can access the SAP S/4HANA migration object modeler help if you choose the Info function in the application bar.