SAP HRTMC_SEARCH_OBJECTS Function Module for
HRTMC_SEARCH_OBJECTS is a standard hrtmc search objects 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 hrtmc search objects FM, simply by entering the name HRTMC_SEARCH_OBJECTS into the relevant SAP transaction such as SE37 or SE38.
Function Group: HRTMC_SERVICES
Program Name: SAPLHRTMC_SERVICES
Main Program: SAPLHRTMC_SERVICES
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function HRTMC_SEARCH_OBJECTS 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 'HRTMC_SEARCH_OBJECTS'".
EXPORTING
SEARCH_CONFIG_ID = "Search Configuration
* SELECTION_DATE = SY-DATUM "Date
* SEARCH_CRITERIA = "Search Criteria
* UNDER_RESPONSIBILITY_AREA = "Checkbox
* RESPONSE_ATTRIBUTES = "Fields for Search
* START_INDEX = 1 "
* PAGE_SIZE = 20 "
* SORT_FIELDNAMES = "Sort Fields for Search
* FREE_SEARCH = "
IMPORTING
RESULT = "Search Result
NUMBER_OF_TOTAL_HITS = "
MESSAGES = "
IMPORTING Parameters details for HRTMC_SEARCH_OBJECTS
SEARCH_CONFIG_ID - Search Configuration
Data type: HRTMC_SEARCH_CONFIG_IDOptional: No
Call by Reference: No ( called with pass by value option)
SELECTION_DATE - Date
Data type: DATUMDefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
SEARCH_CRITERIA - Search Criteria
Data type: HRTMC_T_SEARCH_CRITERIAOptional: Yes
Call by Reference: No ( called with pass by value option)
UNDER_RESPONSIBILITY_AREA - Checkbox
Data type: XFELDOptional: Yes
Call by Reference: No ( called with pass by value option)
RESPONSE_ATTRIBUTES - Fields for Search
Data type: HRTMC_T_SEARCH_FIELDNAMEOptional: Yes
Call by Reference: No ( called with pass by value option)
START_INDEX -
Data type: IDefault: 1
Optional: Yes
Call by Reference: No ( called with pass by value option)
PAGE_SIZE -
Data type: IDefault: 20
Optional: Yes
Call by Reference: No ( called with pass by value option)
SORT_FIELDNAMES - Sort Fields for Search
Data type: HRTMC_T_SEARCH_SORT_FIELDOptional: Yes
Call by Reference: No ( called with pass by value option)
FREE_SEARCH -
Data type: STRINGOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for HRTMC_SEARCH_OBJECTS
RESULT - Search Result
Data type: HRTMC_T_SEARCH_RESULTOptional: No
Call by Reference: No ( called with pass by value option)
NUMBER_OF_TOTAL_HITS -
Data type: IOptional: No
Call by Reference: No ( called with pass by value option)
MESSAGES -
Data type: BAPIRET2_TABOptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for HRTMC_SEARCH_OBJECTS 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_result | TYPE HRTMC_T_SEARCH_RESULT, " | |||
| lv_search_config_id | TYPE HRTMC_SEARCH_CONFIG_ID, " | |||
| lv_selection_date | TYPE DATUM, " SY-DATUM | |||
| lv_number_of_total_hits | TYPE I, " | |||
| lv_messages | TYPE BAPIRET2_TAB, " | |||
| lv_search_criteria | TYPE HRTMC_T_SEARCH_CRITERIA, " | |||
| lv_under_responsibility_area | TYPE XFELD, " | |||
| lv_response_attributes | TYPE HRTMC_T_SEARCH_FIELDNAME, " | |||
| lv_start_index | TYPE I, " 1 | |||
| lv_page_size | TYPE I, " 20 | |||
| lv_sort_fieldnames | TYPE HRTMC_T_SEARCH_SORT_FIELD, " | |||
| lv_free_search | TYPE STRING. " |
|   CALL FUNCTION 'HRTMC_SEARCH_OBJECTS' " |
| EXPORTING | ||
| SEARCH_CONFIG_ID | = lv_search_config_id | |
| SELECTION_DATE | = lv_selection_date | |
| SEARCH_CRITERIA | = lv_search_criteria | |
| UNDER_RESPONSIBILITY_AREA | = lv_under_responsibility_area | |
| RESPONSE_ATTRIBUTES | = lv_response_attributes | |
| START_INDEX | = lv_start_index | |
| PAGE_SIZE | = lv_page_size | |
| SORT_FIELDNAMES | = lv_sort_fieldnames | |
| FREE_SEARCH | = lv_free_search | |
| IMPORTING | ||
| RESULT | = lv_result | |
| NUMBER_OF_TOTAL_HITS | = lv_number_of_total_hits | |
| MESSAGES | = lv_messages | |
| . " HRTMC_SEARCH_OBJECTS | ||
ABAP code using 7.40 inline data declarations to call FM HRTMC_SEARCH_OBJECTS
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.| DATA(ld_selection_date) | = SY-DATUM. | |||
| DATA(ld_start_index) | = 1. | |||
| DATA(ld_page_size) | = 20. | |||
Search for further information about these or an SAP related objects