You are on page 1of 9

harlex ltd

Specialists in SAP Data Migration

www.harlex-ltd.com

Title:
Author: Keywords:

Migrating Material Master into SAP


Keith Peel, Harlex Consulting Services Ltd Material Master SAP Data Migration LSMW RMDATIND MM01 Standard Load Program

harlex ltd

Specialists in SAP Data Migration

www.harlex-ltd.com

Table of contents
1 Overview .............................................................................. 3
1.1 Introduction............................................................................................................................. 3 1.2 Load methods .......................................................................................................................... 3 1.2.1 Standard load program RMDATIND ..................................................................................... 3 1.2.2 BDC recording of transaction MM01 ................................................................................... 3 1.2.3 BAPI object type BUS1001006 .......................................................................................... 3 1.3 Assumptions............................................................................................................................. 3 2.1 Data structures........................................................................................................................ 4 2.1.1 BMM00 ................................................................................................................................. 4 2.1.2 BMMH1 ................................................................................................................................ 4 2.1.3 BMMH2 ................................................................................................................................ 4 2.1.4 BMMH5 ................................................................................................................................ 4 2.1.5 BMMH6 ................................................................................................................................ 4 2.1.6 BMMH7 ................................................................................................................................ 4 2.2 Important fields ...................................................................................................................... 4 2.3 Modifying the standard structures .......................................................................................... 6 3.1 3.2 3.3 3.4 3.5 3.6 3.7 Legacy Material Number ......................................................................................................... 7 Duplicate Materials ................................................................................................................. 7 Alpha conversion ..................................................................................................................... 7 Taxes ....................................................................................................................................... 7 Multiple Plants ........................................................................................................................ 7 Units of Measure ..................................................................................................................... 7 Background Load ..................................................................................................................... 7

2 The Basics ............................................................................ 4

3 Common Problems ............................................................... 7

4 Footnote .............................................................................. 9

harlex ltd
1 Overview

Specialists in SAP Data Migration

www.harlex-ltd.com

1.1 Introduction
This document is intended as a simple guide in how to overcome the common problems in migrating Material Master into SAP. For a one-time conversion into SAP, we favour using the LSMW tool. It allows you to leverage the full power of ABAP while using standard SAP processing functions, yet it does a lot of the file management and processing work automatically. However, even within LSMW there are a number of possible methods for migrating Materials. This document will discuss loading Materials using the standard load program RMDATIND with a brief mention of other methods.

1.2 Load methods


1.2.1 Standard load program RMDATIND
This is the approach I favour for the migration of the Material Master into SAP. The standard load program is not perfect but it is flexible and you do not have to be one hundred per cent accurate with the population of fields, i.e. in BDC a populated field that is not available in the current screen will cause a message to be raised, in RMDATIND we can specify the level at which to report errors and so are able to skip these messages. It is a powerful and flexible program, and it is relatively simple to use. If you are unsure in certain situations (eg. a material with multiple plants and sales organisations) as to how to manipulate your load file in LSMW into the load format for RMDATIND, you can manually create a test material in your development system and then run program RMDATGEN on that material to view a sample file. The fact that you can run the load step in test mode before creating any data is also a major advantage.

1.2.2 BDC recording of transaction MM01


This solution is only suitable for a very basic upload. If for example you are only creating the basic data or if you want to go further, limit the recording to one material type as screen sequences can and usually do change between material types and this will cause problems in your BDC session. A BDC recording for MM02 (Change) can be a quick way of updating one or two fields for existing materials but again be aware of the different screen sequences that may appear.

1.2.3 BAPI object type BUS1001006


As always, the BAPI is a flexible and powerful tool though often not particularly intuitive. Using LSMW you could load materials using the Standard Material business object. This uses ALE message type MATMAS_BAPI and BAPI function BAPI_MATERIAL_SAVEDATA. We favour the standard load program RMDATIND as it is fast (direct upload) and simple to use, and also because it can be run in test mode.

1.3 Assumptions
This document assumes a working knowledge of LSMW, and at least some basic understanding of the structure of Material data in SAP.

harlex ltd

Specialists in SAP Data Migration

www.harlex-ltd.com

2 The Basics
2.1 Data structures
There are multiple structures in the Material Master load program RMDATIND, below are listed those commonly used:

2.1.1 BMM00
This structure is mandatory and contains the key information used in creating a Material.

2.1.2 BMMH1
This structure is mandatory and contains most of the remaining data needed to create a Material, e.g. Description, Basic Unit of Measure, Legacy Material Number, plus Purchasing data, Plant data etc.

2.1.3 BMMH2
This structure is used when more than one tax country is required for Sales.

2.1.4 BMMH5
This structure is used when the material short description is required in more than one language.

2.1.5 BMMH6
This structure is used to populate alternate units of measure as required by the business, e.g. Purchasing buy a product in Cases but Sales sell in Pieces, these conversion factors between the different units need to be captured here.

2.1.6 BMMH7
This structure is used to populate long texts for the material, e.g. Sales text, Purchasing text, Long Description, etc.

2.2 Important fields


Structure Key Fields BMM00 BMM00 BMM00 BMM00 BMM00 BMM00 BMM00 BMM00 Basic Data BMMH1 BMMH1 BMMH1 BMMH1 BMMH1 BMMH1 MATNR MTART MBRSH WERKS LGORT VKORG VTWEG TCODE MAKTX MEINS MATKL BISMT MTPOS_MARA PRDHA Material Number Material Type Industry Sector Plant Storage Location Sales Organisation Sales Distribution Channel SAP transaction Short Description Base Unit of Measure Material Group Legacy Material General Item Category Group General Product Hierarchy Can be either Internal or External Mandatory Mandatory Field Field Name Details

MM01 for creation, MM02 for Change Mandatory field Mandatory field Usually mandatory Usually mandatory for migration

harlex ltd

Specialists in SAP Data Migration Purchasing Data BMMH1 EKGRP BMMH1 PLIFZ BMMH1 WEBAZ BMMH1 BSTME Sales data BMMH1 BMMH1 BMMH1 BMMH1 BMMH1 BMMH1 SPART VRKME DWERK KTGRM KONDM PRODH Division Sales Unit of Measure Delivering plant Account Assignment Group Material Pricing Group Sales Area Product Hierarchy Item Category Group

www.harlex-ltd.com

Purchasing Group Planned delivery time GR processing time Purchasing Unit of Measure

Also appears in MRP Only use if Material bought in a unit different to the base unit Also appears in Basic Data Only used if Material sold in a unit different to the base unit

BMMH1

MTPOS

BMMH1 BMMH1 MRP data BMMH1 BMMH1 BMMH1 BMMH1 BMMH1 BMMH1 BMMH1 BMMH1 BMMH1 BMMH1 BMMH1

VERSG MTVFP

Material Statistics Group Availability Check

If specified must exist in customizing This can differ from the general Product Hierarchy specified in basic data. If specified must exist in customizing This can differ from the General Item Category Group specified in basic data. If specified must exist in customizing If specified must exist in customizing Also appears in MRP. If specified must exist in customizing If specified must exist in customizing If specified must exist in customizing If specified must exist in customizing Not always used depends on Lot Size Not always used depends on Lot Size Not always used depends on Lot Size If specified must exist in customizing If specified must exist in customizing If specified must exist in customizing If specified must exist in customizing

DISPO DISMM DISLS BSTMI BSTMA BSTFE MABST BESKZ SOBSL LGPRO LGFSB

MRP Controller MRP Type Lot size Minimum lot size Maximum lot size Fixed lot size Maximum stock level Procurement type Special Procurement Production Storage Location Storage Location for External Procurement Safety Stock Valuation Class Standard Price Price Unit Price Control Profit Centre Costing Lot Size Do Not Cost Commodity Code Country of Origin Region of Origin Tax Country Tax type for Country (upto 9) Tax Class for Tax Type

BMMH1 EISBE Accounting data BMMH1 BMMH1 BMMH1 BMMH1 Costing data BMMH1 BKLAS STPRS PEINH VPRSV PRCTR

If specified must exist in customizing

If specified must exist in customizing

BMMH1 LOSGR BMMH1 NCOST Foreign Trade data BMMH1 STAWN BMMH1 BMMH1 Tax data BMMH2 HERKL HERKR ALAND

If specified must exist in customizing If specified must exist in customizing If specified must exist in customizing If specified must exist in customizing If specified must exist in customizing If specified must exist in customizing

BMMH2 TATY1 BMMH2 TAXM1 Description data

harlex ltd
BMMH5

Specialists in SAP Data Migration SPRAS Language of Description Short Description Language in ISO code Alternate Unit of Measure Numerator Denominator

www.harlex-ltd.com This must be in internal format, e.g. D for German Specify this as an alternative to SPRAS This must be in internal format For standard measurements these MUST be specified as per SAP. For standard measurements these MUST be specified as per SAP. GRUN = Basic text BEST = Purchasing text 0001 = Sales text PRUE = Inspection text IVER = Internal comment LTXT = Material memo

BMMH5 MAKTX BMMH5 SPRAS_ISO Alternate Unit of Measure data BMMH6 BMMH6 BMMH6 Long Texts BMMH7 TDID MEINH UMREN UMREZ

Text ID

BMMH7 BMMH7 BMMH7

TDSPRAS TDLINE TDSPRASISO

Language key Text line Language in ISO code

Specify this as an alternative to SPRAS

2.3 Modifying the standard structures


It is possible to upload customer specific fields with RMDATIND. You will need to create/modify the structures, usually ZMMH1 and CI_MMH1, if additional fields have been added to a SAP table or the field(s) you require are not currently available in RMDATIND. For full details please see OSS note 44410.

harlex ltd

Specialists in SAP Data Migration

www.harlex-ltd.com

3 Common Problems
3.1 Legacy Material Number
It is crucial when migrating Materials into SAP that a reference to the Legacy number be stored. It is important both for business and technical reasons; business users will initially want to be able to find materials based on the legacy code, it is the one they know; technical users will need the link such that subsequent objects can be successfully loaded, e.g. open purchase orders, Inventory load. The intended and normally used field for this purpose is BISMT but note that some materials are duplicates of one another and this cannot be handled solely by using BISMT. As mentioned it will be necessary to retrieve the SAP material for not only subsequent objects but also to ensure duplicate materials are not created within SAP. It is therefore recommended to create a routine that can be called by all the required programs; we suggest GET_SAP_MATNR.

3.2 Duplicate Materials


The existence of duplicate master data is often a problem when migrating data from legacy systems. It will normally be required to setup a simple translation table in LSMW to handle duplicate material master records. This translation will need to be accessed in the above mentioned GET_SAP_MATNR routine to ensure the correct SAP material number is returned.

3.3 Alpha conversion


When loading materials (or any object) it is good practice to validate customised fields and the master data itself. To this end you should always be aware of the format of the data as stored within the database, e.g. It is possible to pass 123456 as the MATNR but to check if that material all ready exists you will need to pass it as 18 characters with the leading zeroes as this is how it is stored in the database tables.

3.4 Taxes
In multi-country organisations it can often be the case that Taxes are required for multiple countries. The way to determine which countries is to call function STEUERTAB_IDENTIFY. You will still need to know which Tax Class to use for each Tax type.

3.5 Multiple Plants


It is normal for a material to exist in more than one plant and a common error is to try to re-populate the sales data at the same time, which results in a message that can be mis-leading. When creating a material in more than one plant for which both plants exist in the same sales area reset BMM00VKORG and BMM00-VTWEG to the NODATA flag, default /.

3.6 Units of Measure


You should only specify the BMMH1 alternate units, e.g. Purchasing unit, Issuing Unit, if they differ from the base unit otherwise an error will be flagged. Once an alternate is specified structure BMMH6 must be created for each alternate. N.B. the values specifies in UMREN and UMREZ must be accurate, no automatic correction takes place in direct-input mode unlike online mode.

3.7 Background Load


For high volume loads it is usual to submit the load in background. To do this it is required to setup a job via BMV0 and submit via the same transaction. A typical error comes during the production load as multiple processors are usually present and the job is routed to the background processor but the

harlex ltd

Specialists in SAP Data Migration

www.harlex-ltd.com

input file for RMDATIND has been created on the dialog processor; the key is to either specify the dialog processor on which the file is converted at the job submit phase or perform the import and convert phases on the background processor.

harlex ltd
4 Footnote

Specialists in SAP Data Migration

www.harlex-ltd.com

This guide should be viewed as a starting point for discussions and is not intended as an exhaustive examination of the various methods available. There will inevitably be circumstances specific to individual situations that cannot be covered here. For further information on the migration of materials into SAP or indeed on any data conversion topic, please contact Harlex Consulting Services Ltd at info@harlex-ltd.com.

You might also like