Crash Course

Part 7: Migrating MDM Configuration

MDM projects that implement a custom data model, or extensions to the standard models, will need to include a site-specific strategy to document and migrate changes.

  1. The data model for a repository can be exported from the console as a complete schema and selected changes then imported into a target repository. This feature, delivered with SP4, is the only way to reliably transport incremental changes to your MDM data model.

  2. Validation Expressions and MDM security configuration are two areas of custom configuration that cannot be migrated from the console. These will need to be manually re-applied to the target repository.

  3. Maps saved via the Import Manager and via the Syndicator can be saved to the file system and migrated with relative ease into the target repository. This requires the source and target tables be absolutely identical.

  4. MDM does not currently provide a physical report that documents the meta model -- the metadata for the model, validation expressions, security, port configuration, etc. The Java API however completely exposes the meta model, with the exception of expressions. The following specification can get you started on building your own MDM meta model report.

MDM API Objects



Connect to MDM Catalog using the Server + Port + Login + Password

    Requires Free Membership to View

List Tables and Fields:
Open output File1 (.csv)
Get All Catalog Tables
If Lookup, Main or Expressions Table Types
For each Table, Get Fields
For each Field, Get Type and Information
Format and Write Each Field's properties (comma delimited)
Close output File1
List Expressions and properties:
Open output File2 (.csv)
Define a Result Set for the MDM Validations Table
Get all fields for the MDM Validations Table
Add all fields to the Result Set Definition
Define a Search on the MDM Validations Table
Execute the Search with no parameters and retrieve the Result Set
For each record in the Result Set
Get the fields in the record
Format and Write the Field Values (comma delimited)
Close output File2
Disconnect from MDM Catalog

Sample Code for Table/Field report

/* Display MDM Tables, Table Types and Fields
String delimiter = ",";

private void displayAllCatalogTables(CMTableInfoArray tableInfos) 
throws StringException, IOException
   String fileName = filepath + "My_MDM_Tables" + ".csv";
   BufferedWriter outputFile = new BufferedWriter(new FileWriter(fileName, true));
   // Report Header Line
   "Table Name" + delimiter + 
   "Table Type" + delimiter + 
   "MDM Field Name" + delimiter + 
   "Field Position" + delimiter + 
   "Field Type" + delimiter + 
   "Width" + delimiter + 
   "Required" + delimiter + 
   "Qualifier" + delimiter + 
   "Multi-Valued" + delimiter + 
   "Multilingual" + delimiter +  
   "Display Field" + delimiter + 
   "Searchable" + delimiter + 
   "Calculated" + delimiter + 
   "Calculation" + delimiter +  
   "Boolean: True/False/Default Values" + delimiter + 
   "Lookup Table" + delimiter + 
   "Writable Once" );

 A2iIntArray displayFieldIDs = new A2iIntArray();
 for (int i = 0; i < tableInfos.GetSize(); i++) {
 CMTableInfo tableInfo = (CMTableInfo) tableInfos.GetAt(i);
 // Only display selected table types
 if (CMTableType.FlatTable == tableInfo.GetType()
 || CMTableType.MainTable == tableInfo.GetType()
 || CMTableType.QualFlatTable == tableInfo.GetType()
 || CMTableType.HierTable == tableInfo.GetType()
 || CMTableType.HierAttrTable == tableInfo.GetType()
 || CMTableType.ExpressionsTable == tableInfo.GetType()) {
  outputFile.write(displayTableStructure(tableInfo.GetName(), displayFieldIDs, tableInfo));

/* Display all of the fields in the table, and their MDM data types
private String displayTableStructure
  (String oneTable, A2iIntArray displayFieldIDs, CMTableInfo tableInfo) 
throws StringException 
String oneFieldTypeString = "";
String returnVal = "";

int tableID = tableInfo.GetID();
CMFieldInfoArray fieldInfoArray = catalogData.GetFields( tableID );
boolean isDisplayField = false;
for (int i=0; i < fieldInfoArray.GetSize(); i++)
 CMFieldInfo fieldInfo = fieldInfoArray.GetCMFieldInfoAt(i);
 int fieldType = fieldInfo.GetType();
 // Table Name and Type
 String tableTypeString = "";
 case 0:
  tableTypeString = "Main";
 case 1:
  tableTypeString = "Lookup Flat";
 case 2:
  tableTypeString = "Validation Groups";
 case 4:
  tableTypeString = "Taxonomy";
 case 22:
  tableTypeString = "Qualified Flat";
 case 31:
  tableTypeString = "Expressions";
 oneFieldTypeString = oneTable + delimiter + tableTypeString; 
 // Field Name
 oneFieldTypeString = oneFieldTypeString + delimiter + fieldInfo.GetName();
 // Field Position
 oneFieldTypeString = oneFieldTypeString + delimiter + Integer.toString
 // Field Type
 oneFieldTypeString = oneFieldTypeString + delimiter + CMFieldType.GetName
 // Text Width
 String textWidth = "";
 if (fieldInfo.GetFixedTextWidth() != -1)
  textWidth = Integer.toString(fieldInfo.GetFixedTextWidth());
 oneFieldTypeString = oneFieldTypeString + delimiter + textWidth;
 // Required
 oneFieldTypeString = booleanToString(oneFieldTypeString, fieldInfo.m_isRequired);  
 oneFieldTypeString = booleanToString(oneFieldTypeString, fieldInfo.GetAssociationType() 
                      == FieldAssociationType.QualifierField);
 // Multi-Valued
 oneFieldTypeString = booleanToString(oneFieldTypeString, fieldInfo.IsMultiValue());
 // MultiLingual
 oneFieldTypeString = booleanToString(oneFieldTypeString, fieldInfo.IsMultiLingual()); 
 //Display Field
 isDisplayField = false;
 for (int j=0; j < displayFieldIDs.GetCount(); j++) {
  if (displayFieldIDs.GetAt(j) == fieldInfo.GetID()){
   isDisplayField = true;
 oneFieldTypeString = booleanToString(oneFieldTypeString, isDisplayField);
 // Searchable
 oneFieldTypeString = booleanToString(oneFieldTypeString, fieldInfo.IsSearchable());
 // Calculated
 oneFieldTypeString = booleanToString(oneFieldTypeString, fieldInfo.IsCalculated());
 // Calculation: TODO Extract expression when available in API
 if (fieldInfo.IsCalculated())
  oneFieldTypeString = oneFieldTypeString + delimiter + "<View in Console>"; 
  oneFieldTypeString = oneFieldTypeString + delimiter + ""; 
 // Boolean: True Value, False Value, Default Value
 String trueValue = "";
 String falseValue = "";
 String defaultValue = "";
 String boolValues = "";
 if (fieldType == CMFieldType.BoolField)
  trueValue = fieldInfo.GetTrueString();
  falseValue = fieldInfo.GetFalseString();
  if (fieldInfo.GetDefaultBoolValue())
   defaultValue = trueValue;
   defaultValue = falseValue;
  boolValues = trueValue + "/" + falseValue + "/" + defaultValue;
 oneFieldTypeString = oneFieldTypeString + delimiter + boolValues;
 // Lookup or Multi-Valued
 String lookupTableName = "";
 if (fieldInfo.IsLookup() || fieldInfo.IsMultiValue())
  lookupTableName = catalogData.GetTable(fieldInfo.GetLookupTableID()).GetName();
 oneFieldTypeString = oneFieldTypeString + delimiter + lookupTableName;
 // Writeable Once
 oneFieldTypeString = booleanToString(oneFieldTypeString, fieldInfo.IsModifyOnce());

 returnVal = returnVal + "n" + oneFieldTypeString;
 return returnVal;

 * Return a Yes/No based on a Boolean
private String booleanToString(String inputString, boolean isTrue) throws StringException {
 if (isTrue)
   return inputString + delimiter + "Yes";
   return inputString + delimiter + "No";

A QuickStart Guide to SAP MDM 5.5

 Part 1: Select and Install MDM Components
 Part 2: MDM Components and Modules
 Part 3: MDM architecture: How components fit into the MDM eco-system
 Part 4: The OS/DB Product Availability Matrix for MDM 5.5 SP4
 Part 5: MDM for the Java Developer
 Part 6: Tips and Tools for the MDM Administrator
 Part 7: Migrating MDM Configuration

This was first published in November 2006

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: