SAP TREX_EXT_GET_CRAWL_INFORMATION Function Module for Delivers all information of a crawl (object)









TREX_EXT_GET_CRAWL_INFORMATION is a standard trex ext get crawl information SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Delivers all information of a crawl (object) processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for trex ext get crawl information FM, simply by entering the name TREX_EXT_GET_CRAWL_INFORMATION into the relevant SAP transaction such as SE37 or SE38.

Function Group: TREX_EXT_CRAWLER
Program Name: SAPLTREX_EXT_CRAWLER
Main Program: SAPLTREX_EXT_CRAWLER
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function TREX_EXT_GET_CRAWL_INFORMATION pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'TREX_EXT_GET_CRAWL_INFORMATION'"Delivers all information of a crawl (object)
EXPORTING
I_RFC_DESTINATION = "RFC destination to TREX
I_CRUISE_NAME = "name of the crawl / cruise

IMPORTING
E_INDEX_ID = "indexid
E_ACCESS_DELAY = "time between 2 HTTP gets in ms
E_MAX_RETRY_COUNT = "max retry of HTTP gets
E_USE_ROBOTRULES = "1 = crawler is using robot rules
E_IS_MULTILANGUAGE_INDEX = "1 = using multi language index
E_USER_AGENT = "user agent for HTTP get
E_SCHEDULE_TIME = "if not empty, scheduler will be used
E_PYTHON_COMMAND_ARGS = "Python command for scheduled execution
E_RESULT_CONNECTOR_TYPE = " (default )0=TREX index, 1=file, 2=dummy for python commands
E_USE_QUEUESERVER = "X=using queue server for crawling / indexing
E_OPTIMIZE_EVERY = "call an optimize after indexing n documents
E_LANGUAGE = "Language according to ISO 639
E_DEINDEX_FLAG = "1= deindex documents which got an error during update crawl
E_USE_FREESTYLE_CONTAINER = "1= concatenate all attribute values to one
E_GET_ACCESS_RIGHTS = "1= extract ACLs from files
E_USE_RAPTOR_ATTRIBUTES = "1= extracting standard attributes
E_CREATION_TIME = "creation time of the crawl
E_FILE_PATH = "connector type = 1 (file) where documents will be stored
E_CRUISE_DOCUMENT_INFO = "meta information like seedurl etc.
E_CRUISE_EXTENSION_LIST = "TREX cruiser extension list for parameters
E_CRUISE_PP_EXTENSION_LIST = "TREX cruiser extension list for parameters
E_DOCKEY_CONVERSION_LIST = "cruiser list for convertion (e.g. document keys)
E_CREATE_SUSPENDED = "1=cruise is suspended after creatation
E_HOST_INFORMATION = "TREX cruiser host information
E_REGULAR_EXPRESSION = "regular expressions for the TREX cruiser/crawler
E_POSITIVE_FILE_EXTENSIONS = "list of positive files extensions which will be crawled
E_NEGATIVE_FILE_EXTENSION = "list of negative files extensions which will NOT be crawled
E_EXCLUDE_DIRECTORIES = "directories which must not be craweld
E_RESULT_CONNECTOR = "TREX cruiser result connector
E_RETURN_CODE = "Returncode
E_RETURN_TEXT = "Returntext
E_MAX_DEPTH = "maximal depth which will be crawled
E_MAX_DOCSIZE = "maximal size in bytes which will be crawled
E_MIN_DOCSIZE = "minimal size in bytes which will be crawled
E_CRAWLING_ALGORITHM = "0=down the tree; 1= same server; 2=same domain; 3 = top level domain, 4= free
E_PREPROCESSOR_POOL_SIZE = "number of parallel requests to the PreProcessor processes
E_DONT_INDEX_DIRS = "1=do not index directories

EXCEPTIONS
CONVERSION_ERROR = 1 ERROR = 2
.



IMPORTING Parameters details for TREX_EXT_GET_CRAWL_INFORMATION

I_RFC_DESTINATION - RFC destination to TREX

Data type: TREX_RFC-RFC_DESTINATION
Optional: No
Call by Reference: Yes

I_CRUISE_NAME - name of the crawl / cruise

Data type: TREXS_CRUISER-CRUISE_NAME
Optional: No
Call by Reference: Yes

EXPORTING Parameters details for TREX_EXT_GET_CRAWL_INFORMATION

E_INDEX_ID - indexid

Data type: TREX_RFC-INDEX_ID
Optional: No
Call by Reference: Yes

E_ACCESS_DELAY - time between 2 HTTP gets in ms

Data type: TREXS_CRUISER-COUNTER
Optional: No
Call by Reference: Yes

E_MAX_RETRY_COUNT - max retry of HTTP gets

Data type: TREXS_CRUISER-COUNTER
Optional: No
Call by Reference: Yes

E_USE_ROBOTRULES - 1 = crawler is using robot rules

Data type: TREXS_CRUISER-NUMC1
Optional: No
Call by Reference: Yes

E_IS_MULTILANGUAGE_INDEX - 1 = using multi language index

Data type: TREXS_CRUISER-NUMC1
Optional: No
Call by Reference: Yes

E_USER_AGENT - user agent for HTTP get

Data type: TREXS_CRUISER-STRING_FIELD
Optional: No
Call by Reference: Yes

E_SCHEDULE_TIME - if not empty, scheduler will be used

Data type: TREXS_CRUISER-STRING_FIELD
Optional: No
Call by Reference: Yes

E_PYTHON_COMMAND_ARGS - Python command for scheduled execution

Data type: TREXS_CRUISER-STRING_FIELD
Optional: No
Call by Reference: Yes

E_RESULT_CONNECTOR_TYPE - (default )0=TREX index, 1=file, 2=dummy for python commands

Data type: TREXS_CRUISER-NUMC1
Optional: No
Call by Reference: Yes

E_USE_QUEUESERVER - X=using queue server for crawling / indexing

Data type: TREXS_CRUISER-NUMC1
Optional: No
Call by Reference: Yes

E_OPTIMIZE_EVERY - call an optimize after indexing n documents

Data type: TREXS_CRUISER-COUNTER
Optional: No
Call by Reference: Yes

E_LANGUAGE - Language according to ISO 639

Data type: LAISO
Optional: No
Call by Reference: Yes

E_DEINDEX_FLAG - 1= deindex documents which got an error during update crawl

Data type: TREXS_CRUISER-NUMC1
Optional: No
Call by Reference: Yes

E_USE_FREESTYLE_CONTAINER - 1= concatenate all attribute values to one

Data type: TREXS_CRUISER-NUMC1
Optional: No
Call by Reference: Yes

E_GET_ACCESS_RIGHTS - 1= extract ACLs from files

Data type: TREXS_CRUISER-NUMC1
Optional: No
Call by Reference: Yes

E_USE_RAPTOR_ATTRIBUTES - 1= extracting standard attributes

Data type: TREXS_CRUISER-NUMC1
Optional: No
Call by Reference: Yes

E_CREATION_TIME - creation time of the crawl

Data type: TREXS_CRUISER-DATE_TIME
Optional: No
Call by Reference: Yes

E_FILE_PATH - connector type = 1 (file) where documents will be stored

Data type: TREXS_CRUISER-STRING_FIELD
Optional: No
Call by Reference: Yes

E_CRUISE_DOCUMENT_INFO - meta information like seedurl etc.

Data type: TREXS_CRUISE_DOCUMENT_INFO
Optional: No
Call by Reference: Yes

E_CRUISE_EXTENSION_LIST - TREX cruiser extension list for parameters

Data type: TREXT_CRUISE_EXTENSION_LIST
Optional: No
Call by Reference: Yes

E_CRUISE_PP_EXTENSION_LIST - TREX cruiser extension list for parameters

Data type: TREXT_CRUISE_EXTENSION_LIST
Optional: No
Call by Reference: Yes

E_DOCKEY_CONVERSION_LIST - cruiser list for convertion (e.g. document keys)

Data type: TREXT_CRUISE_LIST
Optional: No
Call by Reference: Yes

E_CREATE_SUSPENDED - 1=cruise is suspended after creatation

Data type: TREXS_CRUISER-NUMC1
Optional: No
Call by Reference: Yes

E_HOST_INFORMATION - TREX cruiser host information

Data type: TREXT_CRUISE_HOST_INFORMATION
Optional: No
Call by Reference: Yes

E_REGULAR_EXPRESSION - regular expressions for the TREX cruiser/crawler

Data type: TREXT_CRUISER_REG_EXPRESSION
Optional: No
Call by Reference: Yes

E_POSITIVE_FILE_EXTENSIONS - list of positive files extensions which will be crawled

Data type: TREXT_POSITIVE_FILE_EXTENSIONS
Optional: No
Call by Reference: Yes

E_NEGATIVE_FILE_EXTENSION - list of negative files extensions which will NOT be crawled

Data type: TREXT_NEGATIVE_FILE_EXTENSIONS
Optional: No
Call by Reference: Yes

E_EXCLUDE_DIRECTORIES - directories which must not be craweld

Data type: TREXT_EXCLUDE_DIRECTORIES
Optional: No
Call by Reference: Yes

E_RESULT_CONNECTOR - TREX cruiser result connector

Data type: TREXT_CRUISE_RESULT_CONNECTOR
Optional: No
Call by Reference: Yes

E_RETURN_CODE - Returncode

Data type: TREX_RFC-RETURN_CODE
Optional: No
Call by Reference: Yes

E_RETURN_TEXT - Returntext

Data type: TREX_RFC-RETURN_TEXT
Optional: No
Call by Reference: Yes

E_MAX_DEPTH - maximal depth which will be crawled

Data type: TREXS_CRUISER-COUNTER
Optional: No
Call by Reference: Yes

E_MAX_DOCSIZE - maximal size in bytes which will be crawled

Data type: TREXS_CRUISER-COUNTER
Optional: No
Call by Reference: Yes

E_MIN_DOCSIZE - minimal size in bytes which will be crawled

Data type: TREXS_CRUISER-COUNTER
Optional: No
Call by Reference: Yes

E_CRAWLING_ALGORITHM - 0=down the tree; 1= same server; 2=same domain; 3 = top level domain, 4= free

Data type: TREXS_CRUISER-NUMC1
Optional: No
Call by Reference: Yes

E_PREPROCESSOR_POOL_SIZE - number of parallel requests to the PreProcessor processes

Data type: TREXS_CRUISER-POOL_SIZE
Optional: No
Call by Reference: Yes

E_DONT_INDEX_DIRS - 1=do not index directories

Data type: TREXS_CRUISER-NUMC1
Optional: No
Call by Reference: Yes

EXCEPTIONS details

CONVERSION_ERROR - Error during conversion to UTF-8

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

ERROR - Error, see error message

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for TREX_EXT_GET_CRAWL_INFORMATION Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than 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 newer method of declaring data variables on the fly. 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), which i why i have stuck to the origianl for this example.

DATA:
lv_e_index_id  TYPE TREX_RFC-INDEX_ID, "   
lv_conversion_error  TYPE TREX_RFC, "   
lv_i_rfc_destination  TYPE TREX_RFC-RFC_DESTINATION, "   
lv_e_access_delay  TYPE TREXS_CRUISER-COUNTER, "   
lv_e_max_retry_count  TYPE TREXS_CRUISER-COUNTER, "   
lv_e_use_robotrules  TYPE TREXS_CRUISER-NUMC1, "   
lv_e_is_multilanguage_index  TYPE TREXS_CRUISER-NUMC1, "   
lv_e_user_agent  TYPE TREXS_CRUISER-STRING_FIELD, "   
lv_e_schedule_time  TYPE TREXS_CRUISER-STRING_FIELD, "   
lv_e_python_command_args  TYPE TREXS_CRUISER-STRING_FIELD, "   
lv_e_result_connector_type  TYPE TREXS_CRUISER-NUMC1, "   
lv_e_use_queueserver  TYPE TREXS_CRUISER-NUMC1, "   
lv_e_optimize_every  TYPE TREXS_CRUISER-COUNTER, "   
lv_error  TYPE TREXS_CRUISER, "   
lv_e_language  TYPE LAISO, "   
lv_i_cruise_name  TYPE TREXS_CRUISER-CRUISE_NAME, "   
lv_e_deindex_flag  TYPE TREXS_CRUISER-NUMC1, "   
lv_e_use_freestyle_container  TYPE TREXS_CRUISER-NUMC1, "   
lv_e_get_access_rights  TYPE TREXS_CRUISER-NUMC1, "   
lv_e_use_raptor_attributes  TYPE TREXS_CRUISER-NUMC1, "   
lv_e_creation_time  TYPE TREXS_CRUISER-DATE_TIME, "   
lv_e_file_path  TYPE TREXS_CRUISER-STRING_FIELD, "   
lv_e_cruise_document_info  TYPE TREXS_CRUISE_DOCUMENT_INFO, "   
lv_e_cruise_extension_list  TYPE TREXT_CRUISE_EXTENSION_LIST, "   
lv_e_cruise_pp_extension_list  TYPE TREXT_CRUISE_EXTENSION_LIST, "   
lv_e_dockey_conversion_list  TYPE TREXT_CRUISE_LIST, "   
lv_e_create_suspended  TYPE TREXS_CRUISER-NUMC1, "   
lv_e_host_information  TYPE TREXT_CRUISE_HOST_INFORMATION, "   
lv_e_regular_expression  TYPE TREXT_CRUISER_REG_EXPRESSION, "   
lv_e_positive_file_extensions  TYPE TREXT_POSITIVE_FILE_EXTENSIONS, "   
lv_e_negative_file_extension  TYPE TREXT_NEGATIVE_FILE_EXTENSIONS, "   
lv_e_exclude_directories  TYPE TREXT_EXCLUDE_DIRECTORIES, "   
lv_e_result_connector  TYPE TREXT_CRUISE_RESULT_CONNECTOR, "   
lv_e_return_code  TYPE TREX_RFC-RETURN_CODE, "   
lv_e_return_text  TYPE TREX_RFC-RETURN_TEXT, "   
lv_e_max_depth  TYPE TREXS_CRUISER-COUNTER, "   
lv_e_max_docsize  TYPE TREXS_CRUISER-COUNTER, "   
lv_e_min_docsize  TYPE TREXS_CRUISER-COUNTER, "   
lv_e_crawling_algorithm  TYPE TREXS_CRUISER-NUMC1, "   
lv_e_preprocessor_pool_size  TYPE TREXS_CRUISER-POOL_SIZE, "   
lv_e_dont_index_dirs  TYPE TREXS_CRUISER-NUMC1. "   

  CALL FUNCTION 'TREX_EXT_GET_CRAWL_INFORMATION'  "Delivers all information of a crawl (object)
    EXPORTING
         I_RFC_DESTINATION = lv_i_rfc_destination
         I_CRUISE_NAME = lv_i_cruise_name
    IMPORTING
         E_INDEX_ID = lv_e_index_id
         E_ACCESS_DELAY = lv_e_access_delay
         E_MAX_RETRY_COUNT = lv_e_max_retry_count
         E_USE_ROBOTRULES = lv_e_use_robotrules
         E_IS_MULTILANGUAGE_INDEX = lv_e_is_multilanguage_index
         E_USER_AGENT = lv_e_user_agent
         E_SCHEDULE_TIME = lv_e_schedule_time
         E_PYTHON_COMMAND_ARGS = lv_e_python_command_args
         E_RESULT_CONNECTOR_TYPE = lv_e_result_connector_type
         E_USE_QUEUESERVER = lv_e_use_queueserver
         E_OPTIMIZE_EVERY = lv_e_optimize_every
         E_LANGUAGE = lv_e_language
         E_DEINDEX_FLAG = lv_e_deindex_flag
         E_USE_FREESTYLE_CONTAINER = lv_e_use_freestyle_container
         E_GET_ACCESS_RIGHTS = lv_e_get_access_rights
         E_USE_RAPTOR_ATTRIBUTES = lv_e_use_raptor_attributes
         E_CREATION_TIME = lv_e_creation_time
         E_FILE_PATH = lv_e_file_path
         E_CRUISE_DOCUMENT_INFO = lv_e_cruise_document_info
         E_CRUISE_EXTENSION_LIST = lv_e_cruise_extension_list
         E_CRUISE_PP_EXTENSION_LIST = lv_e_cruise_pp_extension_list
         E_DOCKEY_CONVERSION_LIST = lv_e_dockey_conversion_list
         E_CREATE_SUSPENDED = lv_e_create_suspended
         E_HOST_INFORMATION = lv_e_host_information
         E_REGULAR_EXPRESSION = lv_e_regular_expression
         E_POSITIVE_FILE_EXTENSIONS = lv_e_positive_file_extensions
         E_NEGATIVE_FILE_EXTENSION = lv_e_negative_file_extension
         E_EXCLUDE_DIRECTORIES = lv_e_exclude_directories
         E_RESULT_CONNECTOR = lv_e_result_connector
         E_RETURN_CODE = lv_e_return_code
         E_RETURN_TEXT = lv_e_return_text
         E_MAX_DEPTH = lv_e_max_depth
         E_MAX_DOCSIZE = lv_e_max_docsize
         E_MIN_DOCSIZE = lv_e_min_docsize
         E_CRAWLING_ALGORITHM = lv_e_crawling_algorithm
         E_PREPROCESSOR_POOL_SIZE = lv_e_preprocessor_pool_size
         E_DONT_INDEX_DIRS = lv_e_dont_index_dirs
    EXCEPTIONS
        CONVERSION_ERROR = 1
        ERROR = 2
. " TREX_EXT_GET_CRAWL_INFORMATION




ABAP code using 7.40 inline data declarations to call FM TREX_EXT_GET_CRAWL_INFORMATION

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

"SELECT single INDEX_ID FROM TREX_RFC INTO @DATA(ld_e_index_id).
 
 
"SELECT single RFC_DESTINATION FROM TREX_RFC INTO @DATA(ld_i_rfc_destination).
 
"SELECT single COUNTER FROM TREXS_CRUISER INTO @DATA(ld_e_access_delay).
 
"SELECT single COUNTER FROM TREXS_CRUISER INTO @DATA(ld_e_max_retry_count).
 
"SELECT single NUMC1 FROM TREXS_CRUISER INTO @DATA(ld_e_use_robotrules).
 
"SELECT single NUMC1 FROM TREXS_CRUISER INTO @DATA(ld_e_is_multilanguage_index).
 
"SELECT single STRING_FIELD FROM TREXS_CRUISER INTO @DATA(ld_e_user_agent).
 
"SELECT single STRING_FIELD FROM TREXS_CRUISER INTO @DATA(ld_e_schedule_time).
 
"SELECT single STRING_FIELD FROM TREXS_CRUISER INTO @DATA(ld_e_python_command_args).
 
"SELECT single NUMC1 FROM TREXS_CRUISER INTO @DATA(ld_e_result_connector_type).
 
"SELECT single NUMC1 FROM TREXS_CRUISER INTO @DATA(ld_e_use_queueserver).
 
"SELECT single COUNTER FROM TREXS_CRUISER INTO @DATA(ld_e_optimize_every).
 
 
 
"SELECT single CRUISE_NAME FROM TREXS_CRUISER INTO @DATA(ld_i_cruise_name).
 
"SELECT single NUMC1 FROM TREXS_CRUISER INTO @DATA(ld_e_deindex_flag).
 
"SELECT single NUMC1 FROM TREXS_CRUISER INTO @DATA(ld_e_use_freestyle_container).
 
"SELECT single NUMC1 FROM TREXS_CRUISER INTO @DATA(ld_e_get_access_rights).
 
"SELECT single NUMC1 FROM TREXS_CRUISER INTO @DATA(ld_e_use_raptor_attributes).
 
"SELECT single DATE_TIME FROM TREXS_CRUISER INTO @DATA(ld_e_creation_time).
 
"SELECT single STRING_FIELD FROM TREXS_CRUISER INTO @DATA(ld_e_file_path).
 
 
 
 
 
"SELECT single NUMC1 FROM TREXS_CRUISER INTO @DATA(ld_e_create_suspended).
 
 
 
 
 
 
 
"SELECT single RETURN_CODE FROM TREX_RFC INTO @DATA(ld_e_return_code).
 
"SELECT single RETURN_TEXT FROM TREX_RFC INTO @DATA(ld_e_return_text).
 
"SELECT single COUNTER FROM TREXS_CRUISER INTO @DATA(ld_e_max_depth).
 
"SELECT single COUNTER FROM TREXS_CRUISER INTO @DATA(ld_e_max_docsize).
 
"SELECT single COUNTER FROM TREXS_CRUISER INTO @DATA(ld_e_min_docsize).
 
"SELECT single NUMC1 FROM TREXS_CRUISER INTO @DATA(ld_e_crawling_algorithm).
 
"SELECT single POOL_SIZE FROM TREXS_CRUISER INTO @DATA(ld_e_preprocessor_pool_size).
 
"SELECT single NUMC1 FROM TREXS_CRUISER INTO @DATA(ld_e_dont_index_dirs).
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!