You can load inventory quantity and value for materials in S/4HANA 2020 using IDoc Type MBGMCR04.
Yes, SAP S/4HANA Migration Cockpit is the “recommended by SAP” tool for loading data in S/4HANA. But there are exceptions to its efficacy. For example, IDoc type MBGMCR is exactly how it’s done in SAP Rapid Data Migration with SAP Data Services (On Premise), Migration Inventory Balances (W38).
If you’re not using SAP Data Services then Legacy System Migration Workbench (LSMW) is also relevant, using exactly the same IDoc approach that SAP delivers with Rapid Data Migration. What’s more, LSMW (more precisely, IDocs) remains essential for data migration in SAP Retail. For confirmation of necessity, see SAP Note 2538170 – Migration of Retail Objects to SAP S/4HANA on-premise.
MDA Workbench is a free and simple tool for creating such LSMW projects, and for creating a comprehensive kit of deliverables for data migration.
Let’s have a look, using data migration of inventory quantity and value for material as an example.
MDA Workbench can be downloaded here, and the MDA Workbench project file for this example can be downloaded here. With these, you can easily reproduce the data migration deliverables outlined in this article.
But the deliverables are useful, as is, without MDA Workbench! That’s the point. This is an example of creating functional and technical data migration content that’s reusable, and it’s been unit tested in S/4HANA 1909.
The beauty of having an MDA Workbench Project File (data migration content) is that it supports reusability (from project to project) and so easily accommodates changes in requirements. After all, data migration is an iterative process!
Either way and any way, as requirements change, you open the project file, make changes to the selected segments and fields, maintain sample data, and Publish an up-to-date kit of functional and technical deliverables.
Choose the relevant IDoc Segments and Fields, maintain sample data, and then click the Publish button in MDA Workbench.
Here’s a link to a Zip file named MDA_MATINV.ZIP with the Kit of Deliverables created by MDA Workbench. There are five files in the Zip file.
MDA_MATINV_20201019-164020.MDAWB is a project file that can be opened with MDA Workbench.
MDA_MATINV_20201019-164020.XLSX is the beautiful field-level mapping workbook created by MDA Workbench.
MDA_MATINV_LSMW_P
ROJECT_02_20201019-164020.TXT is the LSMW project created by MDA Workbench.
MDA_MATINV_SQL_20201019-164020.TXT is a database script created by MDA Workbench.
MDA_MATINV01_DATA_20201019-164020.TXT is the sample data file created by MDA Workbench.
Let’s look at the relevant IDoc segments and fields. This data migration object is really simple, with very few inputs.
Segment E1MBGMCR – Header Segment
Segment E1BP2017_GM_HEAD_01 – BAPI Communication Structure: Material Document Header Data
Segment E1BP2017_GM_CODE – MMIM: New Key Assignment GM_CODE to Transaction of Inv. Mgmt
Segment E1BP2017_GM_ITEM_CREATE – BAPI Communication Structure: Create Material Document Item
Yes, SAP S/4HANA Migration Cockpit is the “recommended by SAP” tool for loading data in S/4HANA. But there are exceptions to its efficacy. For example, IDoc type MBGMCR is exactly how it’s done in SAP Rapid Data Migration with SAP Data Services (On Premise), Migration Inventory Balances (W38).
If you’re not using SAP Data Services then Legacy System Migration Workbench (LSMW) is also relevant, using exactly the same IDoc approach that SAP delivers with Rapid Data Migration. What’s more, LSMW (more precisely, IDocs) remains essential for data migration in SAP Retail. For confirmation of necessity, see SAP Note 2538170 – Migration of Retail Objects to SAP S/4HANA on-premise.
MDA Workbench is a free and simple tool for creating such LSMW projects, and for creating a comprehensive kit of deliverables for data migration.
Let’s have a look, using data migration of inventory quantity and value for material as an example.
MDA Workbench can be downloaded here, and the MDA Workbench project file for this example can be downloaded here. With these, you can easily reproduce the data migration deliverables outlined in this article.
But the deliverables are useful, as is, without MDA Workbench! That’s the point. This is an example of creating functional and technical data migration content that’s reusable, and it’s been unit tested in S/4HANA 1909.
MDA Workbench Creates a Kit of Deliverables
The beauty of having an MDA Workbench Project File (data migration content) is that it supports reusability (from project to project) and so easily accommodates changes in requirements. After all, data migration is an iterative process!
Either way and any way, as requirements change, you open the project file, make changes to the selected segments and fields, maintain sample data, and Publish an up-to-date kit of functional and technical deliverables.
Choose the relevant IDoc Segments and Fields, maintain sample data, and then click the Publish button in MDA Workbench.
MDA Workbench: Choose IDoc segments and fields. Then click Publish
MDA Workbench: Maintain Sample Data for Unit Testing
Here’s a link to a Zip file named MDA_MATINV.ZIP with the Kit of Deliverables created by MDA Workbench. There are five files in the Zip file.
MDA_MATINV_20201019-164020.MDAWB is a project file that can be opened with MDA Workbench.
- It was saved as a backup when I clicked the Publish button in MDA Workbench, together with the 4 other files.
- You can open this file, adjust it if needed, and click the Publish button in MDA Workbench to produce a new Kit of Deliverables.
MDA_MATINV_20201019-164020.XLSX is the beautiful field-level mapping workbook created by MDA Workbench.
- Worksheet SAP FIELD MAP includes IDoc field-level details, including SAP Help Text for data elements. It defines the field-level mapping into the IDoc.
- Worksheet MDA_MATINV01_DATA includes sample data (maintained in MDA Workbench) for the Load Ready File to be used as input for unit testing the LSMW Project.
MDA_MATINV_LSMW_P
ROJECT_02_20201019-164020.TXT is the LSMW project created by MDA Workbench.
- This LSMW project was tested in S/4HANA 1909.
- Import the LSMW Project into your SAP system and it’s ready to run!
MDA_MATINV_SQL_20201019-164020.TXT is a database script created by MDA Workbench.
- If you’re using a staging database (e.g. SQL Server, Oracle, DB2, etc.) to prepare Load-Ready Files for data migration, then this script can be used to create the staging database table.
MDA_MATINV01_DATA_20201019-164020.TXT is the sample data file created by MDA Workbench.
- This is the Load-Ready File with data used to test the LSMW Project.
- It’s the same data as found in the field-level mapping workbook, Worksheet MDA_MATINV01_DATA.
Load Inventory Balance using MBGMCR04
Let’s look at the relevant IDoc segments and fields. This data migration object is really simple, with very few inputs.
Segment E1MBGMCR – Header Segment
Field Name | Field Description | Comment |
---|---|---|
TESTRUN | Switch to Simulation Session for Write BAPIs | Segment E1MBGMCR is mandatory and this is the only field in the segment. Be certain that it’s mapped with a blank value. |
Segment E1BP2017_GM_HEAD_01 – BAPI Communication Structure: Material Document Header Data
Field Name | Field Description | Comment |
---|---|---|
PSTNG_DATE | Posting Date in the Document | Entry must be 8 digits (YYYYMMDD). |
Segment E1BP2017_GM_CODE – MMIM: New Key Assignment GM_CODE to Transaction of Inv. Mgmt
Field Name | Field Description | Comment |
---|---|---|
GM_CODE | Assign code to transaction for BAPI goods movement | Expected Value: 06 01 – MB01 – Goods receipt for purchase order 02 – MB31 – Goods receipt for production order 03 – MB1A – Goods issue 04 – MB1B – Transfer posting 05 – MB1C – Other goods receipt 06 – MB11 – Reversal of goods movements 07 – MB04 – Subsequent adjustment with regard to a subcontract order |
Segment E1BP2017_GM_ITEM_CREATE – BAPI Communication Structure: Create Material Document Item
Field Name | Field Description | Comment |
---|---|---|
MATERIAL | Material Number (18 Characters) |