SAP OSS Notes

1272424 SAP OSS Note - Delegation of IF_SEARCH_REQUEST->SEARCH an appliance (RFC)








SAP OSS Note 1272424 version 0001 contains details of a know issue related to Delegation of IF_SEARCH_REQUEST->SEARCH an appliance (RFC). This includes any associated symptoms and instructions on how to fix it, see below for full details. Also check out the comments section to view/add related contributions, questions or screen shots, based on real life experience of this oss note and problem.

...For more information about the SAP support system known as OSS please check out the SAP OSS NOTES SECTION, whih includes how to download & implement them onto your SAP system using transaction code SNOTE.

Note 1272424 Details:






When does this problem occur

You cannot use the Enterprise Search appliance.
If you use the Enterprise Search appliance (that is, all indexes are managed in a central system), you must delegate the search to this system (Remote Function Call).

Previously, this function was not available.


Description of problem

Delegation, Remote Function Call, RFC


Cause of the problem and Pre-requisites

Previously, this function was not available.


Solution instructions

You cannot implement the function in advance.
It is delivered in Support Package 3.


---------- Developer documentation ----------

Overview of changes:
replace data type of MV_TERM_ACTION ( -> TREXD_TERM_ACTION )
create structure ESH_S_IF_SCOPE and ESH_T_IF_SCOPE
-> remove scope structure LTY_T_SCOPE
create structure ESH_S_IF_REQUEST_PACKED_CR (packed request data - member variables)

create structure ESH_S_IF_RESPONSES_PACKED (packed responses / header + data)
create structure ESH_T_IF_RESPONSES_PACKED (packed responses / header + data)
create structure ESH_T_IF_RESPONSES_LIST_PACKED (packed responses)

New Method CL_ESH_IF_SEARCH_REQUEST->GET_SEARCH_REQUEST_PACKED
New Method CL_ESH_IF_SEARCH_REQUEST->SEARCH_APPLIANCE_RFC
Adjust method CL_ESH_IF_SEARCH_REQUEST->SEARCH ( call of FM ESH_IF_SEARCH_REQUEST_CR )

new Method CL_ESH_IF_SEARCH_REQUEST->SET_SEARCH_REQUEST_PACKED

Note 1272424 Correction instructions:



NOTE: Only source text changes are displayed here

*$*$----------------------------------------------------------------$*$*
*$ CORRECTION INSTRUCTIONS 0120031469 0000707776 $*
*$ Prerequisite corr. inst. 0120031469 0000663691 Note 0001244010 $*
*$ 0120031469 0000670500 Note 0001249482 $*
*$ 0120031469 0000679373 Note 0001249482 $*
*$ 0120031469 0000692142 Note 0001249482 $*
*$ 0120031469 0000697869 Note 0001249482 $*
*$--------------------------------------------------------------------$*
*$ VALID FOR : $*
*$ Software Component SAP_BASIS SAP Basis component $*
*$ Release 701 To SAPKB70103 $*
*$*$----------------------------------------------------------------$*$*
*&---------------------------------------------------------------------*
*& Object METH CL_ESH_IF_SEARCH_REQUEST
*& CONSTRUCTOR
*& Object header CLAS CL_ESH_IF_SEARCH_REQUEST
*&---------------------------------------------------------------------*
...
METHOD constructor.

DATA: lt_param_val TYPE esh_t_adm_param.

*>>>> START OF DELETION <<<<<
* set tracing settings as customized
*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<

* set tracing settings as customized
*>>>> END OF INSERTION <<<<<<
...
CALL METHOD me->set_tracing_parameters
EXPORTING
iv_log_request = abap_true
iv_log_request_internal_repres = abap_true
iv_get_rt_query_gross = abap_true
iv_get_rt_trex_gross = abap_true
iv_get_rt_kernel_net = abap_true.
ENDIF.
*>>>> START OF DELETION <<<<<

ENDMETHOD.
*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<

* RFC destination is set -> Enterprise Search is running central
mv_appliance_destination = cl_esh_adm_param=>get_hub_destination( ).

ENDMETHOD.
*>>>> END OF INSERTION <<<<<<
...
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*& Object METH CL_ESH_IF_SEARCH_REQUEST
*& DELEGATE_SEARCH_TO_APPLIANCE
*& Object header CLAS CL_ESH_IF_SEARCH_REQUEST
*&---------------------------------------------------------------------*
*>>>> START OF INSERTION <<<<
METHOD delegate_search_to_appliance.

DATA lo_resp_connect TYPE REF TO cl_esh_if_search_resp_connect.
DATA ls_request_packed_cr TYPE esh_s_if_request_packed_cr.
DATA ls_responses_packed TYPE esh_s_if_responses_packed.
DATA lt_messages TYPE bapirettab.
* DATA ls_messages LIKE LINE OF lt_messages. -->> ToDo SP3
DATA lr_rawdata TYPE REF TO data.
DATA lx_esh_int_engine TYPE REF TO cx_esh_int_engine.
DATA lx_esh_if_engine TYPE REF TO cx_esh_if_engine.

FIELD-SYMBOLS LIKE LINE OF
ls_responses_packed-responses.
* FIELD-SYMBOLS LIKE LINE OF lt_messages.


* serialize search request parameters
get_search_request_packed( IMPORTING es_request_packed_cr =
ls_request_packed_cr ).

* call Enterprise Search Appliance (RFC)
CALL FUNCTION 'ESH_IF_SEARCH_REQUEST_CR'
DESTINATION mv_appliance_destination
EXPORTING
is_request_packed_cr = ls_request_packed_cr
IMPORTING
es_responses_packed = ls_responses_packed
et_messages = lt_messages.

* create response instances
IF ls_responses_packed IS NOT INITIAL.
LOOP AT ls_responses_packed-responses ASSIGNING
.
IF -packed_data IS NOT INITIAL.
* unpack result raw data
TRY.
lr_rawdata =
cl_esh_int_data_blueprint=>create_data_from_blueprint(
-packed_data-blueprint ).
CATCH cx_esh_int_engine INTO lx_esh_int_engine. "ToDo SP3
IF lo_resp_connect IS BOUND.
CREATE OBJECT lx_esh_if_engine. "ToDo SP3
lo_resp_connect->set_exception(
EXPORTING
ix_esh_if_engine = lx_esh_if_engine ).
ELSE.
RAISE EXCEPTION TYPE cx_esh_if_engine.
ENDIF.
ENDTRY.
cl_esh_int_config_tools=>unpack_cluster( EXPORTING is_data
= -packed_data
CHANGING cr_data
= lr_rawdata
ct_return_codes = lt_messages ).
* create response instance
lo_resp_connect = cl_esh_if_search_resp_connect=>get_instance(
mv_connector_id = -connector_id
mv_request_type_id = -request_type_id
it_raw_data = lr_rawdata
iv_total_results = -number_of_total_results
it_attr_values = -dist_attr_values
it_attr_ranges = -dist_attr_ranges ).
mo_responses->add_response( lo_resp_connect ).
ENDIF.
ENDLOOP.
ENDIF.

* error handling
IF lt_messages IS NOT INITIAL.
* -->> ToDo SP3
* IF lo_resp_connect IS BOUND.
* LOOP AT lt_messages ASSIGNING .
* CREATE OBJECT lx_esh_if_engine.
* lo_resp_connect->set_exception(
* EXPORTING
* ix_esh_if_engine = lx_esh_if_engine ).
* ENDLOOP.
* ELSE.
* ro_responses = mo_responses.
* RAISE EXCEPTION lx_esh_if_engine.
* ENDIF.
* -->> ToDo SP3
ENDIF.

ENDMETHOD.
*>>>> END OF INSERTION <<<<<<
...
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*& Object METH CL_ESH_IF_SEARCH_REQUEST
*& GET_AUTHORIZATION_QUERY
*& Object header CLAS CL_ESH_IF_SEARCH_REQUEST
*&---------------------------------------------------------------------*
...
FIELD-SYMBOLS: TYPE any,
LIKE LINE OF lt_node_list,
LIKE LINE OF lt_pos_query,
*>>>> START OF DELETION <<<<<
LIKE LINE OF lt_string,
*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<
* LIKE LINE OF lt_string,
*>>>> END OF INSERTION <<<<<<
...
LIKE LINE OF et_constraints,
LIKE LINE OF lt_attr_list,
TYPE trexs_hint,
TYPE string,
TYPE lty_token_type,
*>>>> START OF DELETION <<<<<
TYPE esh_s_adm_param,
*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<
* TYPE esh_s_adm_param,
*>>>> END OF INSERTION <<<<<<
...
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*& Object METH CL_ESH_IF_SEARCH_REQUEST
*& GET_SEARCH_REQUEST_PACKED
*& Object header CLAS CL_ESH_IF_SEARCH_REQUEST
*&---------------------------------------------------------------------*
*>>>> START OF INSERTION <<<<
METHOD get_search_request_packed.

es_request_packed_cr-search_date = mv_search_date.
es_request_packed_cr-search_terms = mv_search_terms.
es_request_packed_cr-search_text = mv_search_text.
es_request_packed_cr-start_index = mv_start_index.
es_request_packed_cr-end_index = mv_end_index.
es_request_packed_cr-search_connectors = mt_search_connectors.
es_request_packed_cr-scope = mt_scope.
es_request_packed_cr-term_action = mv_term_action.
es_request_packed_cr-search_query = mt_search_query.
es_request_packed_cr-internal_query = mt_internal_query.
es_request_packed_cr-sort_attributes = mt_sort_attributes.
es_request_packed_cr-gnav = ms_gnav.
es_request_packed_cr-attr_select_options = mt_attr_select_options.
es_request_packed_cr-no_of_hits = mv_no_of_hits.
es_request_packed_cr-attr_dist_values = mt_attr_dist_values.
es_request_packed_cr-attr_dist_ranges = mt_attr_dist_ranges.
es_request_packed_cr-resolved_scope = mt_resolved_scope.
es_request_packed_cr-log_request = mv_log_request.
es_request_packed_cr-log_internal_repres = mv_log_internal_repres.
es_request_packed_cr-get_rt_query_gross = mv_get_rt_query_gross.
es_request_packed_cr-get_rt_trex_gross = mv_get_rt_trex_gross.
es_request_packed_cr-get_rt_kernel_net = mv_get_rt_kernel_net.

ENDMETHOD.
*>>>> END OF INSERTION <<<<<<
...
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*& Object METH CL_ESH_IF_SEARCH_REQUEST
*& SEARCH
*& Object header CLAS CL_ESH_IF_SEARCH_REQUEST
*&---------------------------------------------------------------------*
...
METHOD search.

DATA:
*>>>> START OF DELETION <<<<<
* lo_responses TYPE REF TO cl_esh_if_search_responses,
lo_resp_connect TYPE REF TO cl_esh_if_search_resp_connect,
*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<
lo_resp_connect TYPE REF TO cl_esh_if_search_resp_connect,
*>>>> END OF INSERTION <<<<<<
...
FIELD-SYMBOLS: LIKE LINE OF mt_resolved_scope,
LIKE LINE OF lt_requested_lang,
LIKE LINE OF lt_t002_subst,
LIKE LINE OF lt_responses.

*>>>> START OF DELETION <<<<<
IF mo_responses IS INITIAL.
*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<

IF mo_responses IS INITIAL.
*>>>> END OF INSERTION <<<<<<
...
ENDIF.

SORT mt_resolved_scope.
DELETE ADJACENT DUPLICATES FROM mt_resolved_scope.
*>>>> START OF DELETION <<<<<

IF lines( mt_resolved_scope ) GT 1 AND ms_gnav IS INITIAL AND
mv_parallelization = abap_true.
*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<

IF mv_appliance_destination IS NOT INITIAL.

* delegate search to ES appliance (RFC)
delegate_search_to_appliance( ).

ELSE.

IF LINES( mt_resolved_scope ) GT 1 AND ms_gnav IS INITIAL AND
mv_parallelization = abap_true.
*>>>> END OF INSERTION <<<<<<
...
ENDIF.

ro_responses = mo_responses.
*>>>> START OF DELETION <<<<<

ENDMETHOD.
*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<

ENDIF.

ENDMETHOD.
*>>>> END OF INSERTION <<<<<<
...
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*& Object METH CL_ESH_IF_SEARCH_REQUEST
*& SEARCH_MORE_CONNECTORS
*& Object header CLAS CL_ESH_IF_SEARCH_REQUEST
*&---------------------------------------------------------------------*
...
LIKE LINE OF rt_responses_list,
LIKE LINE OF lt_handle_status,
LIKE LINE OF lt_trex_scope,
*>>>> START OF DELETION <<<<<
LIKE LINE OF lt_handles,
TYPE esh_s_adm_param.
*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<
LIKE LINE OF lt_handles.
* TYPE esh_s_adm_param.
*>>>> END OF INSERTION <<<<<<
...
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*& Object METH CL_ESH_IF_SEARCH_REQUEST
*& SEARCH_ONE_CONNECTOR
*& Object header CLAS CL_ESH_IF_SEARCH_REQUEST
*&---------------------------------------------------------------------*
...
FIELD-SYMBOLS:
LIKE LINE OF lt_indexes,
LIKE LINE OF lt_constraints,
*>>>> START OF DELETION <<<<<
LIKE LINE OF lt_query,
TYPE trexs_hint,
TYPE table,
TYPE esh_s_adm_param,
*>>>> END OF DELETION <<<<<<<
*>>>> START OF INSERTION <<<<
* LIKE LINE OF lt_query,
TYPE trexs_hint,
TYPE table,
* TYPE esh_s_adm_param,
*>>>> END OF INSERTION <<<<<<
...
*&---------------------------------------------------------------------*

Effected Objects:


(CPRI) - CL_ESH_IF_SEARCH_REQUEST
(METH) - CL_ESH_IF_SEARCH_REQUEST CONSTRUCTOR
(METH) - CL_ESH_IF_SEARCH_REQUEST DELEGATE_SEARCH_TO_APPLIANCE
(METH) - CL_ESH_IF_SEARCH_REQUEST GET_AUTHORIZATION_QUERY
(METH) - CL_ESH_IF_SEARCH_REQUEST GET_SEARCH_REQUEST_PACKED
(METH) - CL_ESH_IF_SEARCH_REQUEST SEARCH
(METH) - CL_ESH_IF_SEARCH_REQUEST SEARCH_MORE_CONNECTORS
(METH) - CL_ESH_IF_SEARCH_REQUEST SEARCH_ONE_CONNECTOR

Solution instructions


Please import the corrections attached to this OSS note into your SAP system using SNOTE.

You can also view the full details of this OSS note and download it to your SAP system ready for implementation using transaction code SNOTE. Once it has been downloaded you can read the full details, check out any installation instructions including manual changes and see if there are any pre-requisites.

You can also check if a new version of note 1272424 has been released as well as see if the note is valid for your current SAP system landscape.

Check if SAP OSS note 1272424 has already been downloaded and is valid


To check if this note has already been download, what status it has and if it is valid for your system first execute t-code SNOTE and click on the SAP Note Browser icon
Icon used to execute SAP Note Browser report within SNOTE

From here you can just enter the note number 1272424 and press execute. If the note already exists it's details will be displayed. See here for full step by step instructions on how to check if an SAP note has been downloaded and is valid for your system.



If note 1272424 does not exist on your system you will receive the message "Unable to find SAP Note that meets specified criteria"
Icon used to execute SAP Note Browser report within SNOTE

If this is the case you will need to download the note to you SAP system also using transaction SNOTE. For further details see Download note using SNOTE. Even if it does exist you may still want to check if you have downloaded the latest version of the note.

Alternatively you can find full details of this note on the SAP service market place(SNumber / Service market place login will be required)