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

Function TERM_SEARCH_TERM 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 'TERM_SEARCH_TERM'".
EXPORTING
* LANGU = SY-LANGU "
SEARCH_TERM = "
* INDEX_ADD_SUB_ENTRY = ' ' "
* ADD_REQ = 'X' "
TABLES
ENTRIES = "
* SEL_COMPONENT = "Reference Structure Range Table for Glossary
EXCEPTIONS
NO_ENTRY_FOUND = 1 NO_LOCALE_AVAILABLE = 2 NOT_ALLOWED_CHARACTER = 3
IMPORTING Parameters details for TERM_SEARCH_TERM
LANGU -
Data type: SY-LANGUDefault: SY-LANGU
Optional: Yes
Call by Reference: No ( called with pass by value option)
SEARCH_TERM -
Data type: STERM_TEXT-TEXTOptional: No
Call by Reference: No ( called with pass by value option)
INDEX_ADD_SUB_ENTRY -
Data type: BAPIFLAGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
ADD_REQ -
Data type: AS4FLAGDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for TERM_SEARCH_TERM
ENTRIES -
Data type: STERM_TERMOptional: No
Call by Reference: No ( called with pass by value option)
SEL_COMPONENT - Reference Structure Range Table for Glossary
Data type: STERM_SELOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
NO_ENTRY_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_LOCALE_AVAILABLE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NOT_ALLOWED_CHARACTER -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for TERM_SEARCH_TERM 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_langu | TYPE SY-LANGU, " SY-LANGU | |||
| lt_entries | TYPE STANDARD TABLE OF STERM_TERM, " | |||
| lv_no_entry_found | TYPE STERM_TERM, " | |||
| lv_search_term | TYPE STERM_TEXT-TEXT, " | |||
| lt_sel_component | TYPE STANDARD TABLE OF STERM_SEL, " | |||
| lv_no_locale_available | TYPE STERM_SEL, " | |||
| lv_index_add_sub_entry | TYPE BAPIFLAG, " SPACE | |||
| lv_not_allowed_character | TYPE BAPIFLAG, " | |||
| lv_add_req | TYPE AS4FLAG. " 'X' |
|   CALL FUNCTION 'TERM_SEARCH_TERM' " |
| EXPORTING | ||
| LANGU | = lv_langu | |
| SEARCH_TERM | = lv_search_term | |
| INDEX_ADD_SUB_ENTRY | = lv_index_add_sub_entry | |
| ADD_REQ | = lv_add_req | |
| TABLES | ||
| ENTRIES | = lt_entries | |
| SEL_COMPONENT | = lt_sel_component | |
| EXCEPTIONS | ||
| NO_ENTRY_FOUND = 1 | ||
| NO_LOCALE_AVAILABLE = 2 | ||
| NOT_ALLOWED_CHARACTER = 3 | ||
| . " TERM_SEARCH_TERM | ||
ABAP code using 7.40 inline data declarations to call FM TERM_SEARCH_TERM
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_langu). | ||||
| DATA(ld_langu) | = SY-LANGU. | |||
| "SELECT single TEXT FROM STERM_TEXT INTO @DATA(ld_search_term). | ||||
| DATA(ld_index_add_sub_entry) | = ' '. | |||
| DATA(ld_add_req) | = 'X'. | |||
Search for further information about these or an SAP related objects