TREX_RFC_AE_EXAMPLE is a standard Executable ABAP Report available within your SAP system (depending on your version and release level). Below is the basic information available for this SAP report including which OBJECTS it interacts with such as TABLES, FUNCTION MODULES, INCLUDES ETC. Also check out the submitted Comments related to this SAP report or see any standard documentation available.
If you would like to execute this report or see the full code listing simply enter TREX_RFC_AE_EXAMPLE into the relevant SAP transactions such as SE38 or SE80
This report can be called from another progam/report simply by using the ABAP SUBMIT statement, see below for example ABAP code snipts of how to do this.
Selection Text: UPDATE = Update attributes
Selection Text: TMREL1 = D .
Selection Text: SEARCHFS = Search (FreeStyle)
Selection Text: SEARCHAL = Search with *
Selection Text: SEARCH = Search
Selection Text: RFC_DEST = D .
Selection Text: PARTS = Index parts
Selection Text: LANGUAGE = D .
Selection Text: INDEX_ID = D .
Selection Text: INDEX3 = Index some more documents
Selection Text: INDEX2 = Index some more documents
Selection Text: INDEX = Index some documents
Selection Text: IMPL1 = Implementation flag
Selection Text: GROUP1 = Group
Selection Text: DEL_ATTR = Delete attribute
Selection Text: DELETE = Delete index
Selection Text: DEF_ATTR = Define new attribute
Selection Text: CREATE = Create index
Selection Text: CLEAR = Clear index
Selection Text: ATTRTYP1 = D .
Selection Text: ATTRNAM2 = D .
Selection Text: ATTRNAM1 = D .
Title: Example program for TREX Search and Attribute Engine
No INCLUDES are used within this REPORT code!
No SAP DATABASE tables are accessed within this REPORT code!
TREX_AUTHORITY_CHECK_ADMIN CALL FUNCTION 'TREX_AUTHORITY_CHECK_ADMIN' EXCEPTIONS OTHERS = 1.
TREX_EXT_CREATE_INDEX CALL FUNCTION 'TREX_EXT_CREATE_INDEX' EXPORTING i_index_id = index_id i_language = language i_rfc_destination = rfc_dest i_use_queueserver = 'X' i_textmining_relevant = ' ' i_key_attributes = lt_keys i_attribute_definitions = lt_attrs i_freestyle_search_attributes2 = lt_freestyle_attrs i_memory_index = memory IMPORTING e_return_code = l_return_code e_return_text = l_return_text e_component_runtime = ls_runtime EXCEPTIONS OTHERS = 1.
TREX_EXT_CREATE_INDEX CALL FUNCTION 'TREX_EXT_CREATE_INDEX' EXPORTING i_index_id = index_id i_language = language i_rfc_destination = rfc_dest i_use_queueserver = 'X' i_textmining_relevant = ' ' i_attribute_definitions = lt_attrs i_index_type = '1' i_no_physical_indexes = parts i_memory_index = memory IMPORTING e_return_code = l_return_code e_return_text = l_return_text e_component_runtime = ls_runtime EXCEPTIONS OTHERS = 1.
TREX_EXT_INDEX CALL FUNCTION 'TREX_EXT_INDEX' EXPORTING i_index_id = index_id i_rfc_destination = rfc_dest i_index_document_list = lt_docs i_auto_optimize = 1 i_flush_after_index = '1' IMPORTING e_return_code = l_return_code e_return_text = l_return_text e_return_error_doc = lt_error_docs e_component_runtime = ls_runtime EXCEPTIONS OTHERS = 1.
TREX_EXT_SET_INDEX_PROPERTY CALL FUNCTION 'TREX_EXT_SET_INDEX_PROPERTY' EXPORTING i_index_id = index_id i_rfc_destination = rfc_dest i_property = 1 i_value = '2' IMPORTING e_return_code = l_return_code e_return_text = l_return_text EXCEPTIONS OTHERS = 1.
TREX_EXT_SET_INDEX_PROPERTY CALL FUNCTION 'TREX_EXT_SET_INDEX_PROPERTY' EXPORTING i_index_id = index_id i_rfc_destination = rfc_dest i_property = 21 i_value = '1' IMPORTING e_return_code = l_return_code e_return_text = l_return_text EXCEPTIONS OTHERS = 1.
TREX_EXT_SET_INDEX_PROPERTY CALL FUNCTION 'TREX_EXT_SET_INDEX_PROPERTY' EXPORTING i_index_id = index_id i_rfc_destination = rfc_dest i_property = 24 i_value = '1' IMPORTING e_return_code = l_return_code e_return_text = l_return_text EXCEPTIONS OTHERS = 1.
TREX_EXT_OPTIMIZE CALL FUNCTION 'TREX_EXT_OPTIMIZE' EXPORTING i_index_id = index_id i_rfc_destination = rfc_dest IMPORTING e_return_code = l_return_code e_return_text = l_return_text EXCEPTIONS OTHERS = 1.
TREX_EXT_PREPARE_OPTIMIZE CALL FUNCTION 'TREX_EXT_PREPARE_OPTIMIZE' EXPORTING i_index_id = index_id i_rfc_destination = rfc_dest IMPORTING e_return_code = l_return_code e_return_text = l_return_text EXCEPTIONS OTHERS = 1.
TREX_EXT_COMMIT_OPTIMIZE CALL FUNCTION 'TREX_EXT_COMMIT_OPTIMIZE' EXPORTING i_index_id = index_id i_rfc_destination = rfc_dest IMPORTING e_return_code = l_return_code e_return_text = l_return_text EXCEPTIONS OTHERS = 1.
TREX_EXT_INDEX CALL FUNCTION 'TREX_EXT_INDEX' EXPORTING i_index_id = index_id i_rfc_destination = rfc_dest i_index_document_list = lt_docs i_auto_optimize = 1 IMPORTING e_return_code = l_return_code e_return_text = l_return_text e_return_error_doc = lt_error_docs e_component_runtime = ls_runtime EXCEPTIONS OTHERS = 1.
TREX_EXT_INDEX CALL FUNCTION 'TREX_EXT_INDEX' EXPORTING i_index_id = index_id i_rfc_destination = rfc_dest i_index_document_list = lt_docs i_auto_optimize = 1 IMPORTING e_return_code = l_return_code e_return_text = l_return_text e_return_error_doc = lt_error_docs e_component_runtime = ls_runtime EXCEPTIONS OTHERS = 1.
TREX_EXT_SEARCH_DOCUMENTS CALL FUNCTION 'TREX_EXT_SEARCH_DOCUMENTS' EXPORTING i_indexes = lt_indexes i_rfc_destination = rfc_dest i_query_entries = lt_query i_req_attributes = lt_req_attr i_freestyle_search_attributes = lt_freestyle_attrs i_freestyle_search_attributes2 = lt_freestyle_attrs2 IMPORTING e_return_code = l_return_code e_return_text = l_return_text e_result_docs = lt_result_docs e_no_of_hits = l_no_of_hits e_no_of_all_hits = l_no_of_all_hits e_index_size = l_index_size e_component_runtime = ls_runtime EXCEPTIONS OTHERS = 1.
TREX_EXT_SEARCH_DOCUMENTS CALL FUNCTION 'TREX_EXT_SEARCH_DOCUMENTS' EXPORTING i_indexes = lt_indexes i_rfc_destination = rfc_dest i_query_entries = lt_query i_req_attributes = lt_req_attr * i_switch_on_trace = '04' * i_trace_components = 'trex_se=debug' "#EC NOTEXT IMPORTING e_return_code = l_return_code e_return_text = l_return_text e_result_docs = lt_result_docs e_no_of_hits = l_no_of_hits e_no_of_all_hits = l_no_of_all_hits e_index_size = l_index_size e_component_runtime = ls_runtime e_trace = lt_trace EXCEPTIONS OTHERS = 1.
TREX_EXT_SEARCH_DOCUMENTS CALL FUNCTION 'TREX_EXT_SEARCH_DOCUMENTS' EXPORTING i_indexes = lt_indexes i_rfc_destination = rfc_dest i_query_entries = lt_query i_req_attributes = lt_req_attr i_freestyle_search_attributes = lt_freestyle_attr IMPORTING e_return_code = l_return_code e_return_text = l_return_text e_result_docs = lt_result_docs e_no_of_hits = l_no_of_hits e_no_of_all_hits = l_no_of_all_hits e_index_size = l_index_size e_component_runtime = ls_runtime EXCEPTIONS OTHERS = 1.
TREX_EXT_DELETE_INDEX CALL FUNCTION 'TREX_EXT_DELETE_INDEX' EXPORTING i_index_id = index_id i_rfc_destination = rfc_dest IMPORTING e_return_code = l_return_code e_return_text = l_return_text EXCEPTIONS OTHERS = 1.
TREX_EXT_DEFINE_ATTRIBUTE CALL FUNCTION 'TREX_EXT_DEFINE_ATTRIBUTE' EXPORTING i_index_id = index_id i_rfc_destination = rfc_dest i_attribute_definitions = lt_attr_def IMPORTING e_return_code = l_return_code e_return_text = l_return_text EXCEPTIONS conversion_error = 1 error = 2 OTHERS = 3.
TREX_EXT_REDEFINE_ATTRIBUTE CALL FUNCTION 'TREX_EXT_REDEFINE_ATTRIBUTE' EXPORTING i_index_id = index_id i_rfc_destination = rfc_dest i_attribute_definition = ls_attr_def IMPORTING e_return_code = l_return_code e_return_text = l_return_text EXCEPTIONS conversion_error = 1 error = 2 OTHERS = 3.
CALL FUNCTION 'TREX_EXT_DELETE_ATTRIBUTE' EXPORTING i_index_id = index_id i_attr_name = attrnam2 i_rfc_destination = rfc_dest IMPORTING e_return_code = l_return_code e_return_text = l_return_text EXCEPTIONS conversion_error = 1 error = 2 OTHERS = 3.
TREX_EXT_UPDATE_DOC_ATTRIBUTES CALL FUNCTION 'TREX_EXT_UPDATE_DOC_ATTRIBUTES' EXPORTING i_index_id = index_id i_rfc_destination = rfc_dest i_language = 'EN' i_doc_attr = lt_attr IMPORTING e_return_code = l_return_code e_return_text = l_return_text e_return_error_doc = lt_error_docs e_component_runtime = ls_runtime EXCEPTIONS conversion_error = 1 error = 2 OTHERS = 3.
TREX_EXT_CLEAR_INDEX CALL FUNCTION 'TREX_EXT_CLEAR_INDEX' EXPORTING i_index_id = index_id i_rfc_destination = rfc_dest i_where_condition = 'mywherecondition' IMPORTING e_return_code = l_return_code e_return_text = l_return_text EXCEPTIONS OTHERS = 1.
Although this basic information may have limited use it does provide an easy to find location to store any knowledge about this program/report.
The contribute/comments section below therefore offer's an opportunity for anyone to add additional information. This can be anything from useful hints, tips and screen shots to relevant SAP notes or anything else you feel is relevant to this report.
This will then be available for everyone to easily find by simply searching on the report name TREX_RFC_AE_EXAMPLE or its description.
TREX_RFC_AE_EXAMPLE - Example program for TREX Search and Attribute Engine TREX_RFC_AE_EXAMPLE - Example program for TREX Search and Attribute Engine TREX_RFC_ADMIN - Clear Index, Delete Index, List Indexes TREX_RFC_ADMIN - Clear Index, Delete Index, List Indexes TREX_PERF_EXECUTE - TREX: Execute Performance Test TREX_PERF_EXECUTE - TREX: Execute Performance Test