Skip to end of metadata
Go to start of metadata

The content of this wiki page will be maintained here.


TREX (Text Retrieval and Information Extraction) is a powerful engine which provides intelligent search and automatic classification of documents. The TREX search engine is able to retrieve information from both structured and unstructured text.

In IT Service Management, TREX search engine is used for full-text search within CRM documents, such as incidents, change requests and knowledge articles.


  • installed and running Solution Manager 7.1 SPS 01 or higher

     For more information, please see the SAP Solution Manager Installation Guide available in SAP Service Marketplace.

  • TREX prerequisites:
          ° installed and running TREX 7.1 or 7.0 (a basic check can be performed in the Software Agent Framework, as described in section 4.1/1. of this guide             ° RFC Connection between SAP Solution Manager and TREX.

TREX Installation Guides (including information on how to set up the RFC connection) can be found in SAP Service Marketplace at

TREX administrators can also find additional information in the SAP online documentation:

Fundamentals of the RFC Connection between TREX and SAP Systems:

Configuring and Administrating the RFC Connection:


The figure below provides an overview of the required configuration steps which are explained in more details in the following chapter.



This section provides detailed information about the configuration steps to be performed in the SAP Solution Manager.


As of SAP Solution Manager 7.1 SPS09, the search for attachments is supported. The prerequisite is SAP Note 2042857.

After completing all required manual steps, a full compilation of the knowledge base CRM_OBJECT and the dependent knowledge base CRM_OBJECT_DOC is needed.

4.1 Configure Software Agent Framework (SAF)

The Software Agent Framework (SAF) provides an open architecture that can integrate tools to easily and flexibly assemble information from multiple SAP data sources (such as ERP, SAP CRM, SAP NetWeaver Business Intelligence) and external data sources.

To use document search and classification in Service Desk, you have to configure SAF.

  1. Check the settings in the Software Agent Framework.

                    In this step, you check the relevant SAF settings, such as search engine status and default customizing. You can also restore the default customizing if the current customizing is 


2. Choose a search engine.

             In the menu Goto -> Customizing -> Search Engine, you start a wizard to check if the correct search engine (STANDARD) has been specified.

3. Set up the knowledge base.

            In the menu Goto -> Customizing -> Knowledge Base you can access the wizard to configure the knowledge base for:

           ° Solution database (entry SDB)

           ° Knowledge articles (entry KA)

           ° Messages (entry CRM_OBJECT) (this entry has to be maintained manually)

4. Assign RFC connection to the TREX Search Engine.

            In the menu Goto -> Customizing -> RFC Destinations you have to assign a predefined RFC destination to the TREX Search Engine. It is assumed, that this RFC destination was already

            created by a TREX administrator, as described in chapter 2 of this guide.

5. Configure Application.

             In the menu Goto -> Customizing -> Application you can access the wizard to configure an application which is recognizable in the Software Agent Framework.

                                                          CRM_OBJECT_APP is the relevant application for TREX usage in Solution Manager.

4.2 Create Index

  1. Activate Services.

Before you create the initial index for the knowledge database, you have to activate the following services in transaction SICF:

  • /sap/bc/bsp/sap/crm_ei_cmp_admn
  • /sap/bc/bsp/sap/crm_ei_summary

For more information on how to activate services, please refer to SAP Note 1088717.

        2. Compile Initial Index.

In the SAF tool menu, select Goto -> Knowledge Base Compilation to create the initial index.

4.3 Activate Delta Compilation

  1. Activate the action for delta compilation <transaction type>_STD_SET_KB_DELTA.


        For detailed information on how to activate the action, please refer to the documentation of the IMG activity Activate Delta Compilation.

        2.   Schedule a background job for delta compilation.

       The background job for delta compilation can be scheduled via the SAF tool menu Goto -> Knowledge Base Compilation as described in the documentation of the IMG step Activate Delta


4.4 Turn on TREX Search Engine

The last configuration step is to switch on the TREX Search Engine which is controlled by the parameter SMWORK_INCIDENT_MAN_TREX in the table AGS_WORK_CUSTOM (transaction SM30).

  • SMWORK_INCIDENT_MAN_TREX = ‘ ‘ (empty value) à turn on TREX Search Engine
  • SMWORK_INCIDENT_MAN_TREX = ‘X’  à turn off TREX Search Engine  


For SAP Solution Manager 7.1, TREX is used only for full-text search. Attribute search, like search by status or Business Partner ID, is part of the CRM Reporting Framework.

Nevertheless, full-text and attribute search can be combined. For example, you can search for incidents with the status New and the key words support team determination in the long text.

5.1 Full-Text Search in Work Center

By using queries, you can search within the long text of support messages or incidents / problems in the Incident Management Work Center.

There are four types of TREX search methods:

     1.    Linguistic Search: All grammatical forms of the search term will be listed on the result page (i.e. plural, singular and flexion). For example if you enter mice, the system also looks for


     2.    Fuzzy Search: This search method is error-tolerant and also includes similar search terms. You can search for words or phrases that are spelled like the search phrase, according to an

           adjustable editing-distance similarity criterion. You get results even for misspelled queries, the fuzziness is adjustable.

           For example, if you enter president, the system also finds documents that contain presidant.

    3.    Exact Search: With this method, you find only documents that contain exactly the search term or phrase that you entered. You can also use placeholders with this search method (?, *).

    4.    Exclude Phrase: This search method excludes complete phrases, which you don’t want to be listed on the result page.

The example below shows how to define a query for full-text search (for Incidents & Problems) in the Incident Management Work Center:

     1.    Go to the Queries link on the side bar.

    2.    Select Define New Query.

    3.    Select the object type Incidents & Problems Advanced Search and continue with Next.

 In this example, you define a full-text query for incidents & problems (SMIN & SMPR). Choose Message Advanced Search to specify a query to search within the long text of support messages (SLFN).

   4.   In the Long Text Page Area, specify the search term and the search method. Continue with Apply.

   5.   Enter a query description and select a category. Continue with Finish.

 You can add search criteria of your query to the Quick Search. This enables you to change the search criteria more easily. In the example below, the criterion long text has been added to the Quick Search.

        To add specific search criteria to the Quick Search, please do the following:

         1. Select your query and go to Change Query.

          2. Select Criteria Personalization. Proceed with Apply.

          3. Add criteria to the Quick Search. Proceed with Apply.

5.2 Full-Text Search in SAP WebClient

In the SAP WebClient, TREX search engine is used for a full-text search within:

  • incidents & problems
  • knowledge articles
  • change requests

This section explains how to do a full-text search in the SAP WebClient. The important aspects are shown in an example of how to search within the long text of incidents.

  1. Select Incident Management -> Incidents, as shown in the figure below

        2.  In the Search Criteria page area, add a new search line by selecting the “+” button, as shown below.

        3.  Select Long Text from the first drop-down list to specify the search criterion.

         4.  Select a search method from the second drop-down list, as shown below.

         5.  Enter a search term and continue with Search.

          6.  The TREX search engine returns a list of all incidents where the search term specified before appears in the long text.


6.1 Architecture and Hardware Requirements for TREX Search Engine

  1. Architecture
    • Three main kinds of installations can be distinguished:

          ° Small: TREX is installed on a PC or shares a server with other applications. This is sufficient for up to about 100 000 documents or 1 million data records

          ° Medium: TREX is installed on its own host in a small networked landscape. This is sufficient for up to about 1 million documents or 10 million data records.

          ° Large: TREX is installed on several servers in a large distributed landscape. This is sufficient for 10 million or more documents or data records.

    • In each case, the volumes cited are for MS Office documents up to about 100 KB or text documents up to 10 KB on average
    • Individual data records for the attribute engine are much smaller
    • TREX can work with 1 billion data records
    • TREX 7.1 is enabled to run in an adaptive computing environment featuring high availability and dynamic scaling with highly automated administration

     2. Hardware

    • Depending on the application scenario, when running under Windows, TREX requires approximately the following hardware:

        ° Small: PC with P4 class CPU (with clock speed at least 1 GHz), 1 GB RAM, and 20 GB hard drive. If TREX shares a server, it needs at least 1 CPU, 1 GB RAM, and 20 GB storage for


        ° Medium: Server with 2 P4 class CPUs, at least 4 GB RAM, and 40 GB storage. These requirements are doubled if TREX runs together with SAP Enterprise Portal, SAP R/3, or SAP

         CRM.                                                                                                                                                                                                                                                                                                                    ° Large: Servers with a total of at least 4 P4 class CPUs, 8 GB RAM, and 120 GB storage. For very large applications, TREX can use 24 or more blade servers.

    • Hardware requirements for other operating systems are similar
    • TREX 7.1 has been developed to run smoothly on blade server hardware

    3.  Operating System

    • TREX 7.1 runs on Linux, MS Windows, HP-UX, AIX and Solaris

6.2 What is the Difference between SAP NetWeaver Enterprise Search and TREX Search?

SAP NetWeaver Enterprise Search is a search solution which provides unified, comprehensive, and secure real-time access to enterprise data and information from within and outside of a company. It is delivered as an appliance and integrates TREX’s search and classification capabilities.

Compared to the “plain” TREX search where each source has a separate user interface, the Enterprise Search enables a centralized search access to all sources, i.e. users can enter their search requests and receive the search results through a single browser-based user interface (Search UI).

For more information on SAP NetWeaver Enterprise Search, please visit:

6.3 How to Use a Saved Search?

In the SAP WebClient, you can save your search criteria for further use:

  1. Enter your criteria in the search fields on the search page.
  2. In the Save Search As field, enter a name for the search.
  3. Proceed with Save.

    The figure below shows an example on how to save a search for the term team determination.

To perform a search with your saved criteria, go to the search menu in the header area, select your saved search under Saved Searches and proceed with Go as shown in the figure below.

For more information on using saved searches, please refer to the SAP Online Help documentation:

6.4 What is a Simple Search and How to Use it?

Simple search is a functionality of the SAP NetWeaver Enterprise Search. It is a search based on keywords which the user enters in a single search field.

The simple search is integrated in the central search, which is located in the header area of the navigation frame of the SAP WebClient.

For more information, please refer to the SAP Online Help documentation:

Enterprise Search Integration:

Simple Search User Interface

Central Search


  • No labels