SAP ES_EXECUTE_OBJECT_SEARCH Function Module for
ES_EXECUTE_OBJECT_SEARCH is a standard es execute object search SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 es execute object search FM, simply by entering the name ES_EXECUTE_OBJECT_SEARCH into the relevant SAP transaction such as SE37 or SE38.
Function Group: SESC_PROXY_INTERFACE
Program Name: SAPLSESC_PROXY_INTERFACE
Main Program:
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function ES_EXECUTE_OBJECT_SEARCH 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 'ES_EXECUTE_OBJECT_SEARCH'".
EXPORTING
I_SEARCHSCOPE = "
* I_GN_FIELDS = "
* I_GN_COUNT = "
* I_SEGMENTATION_FIELD = "
I_REQUEST_FIELDS = "
* I_QUERY = "
* I_TERM = "
* I_CONTENT_TYPE = "
* I_LANGU = "
I_FROM = "
I_TO = "
* I_SORT = "
IMPORTING
E_HITS = "
E_ALL_HITS = "
E_RESULT_OBJSEARCH_XML = "
EXCEPTIONS
REPOSITORY_UNKNOWN = 1 SEARCH_ERROR = 2
IMPORTING Parameters details for ES_EXECUTE_OBJECT_SEARCH
I_SEARCHSCOPE -
Data type: SESC_S_SEARCH_SCOPEOptional: No
Call by Reference: No ( called with pass by value option)
I_GN_FIELDS -
Data type: SESC_T_FIELDNAMEOptional: Yes
Call by Reference: No ( called with pass by value option)
I_GN_COUNT -
Data type: IOptional: Yes
Call by Reference: No ( called with pass by value option)
I_SEGMENTATION_FIELD -
Data type: SESC_D_ATTRIBUTE_NAMEOptional: Yes
Call by Reference: No ( called with pass by value option)
I_REQUEST_FIELDS -
Data type: SESC_T_FIELDNAMEOptional: No
Call by Reference: No ( called with pass by value option)
I_QUERY -
Data type: SESC_T_QUERYOptional: Yes
Call by Reference: No ( called with pass by value option)
I_TERM -
Data type: STRINGOptional: Yes
Call by Reference: No ( called with pass by value option)
I_CONTENT_TYPE -
Data type: SESC_D_CONTENT_TYPEOptional: Yes
Call by Reference: No ( called with pass by value option)
I_LANGU -
Data type: SY-LANGUOptional: Yes
Call by Reference: No ( called with pass by value option)
I_FROM -
Data type: IOptional: No
Call by Reference: No ( called with pass by value option)
I_TO -
Data type: IOptional: No
Call by Reference: No ( called with pass by value option)
I_SORT -
Data type: SESC_T_SORTOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for ES_EXECUTE_OBJECT_SEARCH
E_HITS -
Data type: IOptional: No
Call by Reference: No ( called with pass by value option)
E_ALL_HITS -
Data type: IOptional: No
Call by Reference: No ( called with pass by value option)
E_RESULT_OBJSEARCH_XML -
Data type: STRINGOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
REPOSITORY_UNKNOWN -
Data type:Optional: No
Call by Reference: Yes
SEARCH_ERROR -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for ES_EXECUTE_OBJECT_SEARCH 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_hits | TYPE I, " | |||
| lv_i_searchscope | TYPE SESC_S_SEARCH_SCOPE, " | |||
| lv_repository_unknown | TYPE SESC_S_SEARCH_SCOPE, " | |||
| lv_i_gn_fields | TYPE SESC_T_FIELDNAME, " | |||
| lv_i_gn_count | TYPE I, " | |||
| lv_i_segmentation_field | TYPE SESC_D_ATTRIBUTE_NAME, " | |||
| lv_e_all_hits | TYPE I, " | |||
| lv_search_error | TYPE I, " | |||
| lv_i_request_fields | TYPE SESC_T_FIELDNAME, " | |||
| lv_i_query | TYPE SESC_T_QUERY, " | |||
| lv_e_result_objsearch_xml | TYPE STRING, " | |||
| lv_i_term | TYPE STRING, " | |||
| lv_i_content_type | TYPE SESC_D_CONTENT_TYPE, " | |||
| lv_i_langu | TYPE SY-LANGU, " | |||
| lv_i_from | TYPE I, " | |||
| lv_i_to | TYPE I, " | |||
| lv_i_sort | TYPE SESC_T_SORT. " |
|   CALL FUNCTION 'ES_EXECUTE_OBJECT_SEARCH' " |
| EXPORTING | ||
| I_SEARCHSCOPE | = lv_i_searchscope | |
| I_GN_FIELDS | = lv_i_gn_fields | |
| I_GN_COUNT | = lv_i_gn_count | |
| I_SEGMENTATION_FIELD | = lv_i_segmentation_field | |
| I_REQUEST_FIELDS | = lv_i_request_fields | |
| I_QUERY | = lv_i_query | |
| I_TERM | = lv_i_term | |
| I_CONTENT_TYPE | = lv_i_content_type | |
| I_LANGU | = lv_i_langu | |
| I_FROM | = lv_i_from | |
| I_TO | = lv_i_to | |
| I_SORT | = lv_i_sort | |
| IMPORTING | ||
| E_HITS | = lv_e_hits | |
| E_ALL_HITS | = lv_e_all_hits | |
| E_RESULT_OBJSEARCH_XML | = lv_e_result_objsearch_xml | |
| EXCEPTIONS | ||
| REPOSITORY_UNKNOWN = 1 | ||
| SEARCH_ERROR = 2 | ||
| . " ES_EXECUTE_OBJECT_SEARCH | ||
ABAP code using 7.40 inline data declarations to call FM ES_EXECUTE_OBJECT_SEARCH
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 LANGU FROM SY INTO @DATA(ld_i_langu). | ||||
Search for further information about these or an SAP related objects