SAP ABAP IMG Activity PAOC_EIC_074 (BAdI: External Search Engines)
Hierarchy
EA-HRGXX (Software Component) Sub component EA-HRGXX of EA-HR
   PA-EIC (Application Component) Employee Interaction Center
     PAOC_EIC_IMG (Package) Employee Interaction Center: IMG
IMG Activity
ID PAOC_EIC_074 BAdI: External Search Engines  
Transaction Code S_AEN_10000689   (empty) 
Created on 20050317    
Customizing Attributes PAOC_EIC_OPT   Employee Interaction Center (EIC): Optional Activity 
Customizing Activity PAOC_EIC_074   BAdI: External Search Engines 
Document
Document Class SIMG   Hypertext: Object Class - Class to which a document belongs.
Document Name CRM_IIA_011    

Use

In this Implementation Guide (IMG) activity, you define and add new non-TREX search engines and content management systems to the Software Agent Framework (SAF). You can do this for any search engine or content management system from an SAP or non-SAP system. (If you are defining a new TREX based search engine, you do not need to carry out this IMG activity.)

Any search engine defined in the SAF can be assigned to one or more knowledge bases in the IMG activity Name and Configure Knowledge Base. A knowledge base with a specified language in the SAF can only have one search engine assigned to it, but a knowledge base can be assigned to several applications. As a result, the search engine is indirectly assigned to the application to which the knowledge base is assigned.

HTTP search integration is the standard search engine integration supported by the SAF. If the third-party product provides HTTP communication for search capability, using this approach is the most efficient way to integrate it into the SAF.

If you require additional communication (besides HTTP) between SAP and the third-party search engine or content management system, you can create an ABAP class extended from search engine class CL_CRM_SAF_SE_GENIL. It defines the basic methods supported by the SAF's search engine. Under Additional Information, see Unrestricted Integration for Search.

Requirements

The Business Add-In requires communication with the search engine through HTTP. For non-HTTP communication, additional integration or coding tasks inside or outside the SAP server may be required to complete the processes for search and compilation depending on the application programming interface (API) provided by the external search engine.

You must have authorization for transactions SE19, SE24, CRMC_SAF_WZ_SE, CRMC_SAF_WZ_KB, CRMC_SAF_WZ_COMPILE, and CRMC_SAF_WZ_RFC.

To integrate your existing search services or external content management systems into the Interaction Center (IC) WebClient knowledge search, please check the following requirements before starting the integration:

  • The external search service must provide an API that can be accessed from SAP, for example, a servlet allowing HTTP communication.
  • The API must include at least two protocols:
    • Submit a search query and return a list of hits, each with unique ID
    • Submit the unique ID and return the detail description
  • It must be possible to control any access control via a certain logon mechanism per session or request.

Standard settings

Activities

  1. Create a new Add-In implementation.
    1. In Customizing, go to the Business Add-In BAdI: External Search Engines.
    2. Choose Create and enter an implementation name (for example, CRM_SAF_SE_NEW), and choose Enter.
    3. Save the new Add-In implementation.
    4. A new implementing class is generated automatically.
    5. Go to the Interface tab page and note the name of the implementing class.
  2. Implement the Add-In class.
    1. Go to the Class Builder (transaction SE24).
    2. Enter the name of the implementing class from step 1, and choose Change.
    3. For the retrieval process of the new search engine, implement codes for the following methods:
    4. IF_EX_CRM_SAF_SE~COMPOSE_REQUEST_SEARCH
      Required to submit search queries to the search engine.
      This method is used to compose a search request in XML and/or name-value attributes based on text and attribute queries passed to this method.
      IF_EX_CRM_SAF_SE~COMPOSE_REQUEST
      Not supported
      IF_EX_CRM_SAF_SE~PARSE_RESPONSE_SEARCH
      Required to parse search results returned by the search engine.
      This method is used to parse XML and/or name-value attributes returned by the search engine. The information must be parsed into tables containing the knowledge base name, knowledge entity ID, description, and ranking. For example, in the IC WebClient, the hit list returned by the search engine and parsed in this method is displayed in the Search Results view of the knowledge search.
      IF_EX_CRM_SAF_SE~PARSE_RESPONSE
      Not supported
      IF_EX_CRM_SAF_SE~PARSE_RESPONSE_CHECK
      Not supported
  3. Create HTTP destinations.

    This step requires information about host, port, and path.

    1. Go to Display and Maintain RFC Destinations (transaction SM59).
    2. Select HTTP Connections to Ext. Server.
    3. Choose Create.
    4. Enter the name and description of the destination, enter connection type G, and choose Enter.
    5. On the Technical Settings tab page, enter the host, port, and path information to access the search engine.
    6. Choose Save.
    7. To test if HTTP communication is established, choose Test Connection.
  4. Name and configure the search engine.
    1. In Customizing, go to Name and Configure Search Engine.
    2. Enter a new search engine name, set the search engine type to BAdI Extended Search Engine, and set the communication type to HTTP Communication. No other entries are necessary.
  5. Assign the HTTP destinations created above to the search engine.
    1. In Customizing, go to Configure RFC Destinations.
    2. Follow the wizard.
    3. Note
      The indexing service HTTP destination is not supported so leave it blank.
  6. Name and configure the knowledge bases that you want the search engine to access.
    1. In Customizing, go to Name and Configure Knowledge Base.
    2. Follow the wizard, entering the knowledge base and language, and assigning the search engine name to the knowledge base.

Additional Information

Unrestricted Integration for Search

Unrestricted integration can be implemented if additional communication (besides HTTP) is required between SAP and the third-party search engine or content management system. You can build such an integration as follows:

  1. Create a new ABAP class by extending ABAP class CL_CRM_SAF_SE_GENIL.

    Implement the new ABAP class. Sample code can be found in ABAP class CL_CRM_SAF_SE_HTTP. To provide search capability, implement method IF_CRM_SAF_SE_GENIL~SEARCH. For detailed descriptions of the methods, see the SAP Help Portal (http://help.sap.com/) -> Software Agent Framework -> Search Engine.

  2. Name and configure the search engine.
    1. In Customizing, go to Name and Configure Search Engine, enter a new search engine name, set the search engine type to BAdI Extended Search Engine, and set the communication type as required.
    2. To redirect the search engine service, enter the name of the ABAP class you have created.
    3. Make other entries as necessary.
  3. In Customizing, go to Name and Configure Knowledge Base and link the search engine to the knowledge base that you want the search engine to access.

Integration with External Indexing Processes

Conceptually, the SAF's search engine API behaves like a meta layer, where different requests can be routed from different data sources to different search engines, based on configuration.

To implement the integration:

  1. Create a new ABAP programming class to build the integration layer by inheriting a superclass CL_CRM_SAF_SE_GENIL.
  2. Implement the individual methods depending on the required functionality.

    Sample codes can be found for:

    • CL_CRM_SAF_SE_HTTP
    • Used for standard HTTP integration
    • CL_CRM_SAF_SE_TREX_ABAP
    • Used for CRM ABAP stack

The remaining steps depend on which configuration of the SAF you are using:

  • ABAP configuration
    1. In Customizing, go to Name and Configure Search Engine, enter a new search engine name, and point the search engine to the newly created ABAP class.
    2. In Name and Configure Knowledge Base, you can (if desired) point the default search engine to the new search engine by selecting the knowledge base ALL and language EN. You can also associate the search engine with each knowledge base.
  • Non-ABAP configuration
    1. In Customizing, go to Name and Configure Search Engine, enter a new search engine name, and specify the search engine type Program Extended Search Engine. The communication type can be HTTP Communication or Other. If you have them, you can set up HTTP search server, queue server, and index server. The settings are relevant only if communication is via HTTP.
    2. Run transaction CRMC_SAF_ADV_CLIENT.
    3. In the left-hand navigation, double-click SAP Search Engine.
    4. In the work area, select the new search engine name and, if they are implemented, select Indexing and Clustering.
    5. In the left-hand navigation, double-click Search Engine Extension.
    6. In the work area, make sure the newly created search engine class name is entered for the ABAP class.
    7. Save your data.
    8. In the left-hand navigation, double-click Compilation Service. In the work area, you will see the mapping between knowledge bases and search engines. The default search engine is assigned to the knowledge base ALL for
Business Attributes
ASAP Roadmap ID 204   Establish Functions and Processes 
Mandatory / Optional 2   Optional activity 
Critical / Non-Critical 2   Non-critical 
Country-Dependency A   Valid for all countries 
Maintenance Objects
Maintenance object type E   Business Add-In - Definition 
History
Last changed by/on SAP  20050421 
SAP Release Created in 600