Process documentationConfiguring SAP HANA-Based Search for MDG

 

SAP HANA-based search for SAP Master Data Governance enables you to perform searches and duplicate checks on master data residing in the SAP HANA database. An SAP HANA search provider is delivered to enable these features.

The following data models are supported out-of-the-box for MDG on HANA:

  • Flex data models

  • The business partner reuse model (BP)

  • The material reuse model (MM)

The access class implementation is not provided for other reuse models. You must implement the access class for SAP HANA search to use it with the other reuse models.

SAP HANA-based search for SAP Master Data Governance can be used for the following MDG applications:

  • Master Data Governance for Custom Objects

  • Master Data Governance for Financials

  • Master Data Governance for Supplier

  • Master Data Governance for Customer

  • Master Data Governance for Material

Prerequisites

You have activated the business functions Master Data Governance, Generic Functions 7.0 or higher (MDG_FOUNDATION_4 or higher) and Master Data Governance, Generic Functions 7.0 Feature Pack or higher (MDG_FOUNDATION_5 or higher).

You have activated the business function for your domain, for example, MDG_ERP_CUSTOMER_3 or higher, MDG_ERP_SUPPLIER_4 or higher, MDG_BUPA_1 or higher, and MDG_MATERIAL_5 or higher.

You have installed the SAP HANA database, support package 06 or higher. We recommend that you install the highest available version of the SAP HANA database.

You must have the following permissions to work with search views in SAP HANA:

  • Permission to create a package and to write objects into packages

  • Permission to create, change and drop attribute views

  • Permission to create, change and drop SQL views

  • Permission to create, execute and drop rule sets

For more details please refer to the SAP HANA security guide.

Process

To configure SAP HANA-based search for MDG, carry out the steps described below. If you are using SAP HANA as a primary database you can skip to step 4 below.

  1. Create Database Connection

    Run transaction DBCO and create a database connection to the SAP HANA database.

    Field

    Value

    Database Connection Name

    Unique name for the SAP HANA database connection used for search and duplicate check

    Database System

    SAP HANA database

    Permanent

    Yes

    User Name

    Schema name created in step above

    Connection Information

    Server: instance number

    Connection Limit

    0

    Optimum Number of Connections

    0

    Note Note

    Deployment Options for MDG

    MDG can be deployed on an SAP HANA database or on any database.

    • If you deploy MDG on SAP HANA, then SAP HANA acts as the primary database and the creation of the database connection is optional. If the database connection is not maintained then a default connection is derived automatically.

    • If you deploy MDG on any other database, then you must maintain the database connection to the schema in the SAP HANA database.

    End of the note.
  2. Maintain the MDG SAP HANA Database Profile Settings

    This step is required for sidecar deployment of the SAP HANA database but not necessary when you use SAP HANA as a native system database.

    You must define the MDG landscape settings, such as the connection to the SAP HANA database that is used for the search and duplicate check processes. You can make these setting in Customizing under Start of the navigation path Master Data Governance, Central Governance Next navigation step General Settings Next navigation step Technical Settings for Master Data Next navigation step Define MDG Landscape Profile End of the navigation path.

    The use of an SAP Landscape Transformation (SLT) server is optional for MDG data replication. If you use SLT for replicating the MDG table data to the SAP HANA database system, then you must also define a connection to an SLT server as explained below.

    Note Note

    Deployment Options for MDG

    • If you deploy MDG on SAP HANA, then SAP HANA acts as the primary database and no replication is required.

    • If you deploy MDG on another database, the MDG data must be replicated to SAP HANA search schema either by SAP Landscape Transformation (SLT) or by other means. To generate a search view in the target system where search is performed, the MDG table metadata and data must be replicated to the SAP HANA database. To enable this initial replication of the data you must carry out the steps described below.

    End of the note.
    1. Run transaction MDGIMG.

    2. Navigate to Start of the navigation path Master Data Governance, Central Governance Next navigation step General Settings Next navigation step Technical Settings for Master Data Next navigation step Define MDG Landscape Profile End of the navigation path.

    3. Enter data in the following fields:

      Field

      Value

      Database Connection Name for MDG

      The SAP HANA database used for the search and duplicate check processes created in the previous step. This field is optional if MDG is deployed on a SAP HANA database.

      RFC Connecting MDG to SLT System

      Optional, only enter data if you use SLT for data replication

      SLT Configuration Name

      Optional, only enter data if you use SLT for data replication

      In the SAP HANA system, where the search on MDG data is performed, you must generate the search view. If you deploy MDG on a traditional database, and use SLT for replication then, when generating the view, before it is created, the system replicates the required table metadata to the SAP HANA database using the SLT settings.

      If SAP HANA is the primary database, it is not mandatory to maintain the database connection name in MDG Landscape Profile customizing. If the name is not maintained the system uses the default database connection. You still have the option of maintaining a different connection name in the MDG Landscape Profile if you do not wish to use the default database connection.

    4. In the SLT system the SLT user requires the authorization object S_DMIS, with the following field values defined for their role:

      Authorization Object

      Value

      Activity (ACTVT)

      02 (Change)

      MBT PCL: Scenario (MBT_PR_ARE)

      SLOP (SAP Landscape Transformation

      MBT PCL: Processing Role Level (MBT_PR_LEV)

      PACKAGE (Transfer package level)

  3. Define Authorization Relevance for Each Entity Type (Optional)

    You can have the system check authorizations maintained in customizing during search. You can maintain the authorizations in Customizing under Start of the navigation path Master Data Governance, Central Governance Next navigation step General Settings Next navigation step Data Modeling Next navigation step Define Authorization Relevance per Entity Type End of the navigation path.

  4. Using Material Long Texts for SAP HANA Search

    For Material Search, in transaction SA38 execute the report MDG_HDB_MAT_MIGRATE_LONGTEXT as a background job. Select the Overwrite target table records checkbox, to perform the initial load of material long texts to the database table MDGHDB_LONGTEXT. This loads the following long text types: Basic Data Text, Sales Text, Purchase Order Text, Inspection Text, Internal Note, and Material Note MRP.

  5. Create and Generate Search Views

    You can either use the pre-delivered search views or create you own. In both cases the views will need to be generated. View generation is a separate activity from view creation.

    If required, you can create a search view in the development system and transport it to the test and production systems. The search view must be generated or regenerated in the target (test and production) systems.

    You must assign the template Search Views (For example: MDGM_MM_ORGS or MDGM_MM_ORGS_CLF) to your SAP HANA content repository package (Example: ztmp.mdg.customobjects) in the Create Search View configuration activity before you can generate and use them. You can find the template search views in customizing under Start of the navigation path Master Data Governance, Central Governance Next navigation step General Settings Next navigation step Data Quality and Search Next navigation step Search and Duplicate Check Next navigation step Create Search View End of the navigation path.

    Example Example

    Select the template Search View MDGM_MM_ORGS_CLF, choose Edit, assign a SAP HANA content repository package such as ztmp.mdg.customobjects, choose Save and Generate.

    End of the example.

    You must also have authorization to create a workbench request.

    To create a new search view, run transaction MDG_HDB_GEN_UI or navigate to Start of the navigation path Master Data Governance, Central Governance Next navigation step General Settings Next navigation step Data Quality and Search Next navigation step Search and Duplicate Check Next navigation step Create Search View End of the navigation path.

    The package where you generate the search view must be in the customer namespace. Enter the name of the package during search view creation.

    When you create your own search view the system generates the SAP HANA view, and the following search configuration data is automatically updated:

    • Start of the navigation path Master Data Governance, Central Governance Next navigation step General Settings Next navigation step Data Quality and Search Next navigation step Search and Duplicate Check Next navigation step Define Search Applications Next navigation step Allocation of Search Help to Search Applications End of the navigation path

    • Start of the navigation path Master Data Governance, Central Governance Next navigation step General Settings Next navigation step Data Quality and Search Next navigation step Search and Duplicate Check Next navigation step Define Search Applications Next navigation step Allocation of Entities to Search Help End of the navigation path

    Caution Caution

    If you use the template Search Views (MDGM_MM_ORGS and MDGM_MM_ORGS_CLF) you need to check if the above customizing has been updated, if not, then you need to manually update it.

    End of the caution.

    In SAP HANA attribute views are created on the active and inactive areas. After you create the search view it can be manually edited within SAP HANA Studio to update the search properties of an attribute. In this case, if the search view is regenerated, the new search view will overwrite the manually updated search view.

    You can create a search rule set during the search view generation if you want the search to be performed based on search rule sets. If you choose the create ruleset option for a reuse model, a union SQL view is created on the attribute view in SAP HANA. This search rule set can also be manually updated according to the business requirements of the users after it is generated. If the search view is edited at a later date and is regenerated, the search rule set will not be regenerated/overwritten; it has to be manually adjusted.

    You must manually check out the generated search rule set to the Project Explorer view of the SAP HANA Studio Administration Console before it can be edited to change any parameter, such as the fuzzy value or weight of an attribute, and activate it to enable search based on this modified search rule set.

    You can also copy an existing search view and edit it before generating the search view.

    If there is a mismatch between the generated search view and the underlying objects, the system recognizes this and updates the status of the generated search view to Outdated. You can edit this outdated search view and regenerate the view.

    To delete a search view, you must first remove the customizing settings for the search view, and then delete the search view. The status of the view is then set to Marked for Deletion. In transaction SE38 execute the report program MDG_HDB_DELETE_SEARCH_VIEWS to delete the specific view or all views that are marked for deletion, and drop the corresponding objects in SAP HANA.

    You must set filters in the SAP HANA staging views to exclude records that have the obsolete indicator set. Identify all the Obsolete Indicator flags. The fields corresponding to the obsolete indicator flags in each table of a staging view have the technical naming convention USMD*_OBS_* or USMD*_O_*. Select the obsolete indicator in the Details section of the staging view, right click and select Apply Filter. In the Operator field select Not Equal and in the Value field enter X.

    Field Name

    Operator

    Filter Value

    USMD*_OBS_*

    Not Equal

    X

    USMD*_O_*

    Not Equal

    X

    For material search you must set filters in the SAP HANA views for the material-related long texts stored in the database table MDGHDB_LONGTEXT. This means that only the appropriate long texts are taken from MDGHDB_LONGTEXT. To do this, in the SAP HANA studio, open the Content folder and navigate to the package where the search views are created. For reuse entity types, creating a search view generates two views in the SAP HANA system (one each for the active and staging areas), or three if you are using classification data. The views generated for the active area have names similar to searchviewname_Reuse and searchviewname_RINOB.

    Open the reuse SAP HANA views below. Go to Detail window, and select the long text table with the alias you want to update and right-click on the attribute. From the menu choose Apply Filter. From the drop-down menu choose the operator Equal and maintain the values as specified in the tables below.

    Basic Text

    Field Name

    Filter Value

    Table Name (Alias)

    BSCDATTXT_TDID

    GRUN

    BSCDATTXT_MDGHDB_LONGTEXT

    BSCDATTXT_TDOBJECT

    MATERIAL

    BSCDATTXT_MDGHDB_LONGTEXT

    Sales Text

    Field Name

    Filter Value

    Table Name (Alias)

    SALESTXT_TDID

    0001

    SALESTXT_MDGHDB_LONGTEXT

    SALESTXT_TDOBJECT

    MVKE

    SALESTXT_MDGHDB_LONGTEXT

    Quality Inspection Text

    Field Name

    Filter Value

    Table Name (Alias)

    QINSPTXT_TDID

    PRUE

    QINSPTXT_MDGHDB_LONGTEXT

    QINSPTXT_TDOBJECT

    MATERIAL

    QINSPTXT_MDGHDB_LONGTEXT

    Purchase Text

    Field Name

    Filter Value

    Table Name (Alias)

    PURCHTXT_TDID

    BEST

    PURCHTXT_MDGHDB_LONGTEXT

    PURCHTXT_TDOBJECT

    MATERIAL

    PURCHTXT_MDGHDB_LONGTEXT

    Plant Text

    Field Name

    Filter Value

    Table Name (Alias)

    MRPTXT_TDID

    LTXT

    MRPTXT_MDGHDB_LONGTEXT

    MRPTXT_TDOBJECT

    MDTXT

    MRPTXT_MDGHDB_LONGTEXT

    Internal Comment Text

    Field Name

    Filter Value

    Table Name (Alias)

    INTCMNT_TDID

    IVER

    INTCMNT_MDGHDB_LONGTEXT

    INTCMNT_TDOBJECT

    MATERIAL

    INTCMNT_MDGHDB_LONGTEXT

  6. Verify Customizing Settings for Search View

    After you have created and saved the search view, you must verify that the customizing settings are automatically updated for the newly created search view. To do this, perform the following:

    1. Run transaction MDGIMG.

    2. Navigate to Start of the navigation path Master Data Governance, Central Governance Next navigation step General Settings Next navigation step Data Quality and Search Next navigation step Search and Duplicate Check Next navigation step Define Search Applications End of the navigation path.

    3. Select the row with the Search Mode HA (HANA). Note that the Fuzzy checkbox has no impact on SAP HANA search; SAP HANA search is fuzzy by default. To change the search type to exact, go to the Attribute View output attributes and change the Search Properties.

    4. Double-click on Allocation of Search Help to Search Applications.

    5. Verify that there is an entry for the newly created search view in the Included Search Help field with the technical name provided during search view creation.

    6. Select the row of the newly created search view.

    7. Double-click on Allocation of Entities to Search Help and verify that the main entity type that you selected during search view creation is updated.

  7. Create Match Profile for Duplicate Checks based on SAP HANA Search

    If you have created a search rule set in the Create Search View step, you can use it to configure the match profile for duplicate checks.

    1. Run transaction MDGIMG.

    2. Navigate to Start of the navigation path Master Data Governance, Central Governance Next navigation step General Settings Next navigation step Data Quality and Search Next navigation step Search and Duplicate Check Next navigation step Define Search Applications End of the navigation path.

    3. Select the row with the Search Mode HA (HANA).

    4. Double-click on Match Profile.

    5. For the specific data model and the Match Profile ID for Duplicate Check enter the name of the search rule set if you generated one in step 4 above, otherwise, leave the field empty.

    When you enter the search rule set name, the information from the search rule set is used instead of the attribute view while performing search during duplicate checks.

  8. Configure Duplicate Check Based on SAP HANA search

    After you have maintained a match profile ID, you can configure the search view for duplicate checks.

    1. Execute transaction MDGIMG.

    2. Navigate to Start of the navigation path Master Data Governance, Central Governance Next navigation step General Settings Next navigation step Data Quality and Search Next navigation step Search and Duplicate Check Next navigation step Configure Duplicate Check for Entity Types End of the navigation path.

    3. Select the Data Model and Entity Type for which you want to configure the duplicate check. Select the Search Mode as HA. Enter the threshold values for the duplicate check. Enter the name of the Match Profile ID and the search view to be used for the duplicate check. Select the Match Profile Based UI if required.

  9. Test Search and Duplicate Check

    1. Test the SAP HANA Search

      1. Launch the SAP NetWeaver Business Client.

      2. Select the work center for your data model.

      3. Launch the search UI.

      4. In the Search Method field enter the SAP HANA Search Configuration that you have created.

      5. Choose Search and the search results should be returned.

      6. In addition, perform a freestyle search and an attribute search and check the results.

    2. Test the Duplicate Check

      1. Create a duplicate of an existing object.

      2. When you have entered data for your object choose Check. This triggers the duplicate check and the system should indicate that your new object is a potential duplicate.

Result

You have now configured your system to use SAP HANA for MDG search. For drill down search configuration, see Configuring Drill-Down Search (Optional).