Migrating Material Master into SAP

Harlex Consulting Services Ltd -BMMH1-BSTFE             Fixed lot
Migrating Material Master into SAPsize          -Not always used – depends
1          Overviewon Lot Size
1. 1.1        IntroductionBMMH1-MABST            Maximum stock
This document is intended as a simple guide in howlevel
to overcome the common problems in migratingBMMH1-BESKZ            Procurement type-If
Material Master into SAP.specified must exist in customizing
For a one-time conversion into SAP, we favour usingBMMH1-SOBSL            Special Procurement
the LSMW tool. It allows you to leverage the full-If specified must exist in customizing
power of ABAP while using standard SAP processingBMMH1-LGPRO            Production Storage
functions, yet it does a lot of the file managementLocation-If specified must exist in customizing
and processing work automatically. However, evenBMMH1-LGFSB Storage Location for External
within LSMW there are a number of possibleProcurement-If specified must exist in customizing
methods for migrating Materials.BMMH1-EISBE              Safety Stock
This document will discuss loading Materials using theAccounting data
standard load program RMDATIND with a briefBMMH1-BKLAS             Valuation Class-If
mention of other methods.specified must exist in customizing
1. 1.2        Load methodsBMMH1-STPRS Standard Price
1. 1.2.1     Standard load program RMDATINDBMMH1-PEINH              Price Unit
This is the approach I favour for the migration of theBMMH1-VPRSV            Price Control
Material Master into SAP.Costing data
The standard load program is not perfect but it isBMMH1-PRCTR Profit Centre-If specified must exist in
flexible and you do not have to be one hundred percustomizing
cent accurate with the population of fields, i.e. in BDCBMMH1-LOSGR            Costing Lot Size
a populated field that is not available in the currentBMMH1-NCOST            Do Not Cost
screen will cause a message to be raised, inForeign Trade data
RMDATIND we can specify the level at which toBMMH1-STAWN            Commodity
report errors and so are able to ‘skip’ theseCode-If specified must exist in customizing
messages.BMMH1-HERKL Country of Origin-If specified must
It is a powerful and flexible program, and it isexist in customizing
relatively simple to use. If you are unsure in certainBMMH1-HERKR            Region of Origin-If
situations (eg. a material with multiple plants and salesspecified must exist in customizing
organisations) as to how to manipulate your load fileTax data
in LSMW into the load format for RMDATIND, youBMMH2-ALAND            Tax Country-If
can manually create a test material in yourspecified must exist in customizing
development system and then run programBMMH2-TATY1              Tax type for
RMDATGEN on that material to view a sample file.Country (upto 9)-If specified must exist in
The fact that you can run the load step in test modecustomizing
before creating any data is also a major advantage.BMMH2-TAXM1 Tax Class for Tax Type-If specified
1. 1.2.2     BDC recording of transaction MM01must exist in customizing
This solution is only suitable for a very basic upload. IfDescription data
for example you are only creating the basic data or ifBMMH5-SPRAS            Language of
you want to go further, limit the recording to oneDescription-This must be in internal format, e.g.
material type as screen sequences can and usually do‘D’ for German
change between material types and this will causeBMMH5-MAKTX            Short Description-
problems in your BDC session. A BDC recording forBMMH5- SPRAS_ISO    Language in ISO
MM02 (Change) can be a quick way of updating onecode-Specify this as an alternative to SPRAS
or two fields for existing materials but again beAlternate Unit of Measure data
aware of the different screen sequences that mayBMMH6-MEINH             Alternate Unit of
appear.Measure-This must be in internal format
1. 1.2.3     BAPI – object type BUS1001006BMMH6-UMREN            Numerator-For
As always, the BAPI is a flexible and powerful toolstandard measurements these MUST be specified as
though often not particularly intuitive. Using LSMWper SAP.
you could load materials using the Standard MaterialBMMH6-UMREZ            Denominator-For
business object. This uses ALE message typestandard measurements these MUST be specified as
MATMAS_BAPI and BAPI functionper SAP.
BAPI_MATERIAL_SAVEDATA. We favour theLong Texts
standard load program RMDATIND as it is fast (directBMMH7-TDID                Text ID 
upload) and simple to use, and also because it can be            ‘GRUN’ = Basic text
run in test mode.‘BEST’ = Purchasing text
1. 1.3        Assumptions‘0001’ = Sales text
This document assumes a working knowledge of‘PRUE’ = Inspection text
LSMW, and at least some basic understanding of the‘IVER’ = Internal comment
structure of Material data in SAP.‘LTXT’ = Material memo
2          The BasicsBMMH7-TDSPRAS        Language key
1. 2.1        Data structuresBMMH7-TDLINE            Text line
There are multiple structures in the Material MasterBMMH7-TDSPRASISO  Language in ISO code  
load program RMDATIND, below are listed thoseSpecify this as an alternative to SPRAS
commonly used:1. 2.3        Modifying the standard structures
1. 2.1.1     BMM00It is possible to upload customer specific fields with
This structure is mandatory and contains the keyRMDATIND. You will need to create/modify the
information used in creating a Material.structures, usually ZMMH1 and CI_MMH1, if additional
1. 2.1.2     BMMH1fields have been added to a SAP table or the field(s)
This structure is mandatory and contains most of theyou require are not currently available in RMDATIND.
remaining data needed to create a Material, e.g.For full details please see OSS note 44410.
Description, Basic Unit of Measure, Legacy Material3          Common Problems
Number, plus Purchasing data, Plant data etc.1. 3.1        Legacy Material Number
1. 2.1.3     BMMH2It is crucial when migrating Materials into SAP that a
This structure is used when more than one taxreference to the Legacy number be stored.
country is required for Sales.It is important both for business and technical
1. 2.1.4     BMMH5reasons; business users will initially want to be able to
This structure is used when the material shortfind materials based on the legacy code, it is the one
description is required in more than one language.they know; technical users will need the link such that
1. 2.1.5     BMMH6subsequent objects can be successfully loaded, e.g.
This structure is used to populate alternate units ofopen purchase orders, Inventory load.
measure as required by the business, e.g. PurchasingThe intended and normally used field for this purpose
buy a product in Cases but Sales sell in Pieces, theseis BISMT but note that some materials are duplicates
conversion factors between the different units needof one another and this cannot be handled solely by
to be captured here.using BISMT.
1. 2.1.6     BMMH7As mentioned it will be necessary to retrieve the
This structure is used to populate long texts for theSAP material for not only subsequent objects but
material, e.g. Sales text, Purchasing text, Longalso to ensure duplicate materials are not created
Description, etc.within SAP. It is therefore recommended to create a
1. 2.2        Important fieldsroutine that can be called by all the required
Structure           Field     Fieldprograms; we suggest GET_SAP_MATNR.
Name       Details1. 3.2        Duplicate Materials
Key FieldsThe existence of duplicate master data is often a
BMM00-MATNR Material Number-Can be eitherproblem when migrating data from legacy systems. It
Internal or Externalwill normally be required to setup a simple translation
BMM00-MTART Material Type-Mandatorytable in LSMW to handle duplicate material master
BMM00-MBRSH            Industryrecords.
Sector-MandatoryThis translation will need to be accessed in the above
BMM00-WERKS            Plantmentioned GET_SAP_MATNR routine to ensure the
BMM00-LGORT Storage Locationcorrect SAP material number is returned.
BMM00-VKORG            Sales Organisation1. 3.3        Alpha conversion
BMM00-VTWEG            Sales DistributionWhen loading materials (or any object) it is good
Channelpractice to validate customised fields and the master
BMM00-TCODE SAP transaction-MM01 for creation,data itself. To this end you should always be aware
MM02 for Changeof the format of the data as stored within the
Basic Datadatabase, e.g. It is possible to pass ‘123456’
BMMH1-MAKTX            Shortas the MATNR but to check if that material all ready
Description-Mandatory fieldexists you will need to pass it as 18 characters with
BMMH1-MEINS             Base Unit ofthe leading zeroes as this is how it is stored in the
Measure-Mandatory fielddatabase tables.
BMMH1-MATKL Material Group-Usually mandatory1. 3.4        Taxes
BMMH1-BISMT              LegacyIn multi-country organisations it can often be the
Material-Usually mandatory for migrationcase that Taxes are required for multiple countries.
BMMH1-MTPOS_MARA General Item Category GroupThe way to determine which countries is to call
BMMH1-PRDHA            General Productfunction STEUERTAB_IDENTIFY. You will still need to
Hierarchy-know which Tax Class to use for each Tax type.
Purchasing Data1. 3.5        Multiple Plants
BMMH1-EKGRP            Purchasing GroupIt is normal for a material to exist in more than one
BMMH1-PLIFZ               Planned deliveryplant and a common error is to try to re-populate the
time-Also appears in MRPsales data at the same time, which results in a
BMMH1-WEBAZ            GR processing timemessage that can be mis-leading. When creating a
BMMH1-BSTME            Purchasing Unit ofmaterial in more than one plant for which both plants
Measure (Only if purchasing unit <> base unit)exist in the same sales area reset BMM00-VKORG
Sales dataand BMM00-VTWEG to the ‘NODATA’ flag,
BMMH1-SPART Division-Also appears in Basic Datadefault ‘/’.
BMMH1-VRKME            Sales Unit of1. 3.6        Units of Measure
Measure-Only used if Material sold in a unit differentYou should only specify the BMMH1 alternate units,
to the base unite.g. Purchasing unit, Issuing Unit, if they differ from
BMMH1-DWERK           Delivering plantthe base unit otherwise an error will be flagged. Once
BMMH1-KTGRM            Accountan alternate is specified structure BMMH6 must be
Assignment Groupcreated for each alternate.
BMMH1-KONDM           Material PricingN.B. the values specifies in UMREN and UMREZ must
Group-If specified must exist in customizingbe accurate, no automatic correction takes place in
BMMH1-PRODH            Sales Area Productdirect-input mode unlike online mode.
Hierarchy-If specified must exist in customizing1. 3.7        Background Load
BMMH1-MTPOS            Item CategoryFor high volume loads it is usual to submit the load in
Group-If specified must exist in customizingbackground. To do this it is required to setup a job
BMMH1-VERSG            Material Statisticsvia BMV0 and submit via the same transaction. A
Group-If specified must exist in customizingtypical error comes during the production load as
BMMH1-MTVFP            Availabilitymultiple processors are usually present and the job is
Check-Also in MRP. If specified must exist inrouted to the ‘background’ processor but
customizingthe input file for RMDATIND has been created on
MRP datathe ‘dialog’ processor; the key is to either
BMMH1-DISPO             MRP Controller-Ifspecify the ‘dialog’ processor on which the
specified must exist in customizingfile is converted at the job submit phase or perform
BMMH1-DISMM            MRP Type-Ifthe import and convert phases on the
specified must exist in customizing‘background’ processor.
BMMH1-DISLS              Lot size-If4          Footnote
specified must exist in customizingThis guide should be viewed as a starting point for
BMMH1-BSTMI              Minimum lotdiscussions and is not intended as an exhaustive
size-Not always used – depends on Lot Sizeexamination of the various methods available. There
BMMH1-BSTMA            Maximum lotwill inevitably be circumstances specific to individual
size        -Not always used – depends onsituations that cannot be covered here.
Lot Size