SAP Function Modules

COM_SES_SEARCH_OBJECTS SAP Function module - Search Objects







COM_SES_SEARCH_OBJECTS is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name COM_SES_SEARCH_OBJECTS into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: COM_SES_SEARCH
Released Date: Not Released
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM COM_SES_SEARCH_OBJECTS - COM SES SEARCH OBJECTS





CALL FUNCTION 'COM_SES_SEARCH_OBJECTS' "Search Objects
  EXPORTING
    it_query_entries =          " trext_query_entries  Search Query
*   iv_language =               " laiso         Language of the Search Request
*   it_object_type =            " com_search_tt_object_type_key  List of Searched Object Types
*   it_req_attributes =         " trext_attributes  Requested Attributes
*   it_req_join_attributes =    " trext_join_attributes  Attributes with indexId and join path
*   it_sort_attributes =        " trext_sort_attributes  Sort Attributes
*   iv_result_from = 1          " i             From Hit Number
*   iv_result_to = 20           " i             To Hit Number
*   iv_request_flags = 0        " trex_rfc-request_flag  Request Flags, Semantics: 128 = distinct
*   iv_requested_results = 1    " trex_rfc-requested_results  Requested Results: 1 = docs, 8 = hit attrs / doc, 9 = both
*   iv_count_only =             " trex_rfc-flag  Kennzeichen
*   iv_auth_check_limit =       " i             Maximum Number of Objects at Authorization Check
*   iv_search_by_relation =     " com_se_tv_search_by_rel  X = Search by Relation
*   it_snippet_attributes =     " trext_attributes  Snippets for text attributes
*   is_attr_dist_global =       " trexs_attr_dist_global  Attribute distribution: Global settings
*   it_stat_info_attrs =        " trext_attributes  Attributes for statistical Info
*   iv_statistical_info = ' '   " boole_d       'X' - with statistical info
  IMPORTING
    et_index_infos =            " com_search_tt_index_list_objty  Index IDs for Object Types in Table COM_SE_BUSOBJTY
    et_result_items =           " com_search_tt_result_item  Search Results List
    et_attr_dist_values =       " trext_attr_dist_values  Attribute distribution values
    et_suggested_terms =        " trext_suggested_term  DidYouMean
    ev_no_of_hits =             " i             Number of Hits in the Hit List
    ev_no_of_all_hits =         " i             Number of All Hits
    ev_auth_check_is_complete =   " boole_d     X = All Search Engine Hits Were Checked for Authorization
    ev_return_code =            " trex_rfc-return_code  Return Code of the Search Engine
    ev_return_text =            " trex_rfc-return_text  Return Text of the Search Engine
    ev_component_runtime =      " trexs_component_runtime  Runtime of Search Engine
    ev_run_time_se =            " i             Runtime of the Search Engine, Total
    ev_run_time_bo =            " i             Runtime of the Business Object Per Hit
  EXCEPTIONS
    CONVERSION_ERROR = 1        "               Error Converting to UTF-8
    ERROR = 2                   "               Error, See SYST Variables
    INDEX_ID_NOT_DEFINED = 3    "               Index ID Unknown
    SE_NOT_SUPPORTED = 4        "               Error Accessing the Search Engine
    BUSOBJ_NOT_SUPPORTED = 5    "               Business Object Is Not Supported By the Current Class
    INTERNAL_ERROR = 6          "               Internal Error
    .  "  COM_SES_SEARCH_OBJECTS

ABAP code example for Function Module COM_SES_SEARCH_OBJECTS





The ABAP code below is a full code listing to execute function module COM_SES_SEARCH_OBJECTS including all data declarations. The code uses the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the original method of declaring data variables up front. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8).

DATA:
ld_et_index_infos  TYPE COM_SEARCH_TT_INDEX_LIST_OBJTY ,
ld_et_result_items  TYPE COM_SEARCH_TT_RESULT_ITEM ,
ld_et_attr_dist_values  TYPE TREXT_ATTR_DIST_VALUES ,
ld_et_suggested_terms  TYPE TREXT_SUGGESTED_TERM ,
ld_ev_no_of_hits  TYPE I ,
ld_ev_no_of_all_hits  TYPE I ,
ld_ev_auth_check_is_complete  TYPE BOOLE_D ,
ld_ev_return_code  TYPE TREX_RFC-RETURN_CODE ,
ld_ev_return_text  TYPE TREX_RFC-RETURN_TEXT ,
ld_ev_component_runtime  TYPE TREXS_COMPONENT_RUNTIME ,
ld_ev_run_time_se  TYPE I ,
ld_ev_run_time_bo  TYPE I .

DATA(ld_it_query_entries) = 'Check type of data required'.
DATA(ld_iv_language) = 'Check type of data required'.
DATA(ld_it_object_type) = 'Check type of data required'.
DATA(ld_it_req_attributes) = 'Check type of data required'.
DATA(ld_it_req_join_attributes) = 'Check type of data required'.
DATA(ld_it_sort_attributes) = 'Check type of data required'.
DATA(ld_iv_result_from) = 'Check type of data required'.
DATA(ld_iv_result_to) = 'Check type of data required'.

DATA(ld_iv_request_flags) = Check type of data required

DATA(ld_iv_requested_results) = 123

DATA(ld_iv_count_only) = some text here
DATA(ld_iv_auth_check_limit) = 'Check type of data required'.
DATA(ld_iv_search_by_relation) = 'Check type of data required'.
DATA(ld_it_snippet_attributes) = 'Check type of data required'.
DATA(ld_is_attr_dist_global) = 'Check type of data required'.
DATA(ld_it_stat_info_attrs) = 'Check type of data required'.
DATA(ld_iv_statistical_info) = 'Check type of data required'. . CALL FUNCTION 'COM_SES_SEARCH_OBJECTS' EXPORTING it_query_entries = ld_it_query_entries * iv_language = ld_iv_language * it_object_type = ld_it_object_type * it_req_attributes = ld_it_req_attributes * it_req_join_attributes = ld_it_req_join_attributes * it_sort_attributes = ld_it_sort_attributes * iv_result_from = ld_iv_result_from * iv_result_to = ld_iv_result_to * iv_request_flags = ld_iv_request_flags * iv_requested_results = ld_iv_requested_results * iv_count_only = ld_iv_count_only * iv_auth_check_limit = ld_iv_auth_check_limit * iv_search_by_relation = ld_iv_search_by_relation * it_snippet_attributes = ld_it_snippet_attributes * is_attr_dist_global = ld_is_attr_dist_global * it_stat_info_attrs = ld_it_stat_info_attrs * iv_statistical_info = ld_iv_statistical_info IMPORTING et_index_infos = ld_et_index_infos et_result_items = ld_et_result_items et_attr_dist_values = ld_et_attr_dist_values et_suggested_terms = ld_et_suggested_terms ev_no_of_hits = ld_ev_no_of_hits ev_no_of_all_hits = ld_ev_no_of_all_hits ev_auth_check_is_complete = ld_ev_auth_check_is_complete ev_return_code = ld_ev_return_code ev_return_text = ld_ev_return_text ev_component_runtime = ld_ev_component_runtime ev_run_time_se = ld_ev_run_time_se ev_run_time_bo = ld_ev_run_time_bo EXCEPTIONS CONVERSION_ERROR = 1 ERROR = 2 INDEX_ID_NOT_DEFINED = 3 SE_NOT_SUPPORTED = 4 BUSOBJ_NOT_SUPPORTED = 5 INTERNAL_ERROR = 6 . " COM_SES_SEARCH_OBJECTS
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 5. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 6. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_et_index_infos  TYPE COM_SEARCH_TT_INDEX_LIST_OBJTY ,
ld_it_query_entries  TYPE TREXT_QUERY_ENTRIES ,
ld_et_result_items  TYPE COM_SEARCH_TT_RESULT_ITEM ,
ld_iv_language  TYPE LAISO ,
ld_et_attr_dist_values  TYPE TREXT_ATTR_DIST_VALUES ,
ld_it_object_type  TYPE COM_SEARCH_TT_OBJECT_TYPE_KEY ,
ld_et_suggested_terms  TYPE TREXT_SUGGESTED_TERM ,
ld_it_req_attributes  TYPE TREXT_ATTRIBUTES ,
ld_ev_no_of_hits  TYPE I ,
ld_it_req_join_attributes  TYPE TREXT_JOIN_ATTRIBUTES ,
ld_it_sort_attributes  TYPE TREXT_SORT_ATTRIBUTES ,
ld_ev_no_of_all_hits  TYPE I ,
ld_iv_result_from  TYPE I ,
ld_ev_auth_check_is_complete  TYPE BOOLE_D ,
ld_iv_result_to  TYPE I ,
ld_ev_return_code  TYPE TREX_RFC-RETURN_CODE ,
ld_iv_request_flags  TYPE TREX_RFC-REQUEST_FLAG ,
ld_ev_return_text  TYPE TREX_RFC-RETURN_TEXT ,
ld_iv_requested_results  TYPE TREX_RFC-REQUESTED_RESULTS ,
ld_ev_component_runtime  TYPE TREXS_COMPONENT_RUNTIME ,
ld_iv_count_only  TYPE TREX_RFC-FLAG ,
ld_ev_run_time_se  TYPE I ,
ld_ev_run_time_bo  TYPE I ,
ld_iv_auth_check_limit  TYPE I ,
ld_iv_search_by_relation  TYPE COM_SE_TV_SEARCH_BY_REL ,
ld_it_snippet_attributes  TYPE TREXT_ATTRIBUTES ,
ld_is_attr_dist_global  TYPE TREXS_ATTR_DIST_GLOBAL ,
ld_it_stat_info_attrs  TYPE TREXT_ATTRIBUTES ,
ld_iv_statistical_info  TYPE BOOLE_D .

ld_it_query_entries = 'Check type of data required'.
ld_iv_language = 'Check type of data required'.
ld_it_object_type = 'Check type of data required'.
ld_it_req_attributes = 'Check type of data required'.
ld_it_req_join_attributes = 'Check type of data required'.
ld_it_sort_attributes = 'Check type of data required'.
ld_iv_result_from = 'Check type of data required'.
ld_iv_result_to = 'Check type of data required'.

ld_iv_request_flags = Check type of data required

ld_iv_requested_results = 123

ld_iv_count_only = some text here
ld_iv_auth_check_limit = 'Check type of data required'.
ld_iv_search_by_relation = 'Check type of data required'.
ld_it_snippet_attributes = 'Check type of data required'.
ld_is_attr_dist_global = 'Check type of data required'.
ld_it_stat_info_attrs = 'Check type of data required'.
ld_iv_statistical_info = 'Check type of data required'.

SAP Documentation for FM COM_SES_SEARCH_OBJECTS

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name COM_SES_SEARCH_OBJECTS or its description.