SAP F4_SELECT_SEARCH_HELP Function Module for Select search help taking default values into consideration
F4_SELECT_SEARCH_HELP is a standard f4 select search help SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Select search help taking default values into consideration 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 f4 select search help FM, simply by entering the name F4_SELECT_SEARCH_HELP into the relevant SAP transaction such as SE37 or SE38.
Function Group: SDH3
Program Name: SAPLSDH3
Main Program: SAPLSDH3
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
![](https://www.se80.co.uk/training-education/wp-content/uploads/2019/07/normal-function-module.png)
Function F4_SELECT_SEARCH_HELP 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 'F4_SELECT_SEARCH_HELP'"Select search help taking default values into consideration.
EXPORTING
SHLPNAME_IN = "
* HOT_KEY = "
* NO_USER_EXIT = "
* STARTING_X = 1 "
* STARTING_Y = 1 "
IMPORTING
SHLP_OUT = "
FCODE = "
EXCEPTIONS
INVALID_HOTKEY = 1 INTERNAL_ERROR = 2
IMPORTING Parameters details for F4_SELECT_SEARCH_HELP
SHLPNAME_IN -
Data type: DD30L-SHLPNAMEOptional: No
Call by Reference: No ( called with pass by value option)
HOT_KEY -
Data type: DD30L-HOTKEYOptional: Yes
Call by Reference: No ( called with pass by value option)
NO_USER_EXIT -
Data type: COptional: Yes
Call by Reference: No ( called with pass by value option)
STARTING_X -
Data type: SY-CUCOLDefault: 1
Optional: Yes
Call by Reference: No ( called with pass by value option)
STARTING_Y -
Data type: SY-CUROWDefault: 1
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for F4_SELECT_SEARCH_HELP
SHLP_OUT -
Data type: DDSHDESCROptional: No
Call by Reference: No ( called with pass by value option)
FCODE -
Data type: SY-UCOMMOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
INVALID_HOTKEY -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INTERNAL_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for F4_SELECT_SEARCH_HELP 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_shlp_out | TYPE DDSHDESCR, " | |||
lv_shlpname_in | TYPE DD30L-SHLPNAME, " | |||
lv_invalid_hotkey | TYPE DD30L, " | |||
lv_fcode | TYPE SY-UCOMM, " | |||
lv_hot_key | TYPE DD30L-HOTKEY, " | |||
lv_internal_error | TYPE DD30L, " | |||
lv_no_user_exit | TYPE C, " | |||
lv_starting_x | TYPE SY-CUCOL, " 1 | |||
lv_starting_y | TYPE SY-CUROW. " 1 |
  CALL FUNCTION 'F4_SELECT_SEARCH_HELP' "Select search help taking default values into consideration |
EXPORTING | ||
SHLPNAME_IN | = lv_shlpname_in | |
HOT_KEY | = lv_hot_key | |
NO_USER_EXIT | = lv_no_user_exit | |
STARTING_X | = lv_starting_x | |
STARTING_Y | = lv_starting_y | |
IMPORTING | ||
SHLP_OUT | = lv_shlp_out | |
FCODE | = lv_fcode | |
EXCEPTIONS | ||
INVALID_HOTKEY = 1 | ||
INTERNAL_ERROR = 2 | ||
. " F4_SELECT_SEARCH_HELP |
ABAP code using 7.40 inline data declarations to call FM F4_SELECT_SEARCH_HELP
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 SHLPNAME FROM DD30L INTO @DATA(ld_shlpname_in). | ||||
"SELECT single UCOMM FROM SY INTO @DATA(ld_fcode). | ||||
"SELECT single HOTKEY FROM DD30L INTO @DATA(ld_hot_key). | ||||
"SELECT single CUCOL FROM SY INTO @DATA(ld_starting_x). | ||||
DATA(ld_starting_x) | = 1. | |||
"SELECT single CUROW FROM SY INTO @DATA(ld_starting_y). | ||||
DATA(ld_starting_y) | = 1. | |||
Search for further information about these or an SAP related objects