Show TOC

Background documentationExtending the Data Model for Master Data Governance for Material

 

You can extend the data model (MM) for Master Data Governance for Material (MDGM) with new entity types and attributes. You should extend the ERP material master data model before you extend the MM data model. This document contains information specific to enhancing the data model for MDGM; for more detailed information on the process, see the overall document on extending Master Data Governance content.

Note Note

There is no need to create a customer access class for the data model MM. The MDGM data model, MM, is preconfigured with one reuse area: MATERIAL. This reuse area points to the access class CL_MDG_BS_MAT_ACCESS, which can handle most fields of the pre-delivered SAP ERP Material Master.

End of the note.

The following scenarios for enhancing the MDGM data model are possible:

  • Extend the MDGM data model by adding attributes that already exist as database fields in the pre-delivered or extended SAP ERP material master.

  • Extend the MDGM data model by adding a reuse entity type that already exists as a database table in the pre-delivered SAP ERP material master.

  • Extend the MDGM data model by adding a reuse entity type that exists as a database table that has been added to the pre-delivered SAP ERP material master.

  • Extend the MDGM data model by adding a flexible entity type that only exists in the database tables in MDG.

Scenarios
Scenario: Adding an Attribute to the MDGM Data Model

You can extend the MDGM data model by adding an SAP ERP material master database field to an MDGM entity as an attribute. You can only add database fields that are part of the SAP ERP database tables (including customer-created fields); you cannot add customer-created tables that you added to the SAP ERP database. Use the following process to add an attribute to the MDGM data model:

  1. Enhance the MDGM data model with additional attributes. The MDGM data model is called MM.

  2. Generate the model-specific structures.

  3. Maintain the mapping in the Service Mapping Tool (SMT).

  4. Specify field properties.

  5. Configure the UI. The MDGM application configuration begins with BS_MAT_OVP. It is located in the development package MDG_BS_MAT_UI.

  6. Optional step: Create a new print form. You can use the existing print form (MDG_BS_MAT_PDF_05) as a template.

  7. Optional step: Enhance the search. Generate the business template MDG_MATERIAL again.

Note Note

This scenario covers the pre-delivered fields belonging to the SAP Material Master database tables and also any customer-defined fields you have added to those tables.

End of the note.
Scenario: Adding a Reuse Entity Type to the MDGM Data Model

You can extend the MDGM data model by adding a pre-delivered SAP ERP material master database table to the MDGM data model as an entity type. Use the following process to add a reuse entity type to the MDGM data model:

  1. Enhance the MDGM data model with additional entity types. You can choose the attributes belonging to this entity type that you wish to add to the MDGM data model. The MDGM data model is called MM.

  2. Generate the model-specific structures.

  3. Create the mapping in the SMT and assign it to the model specific structures.

  4. Specify the field properties.

  5. You can extend the existing MDGM application configuration (BS_MAT_OVP). It is located in the development package MDG_BS_MAT_UI. If necessary you can also create a new application configuration. You can use the existing MDGM application configuration (BS_MAT_OVP) as a template.

    Note Note

    You cannot add fields from a new entity type to an existing UIBB. The new fields must be added to a new UIBB. Multiple UIBBs can be added to a single assignment block.

    End of the note.
  6. Optional step: Create a new print form. You can use the existing print form (MDG_BS_MAT_PDF_05) as a template.

  7. Optional step: Enhance the search. Generate the business template MDG_MATERIAL again.

Note Note

If you have extended the material master tables with customer-defined fields (using the procedure outlined in SAP Note 44410Information published on SAP site), which you want to include into the MDGM Data Model, you need to enhance the following data structures (corresponding to the extended material master table) manually:

  • The structures of the tables in MDG_BS_MAT_S_MAT_DATA having the suffix _X_TAB

  • The structures in MDG_BS_MAT_S_MATERIAL_UI_PROP

This is valid for both scenarios above.

End of the note.
Scenario: Adding a Customer Owned Reuse Entity Type to the MDGM Data Model

You can extend the MDGM data model by adding a customer-owned material master database table (Z table) to the MDGM data model as an entity type. Use the following process to add a reuse entity type to the MDGM data model:

  1. Enhance the following data structures (corresponding to the new, customer-owned material master table) manually:

    • Add table types for the data and _X structure to MDG_BS_MAT_S_MAT_DATA. Use the same design pattern as used in existing table types.

    • Add a table type to the structure MDG_BS_MAT_S_MATERIAL_UI_PROP. Use the same design pattern as used in existing table types.

  2. Implement the BAdI MDG_BS_MAT_API_SEGMENTS_EXT

  3. Enhance the MDGM data model with additional entity types. You can choose the attributes belonging to this entity type that you wish to add to the MDGM data model. The MDGM data model is called MM.

  4. Generate the model-specific structures.

  5. Create the mapping in the SMT and assign it to the model specific structures.

  6. Specify the field properties.

  7. You can extend the existing MDGM application configuration (BS_MAT_OVP). It is located in the development package MDG_BS_MAT_UI. If necessary you can also create a new application configuration. You can use the existing MDGM application configuration (BS_MAT_OVP) as a template.

    Note Note

    You cannot add fields from a new entity type to an existing UIBB. The new fields must be added to a new UIBB. Multiple UIBBs can be added to a single assignment block.

    End of the note.
  8. Optional step: Create a new print form. You can use the existing print form (MDG_BS_MAT_PDF_05) as a template.

  9. Optional step: Enhance the search. Enhance the ERP material master search template in SAP_APPL. Generate the business template MDG_MATERIAL again and if required, implement the BAdI BADI_SDQ_PP_SEARCH.

Scenario: Adding a Flexible Entity Type to the MDGM Data Model

You can extend the MDGM data model by adding a flexible entity type to the MDGM data model. Note that flexible entity types are not supported in Enterprise Search and so attributes from these entities cannot be used as search criteria. Use the following process to add a flexible entity type to the MDGM data model:

  1. Enhance the MDGM data model with additional entity types using the Edit Data Model configuration activity. Choose the attributes that you wish to add to the MDGM data model. The MDGM data model is called MM. Assign the reuse area MDG to your entity types to declare them as flexible entity types.

  2. Optional step: Generate the model-specific structures.

  3. Specify the field properties. You can do this in the Define Field Properties for UI configuration activity.

  4. In order to see the new fields on the UI you should extend the existing MDGM application configuration (BS_MAT_OVP). It is located in the package MDG_BS_MAT_UI. If necessary you can also create a new application configuration. You can use the existing print form (MDG_BS_MAT_PDF_05) as a template.

    Note Note

    You cannot add fields from a new entity type to an existing UIBB. The new fields must be added to a new UIBB. Multiple UIBBs can be added to a single assignment block.

    End of the note.
  5. Optional step: Create a new print form. You can use the existing print form (MDG_BS_MAT_PDF_05) as a template.

    Note Note

    You cannot import flexible entities using IDocs, ALE, or the Master Data Import framework.

    End of the note.

More Information

For more information on extending the material data model see the SAP Community Network (http://scn.sap.com/docs/DOC-7858#jive_content_id_Material_DataInformation published on SAP site).