MDM Web Dynpro components are standard components provided by SAP which ensures independence from the underlying MDM schema. These components are reusable and can be used to develop custom webdynpro applications. These components are configured in the Web Dynpro Configuration Manager (Configuration Manager) which exposes MDM repository metadata.
Architecture of MDM WD component environment.
Standard MDM Web Dynpro components are consumed as used components in custom Web Dynpro applications. These standard components once consumed as used components are customized according to the business needs to suit the customers requirements.
To customize and modify the generic behavior of MDM Web Dynpro components at runtime using User Exits (sometimes called hook methods). User Exits allow you to add your own functionality to SAP’s standard applications. There are several different types of User Exits, each of which can be used to achieve the desired functionality.
They also serve as hooks to add customized functionality to SAP’s standard business applications without having to modify the original applications.
There are different types of user exits, each of which act as hooks to attach your own coding. When MDM WD components are consumed, they expose the following user exits:
· Interface Methods: API interface methods can be accessed from a wrapper component.
· Context Input: A Web Dynpro context node or attribute stores relevant information that can be accessed by a wrapper application.
· Events: Communication between components and custom wrapper applications can take place through eventing. An event is
triggered from a Web Dynpro component and all applications using this component can subscribe to the event.
User Exits for Item Details Web Dynpro Components
The following API interface methods are exposed from an Item Details Web Dynpro component and can be accessed from a
Ø setRepositoryBean(RepositoryBean repositoryBean)
Example: creating an instance of the repository bean and passing that value to create a connection with the MDM
_repositoryBean = new RepositoryBean();
Ø setConfiguration(projectConfigName, componentConfigName)
Populates the Item Details component with the configuration that you configured in the MDM Web Dynpro Configuration Manager. After
execution of this method, connection to the MDM repository is established.
Ø setRecordId(String recordId)
Passes the internal ID of the MDM record to be displayed in the Item Details component
Retrieves an MDM record and all information of the record created in MDM Data Manager.
Triggers MDM configured validations and custom developed external validations.
WdCompsValidationResults validateResults = wdThis .wdGetItemDetailsInitialInterface().validateRecord();
Record is not valid
Record is valid
Ø getFieldValue(String fieldCode)
Enables the wrapper component to retrieve a specific field value. The return value of this method is an MDM API class called
MdmValue. Can be called only after a record has been selected in an Item Details component.
MDMValue fieldValue = wdThis.wdGetItemDetailsInitialInterface().getFieldValue(String FieldCode);
Ø setFieldValue(String fieldCode, MdmValue value)
setFieldValue method is used to default any value from code in any Item Detail.
wdThis.wdGetItemDetailsInitialInterface().setFieldValue(String fieldCode, MdmValue value);
This is used to refresh record detail of Item Detail. When this method is called it fetches record value from MDM and updates in Item
Ø setFieldProperty(String fieldCode, FieldLayoutProperty property, Boolean value)
This method is used to change property of any field on any particular condition.
wdThis.wdGetItemDetailsInitialInterface().setFieldProperty(String fieldCode, FieldLayoutProperty property, Boolean value)
· To hide a field on any particular condition from the item detail.
· To make a field conditional mandatory hide on item detail.
· To disable a field conditionally on item detail.
Ø setTabProperty(String tabCode, FieldLayoutProperty property, Boolean value)
wdThis.wdGetItemDetailsInitialInterface().setTabProperty(String tabCode, FieldLayoutProperty property, Boolean value)
· To disable all fields of one tab (Header).
To make all fields mandatory of one tab (Header).
To hide one particular tab from an item detail.
- 1. help.sap.com