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 provides the flexibility for having type 2 entities for maintaining qualifying relationships to type 4. This gives the flexibility to have our own access class and show up the results of F4 based on some critera

Pre Requisites

                 

                    You should having developer access for creating components and creating new configurations. You should have some knowledge of Web Dynpro ABAP .

Data Modeling

                      I have created a sample data model with its own access class. I have an entity type Tax which is type 4 and it has a qualifying relationship with TATYP and Country( Aland ). Our scenario is that based on the Country field, The Tax type should also be derived.

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

Aland will hold a Leading relationship to Tatyp and a Qualifying relationship to Tax. The reason for this Leading relationship is to provide search help values for Tatyp based on Aland.

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

Now Double click Reuse Active Area and provide a value for the type 2 Access Class entity.

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

Now navigate to Tatyp Entity and Provide this Reuse Class.

/wp-content/uploads/2013/08/2_268831.jpg

Access Class

The Access class you mentioned in the data model should have implemented the interface IF_USMD_PP_ACCESS.

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

Now implement the method Read_value and Query of the interface if_usmd_pp_access. Basically both will be containing the same coding.

 

If i_entity = ‘TATYP’.
 
loop at it_sel into wa_sel where fieldname = 'ALAND'.select * from tstlinto corresponding fields of table it_tstlwhere talnd = wa_sel-low.loop at it_tstl into wa_tstl.select single * from t685t into wa_t685twhere spras = sy-langu and
kvewe = 'A' and
kappl = 'V' and
kschl = wa_tstl-tatyp.assign component 'ALAND' of structure <fs_data> to <fs_aland>.move wa_tstl-talnd to <fs_aland>.move-corresponding wa_tstl to <fs_data>.assign component 'TXTSH' of structure <fs_data> to <fs_txtsh>.if <fs_txtsh> is assigned.move wa_t685t-vtext to <fs_txtsh>.endif.insert <fs_data> into table et_data.endloop.endloop.data: begin of wa_sel1,
kschl type kschl,sign type ddsign,
option type ddoption, fieldname type fieldname,
high type usmd_value,end of wa_sel1,
it_sel1 like standard table of wa_sel1.loop at it_sel into wa_sel where fieldname = 'TATYP'.
wa_sel1-kschl = wa_sel-low.move-corresponding wa_sel to wa_sel1.append wa_sel1 to it_sel1.endloop.if it_sel1 is not initial.select * from t685t into corresponding fields of table it_t685tfor all entries in it_sel1where spras = sy-langu and
kvewe = 'A' and
kappl = 'V' and
kschl = it_sel1-kschl.select * from tstlinto corresponding fields of table it_tstlfor all entries in it_sel1where tatyp = it_sel1-kschl.loop at it_tstl into wa_tstl.assign component 'ALAND' of structure <fs_data> to <fs_aland>.assign component 'TATYP' of structure <fs_data> to <fs_tatyp>.assign component 'TXTSH' of structure <fs_data> to <fs_txtsh>.move wa_tstl-talnd to <fs_aland>.move wa_tstl-tatyp to <fs_tatyp>.if <fs_txtsh> is assigned.read table it_t685t into wa_t685t with key kschl = wa_tstl-tatyp.move wa_t685t-vtext to <fs_txtsh>.endif.insert <fs_data> into table et_data.endloop.
endif.

The reason for having different parts in th following code is that, the method query gets executed certain times with a specific selection criteria and sometimes the Read Value method is called directly based on certain critetria.

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