版权声明:署名,允许他人基于本文进行创作,且必须基于与原先许可协议相同的许可协议分发本文 (Creative Commons)
from SAP help
If you want to use Enterprise Search in applications that use ABAP CDS-based search models, you first have to create the connection between the ABAP system of Enterprise Search and SAP HANA. Compared to the standard configuration, there are various points you need to consider.
You have installed SAP HANA in revision 102 or higher.
Log on to the SAP NetWeaver system and launch the Implementation Guide (IMG) by using transaction SPRO. Navigate to the node Search and Operational Analytics Common Settings for Operational Analytics and Enterprise Search Configure Indexing Define TREX/BWA Destination or SAP HANA Database Connection . When you launch the Customizing activity, the ABAP program ESH_ADM_SET_TREX_DESTINATION starts.
If you are performing the initial configuration of the Enterprise Search system, choose Use Primary DB Connection of SAP HANA: STANDARD and then Execute.
If you are using an existing Enterprise Search system that is already configured, do not change the selected database connection. Switch to SAP HANA studio. To assign the required authorizations to the SAP HANA users, execute the following SQL statements as the SAP HANA system user: If you are performing the initial configuration of the Enterprise Search system, execute the following SQL statements:
GRANT EXECUTE ON SYS.ESH_CONFIG TO <SAP HANA Primary DB Connection User>;
GRANT EXECUTE ON SYS.ESH_SEARCH TO <SAP HANA Primary DB Connection User>;
GRANT SELECT ON _SYS_RT.ESH_MODEL TO <SAP HANA Primary DB Connection User>;
GRANT SELECT ON _SYS_RT.ESH_MODEL_PROPERTY TO <SAP HANA Primary DB Connection User>;
GRANT EXECUTE ON SYS.TREXVIADBSL TO <SAP HANA Primary DB Connection User>;
GRANT EXECUTE ON SYS.TREXVIADBSLWITHPARAMETER TO <SAP HANA Primary DB Connection User>;
You can find the name of the user of the primary database connection (SAP HANA Primary DB Connection User) in the ABAP system in the menu System Status... in the area Database Data in the field Owner. If you are using an existing Enterprise Search system that is already configured, execute the following SQL statements instead:
GRANT EXECUTE ON SYS.ESH_CONFIG TO <SAP HANA Primary DB Connection User>;
GRANT EXECUTE ON SYS.ESH_SEARCH TO <SAP HANA Primary DB Connection User>;
GRANT SELECT ON _SYS_RT.ESH_MODEL TO <SAP HANA Primary DB Connection User>;
GRANT EXECUTE ON SYS.TREXVIADBSL TO <SAP HANA Search User>;
GRANT EXECUTE ON SYS.TREXVIADBSLWITHPARAMETER TO <SAP HANA Search User>;
You can find the name of the user of the database connection for the search (SAP HANA Search User) in the ABAP system: Start the program ESH_ADM_SET_TREX_DESTINATION and check whether the primary or secondary database connection is used. If the primary database connection is selected, use the user name of the primary database connection as the name of the user of the database connection for the search (SAP HANA Search User).
If the secondary database connection is selected, the name of the database connection is displayed in the relevant field (DB Connection Name). Start transaction DBCO to find the user name that is assigned to this database connection. This user name corresponds to the user of the database connection for the search (SAP HANA Search User). If you are using the secondary database connection in an existing Enterprise Search system that has already been configured (see the setting under ESH_ADM_SET_TREX_DESTINATION), you must grant authorization to the user of the database connection for the search (SAP HANA Search User) to execute the SQL statement SELECT on the database schema (SAPSID) of the primary database connection. GRANT SELECT ON SCHEMA TO ;