Introduction

                           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

                        

Scope

                           Master Data Governance for Custom Objects has the capability of Using UI Badi through which we would be able to restrict the search value helps based on the change request type. In this we will try to restrict the value of INHME field based on the Change request type or Business Process.

PreRequisites

                      You should having developer access for creating components and creating new configurations. You should have some knowledge of Web Dynpro ABAP and also the concept of using UI badi.

Data Modelling

                      I have created a sample data model with its own access class. I have an entity type MARA with a field INHME( Content unit ) for which the vales has to be restricted.

                           /wp-content/uploads/2013/08/1_269375.jpg

Make sure that you do not provide any search help to it. Because it is only in that case the UI Badi will be called.

UI Badi

                    Navigate to MDGIMG-> UI Modelling-> Business Addins

                  

/wp-content/uploads/2013/08/1_269375.jpg

Create an enhancement implementation and provide the filter value as the UI configuration for which the BADI has to be called.

/wp-content/uploads/2013/08/1_269375.jpg

/wp-content/uploads/2013/08/1_269375.jpg

Navigate to the class and implement the method IF_EX_USMD_UI_EVENT2~PROCESS_VALUE_HELP

 

The ID_ATTRIBUTE field contains the field name for which the search help is triggered and you can use the below coding to fetch the value that is needed, based on which the search help has to be triggered.

The import parameter contains an attribute IS_UI_CONTEXT which holds some values based on change request. In some cases the Business activity is straightly available or we should do a query for getting the business activity

 

if is_ui_context-process is initial.select single usmd_process into lv_processfrom usmd1601where usmd_creq_type = is_ui_context-crequest_type.else.
lv_process = is_ui_context-process.endif.
If id_attribute = ‘INHME’.
read table it_key_field into wa_key_field with key fieldname = 'MARA'.
wa_sel-fieldname = 'MARA'.
wa_sel-sign = 'I'.
wa_sel-option = 'EQ'.
wa_sel-low = wa_key_field-value.append wa_sel to it_sel.
lo_usmd_model_ext = is_ui_context-o_model.call method lo_usmd_model_ext->read_entity_data_all(exporting
i_fieldname = 'MARA'
if_active = ''
it_sel = it_selimporting
et_data_entity = it_data_entity ).read table it_data_entity into wa_data_entity with key usmd_entity     = 'MARA'
                                                                                                              usmd_entity_cont = ''.
                 
 
if sy-subrc eq 0.
lr_data = wa_data_entity-r_t_data.assign lr_data->* to <fs_data>.endif.if <fs_data> is assigned and
<fs_data> is not initial.loop at <fs_data> assigning <fs_structure>.assign component 'MTART' of structure <fs_structure> to <fs_mtart>.endloop.endif.
// make use of your own logic to filter values based on MTART and fill in gt_uom table
 
if lv_process = ‘ZA09’.
lv_key = ‘Z’.
endif.
if wa_uom-content+0(1) = ‘Z’.
loop at gt_uom into wa_uom.
wa_selection-fieldname = 'INHME'.
wa_selection-sign      = 'I'.
wa_selection-option    = 'EQ'.
wa_selection-low       = wa_uom-msehi.
insert wa_selection into table et_selection.
else.

endif.
endloop.
   
endif.

The et_selection table contains the values that will be displayed for the search help.

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.

/wp-content/uploads/2013/08/1_269375.jpg

Select the change request type and double click Entity types.

/wp-content/uploads/2013/08/1_269375.jpg

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

/wp-content/uploads/2013/08/1_269375.jpg 

ote: you could makes use of the report USMD_DELETE_CREQUEST to delete Change requests. This is available only from EHP 5 SP05

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply