Skip to Content
Author's profile photo Luke Marson

Setting up NetWeaver Embedded Search (TREX) for SAP HCM Talent Management EhP4, 5 and 6

*Updated: 07/12/2010, 07/12/2012, 24/05/2013 and 03/07/2013*

With the release of the new SAP HCM Talent Management functionality in Enhancement Pack 4 (EhP4) SAP have introduced search capabilities via  the Embedded Search 7.1 component. Embedded Search leverages TREX and this must be setup to use searches in Talent Management from EhP4, which also includes SAP Talent Visualization by Nakisa (STVN) SuccessionPlanning / TalentHub for HR & Executives.

In this blog I will cover the key areas to setup TREX to use Talent Management and STVN SuccessionPlanning/ TalentHub for HR & Executives. I will not be covering the installation of TREX and creating the RFC connection in SAP.

Before I start it is worth noting this excellent article by Susanne Janssen on Quick Sizer – Getting started. The SAP NetWeaver Quick Sizing tool can be used to determine the hardware requirements for the TREX system and this SDN Blog details how to use the Quick Sizer (it also includes the link to the Quick Sizer).

Overview of the Steps

The basic steps required to setup TREX are:

1. Activate the Enterprise Search business package and the ESH Cockpit service
2. Define the RFC link to TREX
3. Create the Search Object Connectors
4. Index the Search Object Connectors
5. Schedule regular indexing of the Search Object Connectors

Now we’ll cover the steps in detail, especially in regards to differences in the process between EhP4, EhP5, and EhP6.

Activate the Enterprise Search business package and the ESH Cockpit service

The first step is to activate the business package for the Embedded Search and then enable the ESH Cockpit, which is used to perform various tasks with TREX.

First, head to the Switch Framework Customizing transaction (tcode SFW5). In the ENTERPRISE_BUSINESS_FUNCTIONS section look for ERP_ENTERPRISESEARCH and activate it.

SFW5

Now head to Maintain Services (tcode SICF). Navigate to default_host/sap/es/cockpit and activate the link.

SICF

Define the RFC link to TREX

Next up is defining the RFC link to the TREX system. This is done via a report ESH_ADM_SET_TREX_DESTINATION in SE38. Enter the name of the RFC connection in the “RFC destination of TREX”‘ textbox and click Execute.

ESH_ADM_SET_TREX_DESTINATION

Create the search object connectors

Once this is done it is ready to launch the ESH Cockpit and create the Search Connector Objects (tcode ESH_COCKPIT). This is a Web Dynpro application that will open up in Internet Explorer.

ESH_COCKPIT

Hit the Create button and the “Create Search Object Connector” window will open. Make sure Software Component EA-HRGXX is selected at the top of the window. At the top left of the Template table press the Table selection menu button and select the Select All option.

Note for EhP6: From EhP6 you should only select the connectors beginning with HRTMC unless you have BI setup and wish to also index Talent Management data for BI. if BI is not setup then this will cause an error. See SAP KBA 1851024 for more details.

Now press Create Connector.

ESH_COCKPIT - Create Connector

The NetWeaver waiting icon will appear for a few seconds and then you should be returned to the main ESH Cockpit screen with all the Search Connector objects listed. They should all have the status of New.

ESH_COCKPIT

Now you have to wait for TREX to prepare the Search Connector objects. If you hit Refresh you will see the status of the objects change from New to Preparing and, once done, to Prepared.

ESH_COCKPIT

In EhP6 the indexing of the Search Object connectors should start automatically. In EhP4 and EhP5 the Search Object connectors have to be indexed once they have been created and are in status Prepared.

Index the Search Object Connectors (EhP4 and EhP5 only)

Now the Search Object Connectors have been created they need to be indexed. The indexing of the objects is what allows the searches to work. Usually any problems with missing objects or searches are down to the indexes either being out of date or needing to be re-indexed.

The Search Object connectors are indexed in report ESH_ADM_ INDEX_ALL_SC in  SE38. In EhP5 real-time indexing can also be scheduled here. Search Object Connectors can also be created and deleted here, although it is recommended to create them in the Enterprise Search Cockpit.

In the main screen make sure the product EA-HRGXX is selected and that only Schedule Initial Indexing is selected. Hit Execute.

ESH_ADM_INDEX_ALL_SC

This will then go to a screen that states “Step 3: Indexing all Search Object Connectors”. Not very helpful, but no message is a good message.

If you head back to the ESH Cockpit and hit Refresh you’ll now see the status of some of the Search Object Connectors has changed to either Scheduled for Indexing or Indexing.

ESH_COCKPIT

It’s now a matter of time while you wait for the status of all Search Object Connectors to change to Active. Once this has happened then indexing is complete!

ESH_COCKPIT

The time it takes to index each Search Object Connector depends on the volume of data and can take anything from 2 minutes up to 2 hours. For very large datasets it can upwards of 15 minutes for each index.

Index the Search Object Connectors (EhP6)

From EhP6 the Search Object connectors are indexed directly in the Enterprise Search Cockpit. This should start automatically after the indexes have reached Prepared status. If not, this can be done by selecting Schedule Indexing in the Actions menu and then selecting the checkbox in the Start Immediately column for each of the Search Object Connectors. They can also be scheduled for real-time indexing in this same screen by selecting the checkbox in the Real-Time Indexing column for each of the Search Object Connectors.

EhP6_indexing.png

Schedule regular delta-indexing of the Search Object Connectors

In EhP5 the real-time indexing is setup in the report that indexes the Search Object connectors. In EhP6 it is done in the Enterprise Search Cockpit by selecting Schedule Indexing in the Actions menu and then selecting the checkbox in the Real-Time Indexing column for each of the Search Object Connectors.

In EhP4 it is necessary for the Search Object Connectors to be delta indexed periodically with a report to make sure they have the latest data available in searches. I recommend scheduling the delta re-indexing for every 5 minutes for small datasets, 10 minutes for medium datasets and 15 minutes for large datasets.

To setup the delta indexing run report ESH_IX_PROCESS_CHANGE_POINTERS in SE38. In the main screen make sure the product EA-HRGXX is selected (or your own product if you have customizing TREX) and that Exit processing after [hours] is set to blank (to prevent the job terminating after the aforementioned time). Enter a time in seconds in the Delay [seconds] box for the interval in which each Search Object Connector will be re-indexed. Hit Execute.

ESH_IX_PROCESS_CHANGE_POINTERS

It is worth noting that although this is SAP’s recommendation, it is possible to schedule a time to close the job (around 24 hours) and ensure that Reschedule Automatically is selected. This allows the job to be “recycled” rather than running continuously.

Setting up authorization change pointers for real-time indexing

The next step is to setup the delta indexing of the Authorizations. This indexes the Area of Responsibility and related authorizations. To do this the BAdI HRTMC_AUTHORITY_VIEW needs to be deactivated and HRTMC_AUTHORITY_VIEW_DELTA activated (SPRO > Talent Management and Talent Development > Basic Settings > Search > BAdI: Activate Delta Indexing for Authorization Data). If the SPRO path does not exist inside the Search node implement SAP note 1423708 specified below.

Once the BAdI is implemented schedule the program RPTMC_CREATE_CHANGEPOINT_AUTH in SM36 to run every few hours (depending on your volume of data). This program allows the real-time indexing to “catch” the authorization changes made.

Au voila! Now you have setup TREX for SAP HCM Talent Management.

Some notes

In EhP4, during setup of TREX you might occasionally get the error “a connection already exists”, even though this is not the case. To fix this delete the entry in table ESH_ADM_RFC_CONN.

There are several SAP notes published that should be implemented to fix bugs in TREX in EhP4. Most of these are resolved in early EhP5 support packages. These include:

  • 1249482 – Functional corrections for Enterprise Search 7.01
  • 1395703 – Positions and termination are missing for indexing
  • 1408655 – Alerts in syntax check due to unused indexes
  • 1423708 – TMC search: Delta indexing for authorization data
  • 1441190 – Error in model assignments to logical system

For all EhP versions, these note should be considered:

  • 1609890 – Enhancements for RPTMC_CREATE_CHANGEPOINT_AUTH
  • 1640804 – TMC search: “Incumbent Key Position” search field
  • 1717518 – Performance problems with authorization change pointers

Summary

TREX is not difficult to setup once you know… and now you do! Thanks goes to Michael Pappis for updating me with some information on the HRTMC_AUTHORITY_VIEW delta indexing and useful SAP notes. EhP6 information was published in the document Using the Talent Management Search with Enhancement Package 6

Assigned Tags

      28 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member
      Hi Luke, nice contribution. 

      Your next blog should be troubleshooting when TREX 7.1 doesn't work :).  We have already run into issues with TREX memory and swapping on the server side, but this is also because we haven't been using delta indexing yet and it's on a baby server.

      anyways, other tips on troubleshooting such as using esh_test_search, would be a great topic.

      your notes on ESH_IX_PROCESS_CHANGE_POINTERS was very helpful, we have always been scheduling the indexes in the front-end (esh_cockpit) application and that is much more cumbersome. 

      Author's profile photo Luke Marson
      Luke Marson
      Blog Post Author
      Hi Michael,

      If I had written about troubleshooting or configuring TREX it might have tripled my post size! 🙂

      I've had issues with memory on low spec servers but nothing too bad. Saying that, I've only implemented with small or medium datasets so there is probably more pain to come!

      I'm hoping to do a blog on how to configure the search object connectors in the future - I just have to find some time 🙂

      Best regards,

      Luke

      Author's profile photo Mcfee Maple
      Mcfee Maple
      Hi Luke

      I am trying to find to a way in CRM to activate an embedded search for Identification numbers.

      Would you be able to assist

      Mcfee

      Author's profile photo Luke Marson
      Luke Marson
      Blog Post Author
      Hi Mcfee,

      I'm afraid I don't know much about TREX for CRM, but there are some other SDN articles on TREX and CRM that might be worth reading. You can locate them via the standard SDN blog search method.

      Best of luck!

      Luke

      Author's profile photo Former Member
      Former Member
      Hi Luke,

      ya the client we were working with is retail, and the Person and Central person indexes take up alot of memory, ~350,000 employees, most of them are from terminations they have to convert, only 43,000k active.  but the full indexes takes up alot of memory for sure.

      Author's profile photo Former Member
      Former Member
      Hi Luke:

      Thanks for the well written blog.

      If I could add a touch to the verrrrry beginning, I would like to note that in order to use Embedded Search, you need to be on TREX 7.1.  TREX 7.1 is only offered on Linux or Windows servers.

      So if your environment is primarily a UNIX environment, you will need to appropriate a new server.  Just to see if SAP was kidding or not, early on we tried running Embedded Search on TREX 7.0.  They weren't kidding.

      Thanks for the work,
      Chris

      Author's profile photo Luke Marson
      Luke Marson
      Blog Post Author
      Hi Chris,

      I have to say I overlooked mentioning that so thanks for pointing it out. My post is kinda about setting it up so hopefully by this stage the user already knows they need TREX 7.1 🙂

      BR,

      Luke

      Author's profile photo Former Member
      Former Member
      Hi Luke,

      This blog is really very interesting. I have also implemented TREX search over Ep4 & I think you have missed one important factor, which is TREX SAP User should have "HR AUTHORITY VIEW" else program won't index any "CP".

      Thanks,
      Arpit

      Author's profile photo Luke Marson
      Luke Marson
      Blog Post Author
      Hi Arpit,

      When I have setup TREX in the past I have not done anything regarding a user or HR AUTHORITY. TREX almways indexes the CP objects okay so if you could pass on some more details here that would be useful for not only me but others who will use this article in the future.

      Best regards,

      Luke

      Author's profile photo Former Member
      Former Member
      i think aprit is referring to have at least have one position for a user who is performing the search to properly have an AOE - Area of Responsiblity setup using the HR relationship 741 of position to org. 
      Author's profile photo Former Member
      Former Member
      Great help....
      Author's profile photo Luke Marson
      Luke Marson
      Blog Post Author

      Thanks Latha

      Author's profile photo Michael Kronfeld
      Michael Kronfeld
      Author's profile photo Luke Marson
      Luke Marson
      Blog Post Author
      Thanks Michael!
      Author's profile photo Mcfee Maple
      Mcfee Maple
      Maintain manual entries as per note 1271899
      Get to Transaction SM30.
      Enter View:             CRMV_EXTMGR_PAR
      Maintain Server Group : parallel_generators
      Maximum Tasks : 10
      Maximum Resubm: 2
      Task Timeout Limit : 600
      Package Size : 200
      Author's profile photo Stephen Burr
      Stephen Burr

      Good article Luke.

      Few things I've learnt to add:

      1) The comment on HR_AUTHORITY_VIEW is correct regarding indexing CP. 
      To be clear, I would add to this:
      a) It is only the 741-relation of the TMS-Position to an org-unit which is the prerequisite for the TMS-user to appear in the index HRTMC_AUTHORITY_VIEW

      b) In the normal search scenarios (SuccessionPlanning - MyWorkArea and Talent Information in the portal) the TMS finds all persons that
         i) he is authorized to see and
         ii) are incumbents of positions in his Area of Responsibility (AoR)

      - The authorization i) is indexed in the index HRTMC_AUTHORITY_VIEW.
      - The assignment of org-units to the TMS-positions is indexed in HRTMC_REL_S_O_RESP.

      For other searches such as SuccessionPlanning - Employees - Employees, the user will see all employees they have authorisation to see (and not just those within AoR).

      c) The user to run the indexing jobs should not need any special HR authorisations (i.e. doesn't need to have TMS role or structural authorisations assigned)

      Regarding your advice on "ESH_IX_PROCESS_CHANGE_POINTERS":
      'Exit processing after [hours] is set to blank (to prevent the job terminating after the aforementioned time)'.
      I would recommend setting this value to 24 (hours) as this parameter controls when that instance of the job finishes IF you have checked "Reschedule automatically".  This will ensure the job log is reset every 24 hours and a job started (as opposed to continuously running the same job).
      (reference: http://help.sap.com/saphelp_NW70EHP1/helpdata/en/5c/03ba50724f4c1e8b50239ae253abe9/content.htm)

      Finally, if you are on a lower service pack then look at SAP note 1423708 ("TMC search: Delta indexing for authorization data") which significantly helps with HRTMC_AUTHORITY_VIEW as indexing. 

      Ideally get yourself on as high as possible service pack - there are lots of OSS notes released each month (~50) for Enterprise Search.

      Good Luck!

      Stephen Burr

      Author's profile photo Ady Purnama
      Ady Purnama

      Thanks for your explanation Luke, it's such a crystal clear

      However, can we setup one TREX server to several client; for an example one TREX connect to Dev, QA and production server? Is it recommended?

      Best Regards,

      Ady Purnama

      Author's profile photo Luke Marson
      Luke Marson
      Blog Post Author

      Hi Ady,

      While technically it should be possible I would not recommend it, particularly for Production. TREX is a powerful system so needs to have adequate resources available to function properly.

      Best regards,

      Luke

      Author's profile photo Former Member
      Former Member

      Hi Ady,  You can create one TREX File System with multiple TREX Instances.Also, You can install several independent TREX instances on the same host.  Check installing Guide.  https://websmp207.sap-ag.de/~sapidb/011000358700005511982005E/SR2_Single_Host.pdf Regards, Arpit

      Author's profile photo Ady Purnama
      Ady Purnama

      Thanks Luke & Arpit,

      well noted.

      Author's profile photo Former Member
      Former Member

      Hi Luke,

      I have a problem when indexing, there is a notification "Indexing suspended globally". What should I do Because indexing job can not be continued.

      Thanks,

      Regards,

      Doni

      ESH_COCKPIT.PNG

      Author's profile photo Luke Marson
      Luke Marson
      Blog Post Author

      Which EhP version are you using? The Suspend functionality is reasonably new.

      Author's profile photo Former Member
      Former Member

      Hi Luke,

      we use EHP Ver 6.

      Thanks,

      Author's profile photo Michael Kronfeld
      Michael Kronfeld

      You can try to resume the indexing process manually. See

      Controlling Real-Time Indexing - Search and Operational Analytics - SAP Library

      Author's profile photo Former Member
      Former Member

      Hi Michael,

      Thanks, this issue already resolved.

      thanks all...

      Author's profile photo Former Member
      Former Member

      Hi All,

      I am working on Nakisa Talent management functionality with HCM EHP7.

      I have a problem when selecting Software component EA-HRGXX.


      I am unable to see EA-HRGXX from selection list.


      could you please guide me here.



      Thanks

      Sharif,

      Author's profile photo Former Member
      Former Member

      Hi,

      During indexing I have encountered a following error as per attached snapshot. kindly suggest .

      Error:Variant does not exists.

      ESH.PNG

      Regards

      Jatin Kashyap

      Author's profile photo Former Member
      Former Member

      I am using EHP7