Extending Materials in Master Data Governance to Sales Details
SAP Master Data Governance software helps organizations govern financial, material, customer, or supplier master data from its creation in a business application through its replication to target applications to ensure data quality and regulatory compliance across the enterprise
Master Data Governance for Materials in general supports governing of objects like General Data, Descriptions, Unit Of measure, Basic Text, Internal Comment, Class Assignment and Characteristic Valuation. It always possible to extend the standard Data Model provided by SAP to govern either existing fields in table related to material or custom fields that are added to the standard table using extensions. This document explains of how the standard Data Model can be extended in order to govern Sales Area under a tab in the standard screen.
Extending Standard Content
Our focus would be to add a new tab called ‘Pricing’ which will have fields like Commision Group, Sales Organization, Distribution Channel and Item category group
You should having developer access for creating components and creating new configurations. You should have some knowledge of Web Dynpro ABAP.
Extending Data Model
First we should extend the Data Model so that it has the capability to handle the newly added fields.
Go to transaction code MDGIMG and navigate to Data Modeling->Edit Data Model
Select the row MM and double click the Entity types option on the left Panel
Click New Entries and Provide the Entity Name as ZZMVKE( for example) and provide the following values. This entity type is supposed to have generated structures in order to get it mapped to the backend.
In the attributes part we will add Item Category Group(MTPOS) and Commission Group( PROVG) from MVKE. The reason for adding this field alone is that the other fields VKORG( Sales Organization) and VTWEG( Distribution Channel) has foreign key relationships and hence these must be created as separate entity types and then added as relationship to ZZMVKE.
Now create an entity type for Sales Organization with following values and provide the data element. This entity type does not need any attributes because it represents a field of MVKE which has foreign key relationships and later on it will be link to the entity type.
In the same way create an entity type for Distribution channel with similar attributes
Now Double click the Relationships option from the left panel. Now relationships has to be created for the newly created entity types
Note: while saving the Data Model in between, you might be getting some error messages. Just ignore those until you create the relationships.
Create a relationship between MVKE and Material so that the Materials are always linked with a Sales Organization. You can provide any relationship name.
Now all the attributes of MVKE will be linked with a Sales organization and Distribution channel. So now create a relationship between Sales Organization and MVKE.
Now save and activate the DATA Model. By this time you must be seeing many warning messages. You could ignore them all.
For the newly added attributes to the entity type, the corresponding structures has to be generated.
Select the row MM and double click structures in the left panel
Make the following entries to it. You could provide any name for the structures provided it should be a Z structure. The structure will be automatically created
Double click Mapping
Provide values like the following. These names are the mapping names which you will create a little later.
Double click data models and select MM and click generate structures.
You can go to SE11 and provide the structure name that you provided in the structure part and you will find structures are created with respect to your entity types and its relationships
This step is required so that the fields are mapped to the current standard structures available that are provided by MDG.
Create a new mapping for ZZMARC using Mapping-> new.
Provide the mapping name that you provided in the Mapping step.
Now you will get a screen something like this
Click Change structure keys and provide the following values
Select the row and Click Details
Go to transformations tab
Click add to add a row and make an entry
Now select the row
Now you can map values manually by adding rows or scroll down and select from the available list which is much easier. It would be better if you use the same field name as in the MVKE tables so that mapping would be much easier.
Follow the same procedure for the remaining mappings as well
Structure keys are not needed for the remaining 2 mappings.
Edit UI Configuration
Now its time to add your fields to the UI. Follow the path to the UI configuration
A new window opens up
It is always better to copy the standard UI and make modifications to it. So click the standard UI name and click create with template.
Change the target configuration id names to a z name and select Deep copy mode and click start Deep copy.
Then you can start changing the UI configuration
Click go to Component Configuration
Now you will be seeing the general UI
Now click Add Main View
Now select the UIBB on the left and provide the following values. Provide a new configuration name which will be created in the next step. So ignore the error messages that you would be getting . Since it is going to be in the form of a table you should provide the component as FPM_LIST_UIBB
Click Configure UIBB
Now click configure Columns and you can add columns to it.
Now save the component and the other corresponding components as well. Now the UI is ready.
Assign UI configuration to Change request
Now this UI configuration can be used either in the URL directly or provide this configuration name to a Change request type so that wherever this Change Request type is called, this UI configuration will be called.
Select the change request type and double click Entity types.
Now you could provide the new UI configuration name in the UI configuration column.
If it is in display mode and if you are not able to change it, then it means that there are some existing request that are open in this Change Request Type. So you have to clear those request that will enable you to change the UI configuration name
Note: you could makes use of the report USMD_DELETE_CREQUEST to delete Change requests. This is available only from EHP 5 SP05