SAP F4IF_FIELD_VALUE_REQUEST Function Module for F4 help for fields that are only known at runtime
F4IF_FIELD_VALUE_REQUEST is a standard f4if field value request SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for F4 help for fields that are only known at runtime 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 f4if field value request FM, simply by entering the name F4IF_FIELD_VALUE_REQUEST into the relevant SAP transaction such as SE37 or SE38.
Function Group: SDHI
Program Name: SAPLSDHI
Main Program: SAPLSDHI
Appliation area: S
Release date: 27-May-1999
Mode(Normal, Remote etc): Normal Function Module
Update:
Function F4IF_FIELD_VALUE_REQUEST 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 'F4IF_FIELD_VALUE_REQUEST'"F4 help for fields that are only known at runtime.
EXPORTING
TABNAME = "Table/structure name from Dictionary
* MULTIPLE_CHOICE = ' ' "Switch on multiple selection
* DISPLAY = ' ' "Override readiness for input
* SUPPRESS_RECORDLIST = ' ' "Skip display of the hit list
* CALLBACK_PROGRAM = ' ' "Program for callback before F4 start
* CALLBACK_FORM = ' ' "Form for callback before F4 start (-> long docu)
* CALLBACK_METHOD = "Interface for Callback Routines
* SELECTION_SCREEN = ' ' "Behavior as in Selection Screen (->Long Docu)
FIELDNAME = "Field name from Dictionary
* SEARCHHELP = ' ' "Search help as screen field attribute
* SHLPPARAM = ' ' "Search help parameter in screen field
* DYNPPROG = ' ' "Current program
* DYNPNR = ' ' "Screen number
* DYNPROFIELD = ' ' "Name of screen field for value return
* STEPL = 0 "Steploop line of screen field
* VALUE = ' ' "Field contents for F4 call
IMPORTING
USER_RESET = "Single-Character Flag
TABLES
* RETURN_TAB = "Return the selected value
EXCEPTIONS
FIELD_NOT_FOUND = 1 NO_HELP_FOR_FIELD = 2 INCONSISTENT_HELP = 3 NO_VALUES_FOUND = 4
IMPORTING Parameters details for F4IF_FIELD_VALUE_REQUEST
TABNAME - Table/structure name from Dictionary
Data type: DFIES-TABNAMEOptional: No
Call by Reference: No ( called with pass by value option)
MULTIPLE_CHOICE - Switch on multiple selection
Data type: DDBOOL_DDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
DISPLAY - Override readiness for input
Data type: DDBOOL_DDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
SUPPRESS_RECORDLIST - Skip display of the hit list
Data type: DDSHF4CTRL-HIDE_LISTDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
CALLBACK_PROGRAM - Program for callback before F4 start
Data type: SY-REPIDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
CALLBACK_FORM - Form for callback before F4 start (-> long docu)
Data type: SY-XFORMDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
CALLBACK_METHOD - Interface for Callback Routines
Data type: IF_F4CALLBACK_VALUE_REQUESTOptional: Yes
Call by Reference: Yes
SELECTION_SCREEN - Behavior as in Selection Screen (->Long Docu)
Data type: DDBOOL_DDefault: SPACE
Optional: Yes
Call by Reference: Yes
FIELDNAME - Field name from Dictionary
Data type: DFIES-FIELDNAMEOptional: No
Call by Reference: No ( called with pass by value option)
SEARCHHELP - Search help as screen field attribute
Data type: SHLPNAMEDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
SHLPPARAM - Search help parameter in screen field
Data type: SHLPFIELDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
DYNPPROG - Current program
Data type: SY-REPIDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
DYNPNR - Screen number
Data type: SY-DYNNRDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
DYNPROFIELD - Name of screen field for value return
Data type: HELP_INFO-DYNPROFLDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
STEPL - Steploop line of screen field
Data type: SY-STEPLOptional: Yes
Call by Reference: No ( called with pass by value option)
VALUE - Field contents for F4 call
Data type: HELP_INFO-FLDVALUEDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for F4IF_FIELD_VALUE_REQUEST
USER_RESET - Single-Character Flag
Data type: COptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for F4IF_FIELD_VALUE_REQUEST
RETURN_TAB - Return the selected value
Data type: DDSHRETVALOptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
FIELD_NOT_FOUND - Field does not exist in the Dictionary
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_HELP_FOR_FIELD - No F4 help is defined for the field
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INCONSISTENT_HELP - F4 help for the field is inconsistent
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_VALUES_FOUND - No values found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for F4IF_FIELD_VALUE_REQUEST 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_tabname | TYPE DFIES-TABNAME, " | |||
lt_return_tab | TYPE STANDARD TABLE OF DDSHRETVAL, " | |||
lv_user_reset | TYPE C, " | |||
lv_field_not_found | TYPE C, " | |||
lv_multiple_choice | TYPE DDBOOL_D, " SPACE | |||
lv_display | TYPE DDBOOL_D, " SPACE | |||
lv_suppress_recordlist | TYPE DDSHF4CTRL-HIDE_LIST, " SPACE | |||
lv_callback_program | TYPE SY-REPID, " SPACE | |||
lv_callback_form | TYPE SY-XFORM, " SPACE | |||
lv_callback_method | TYPE IF_F4CALLBACK_VALUE_REQUEST, " | |||
lv_selection_screen | TYPE DDBOOL_D, " SPACE | |||
lv_fieldname | TYPE DFIES-FIELDNAME, " | |||
lv_no_help_for_field | TYPE DFIES, " | |||
lv_searchhelp | TYPE SHLPNAME, " SPACE | |||
lv_inconsistent_help | TYPE SHLPNAME, " | |||
lv_shlpparam | TYPE SHLPFIELD, " SPACE | |||
lv_no_values_found | TYPE SHLPFIELD, " | |||
lv_dynpprog | TYPE SY-REPID, " SPACE | |||
lv_dynpnr | TYPE SY-DYNNR, " SPACE | |||
lv_dynprofield | TYPE HELP_INFO-DYNPROFLD, " SPACE | |||
lv_stepl | TYPE SY-STEPL, " 0 | |||
lv_value | TYPE HELP_INFO-FLDVALUE. " SPACE |
  CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST' "F4 help for fields that are only known at runtime |
EXPORTING | ||
TABNAME | = lv_tabname | |
MULTIPLE_CHOICE | = lv_multiple_choice | |
DISPLAY | = lv_display | |
SUPPRESS_RECORDLIST | = lv_suppress_recordlist | |
CALLBACK_PROGRAM | = lv_callback_program | |
CALLBACK_FORM | = lv_callback_form | |
CALLBACK_METHOD | = lv_callback_method | |
SELECTION_SCREEN | = lv_selection_screen | |
FIELDNAME | = lv_fieldname | |
SEARCHHELP | = lv_searchhelp | |
SHLPPARAM | = lv_shlpparam | |
DYNPPROG | = lv_dynpprog | |
DYNPNR | = lv_dynpnr | |
DYNPROFIELD | = lv_dynprofield | |
STEPL | = lv_stepl | |
VALUE | = lv_value | |
IMPORTING | ||
USER_RESET | = lv_user_reset | |
TABLES | ||
RETURN_TAB | = lt_return_tab | |
EXCEPTIONS | ||
FIELD_NOT_FOUND = 1 | ||
NO_HELP_FOR_FIELD = 2 | ||
INCONSISTENT_HELP = 3 | ||
NO_VALUES_FOUND = 4 | ||
. " F4IF_FIELD_VALUE_REQUEST |
ABAP code using 7.40 inline data declarations to call FM F4IF_FIELD_VALUE_REQUEST
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 TABNAME FROM DFIES INTO @DATA(ld_tabname). | ||||
DATA(ld_multiple_choice) | = ' '. | |||
DATA(ld_display) | = ' '. | |||
"SELECT single HIDE_LIST FROM DDSHF4CTRL INTO @DATA(ld_suppress_recordlist). | ||||
DATA(ld_suppress_recordlist) | = ' '. | |||
"SELECT single REPID FROM SY INTO @DATA(ld_callback_program). | ||||
DATA(ld_callback_program) | = ' '. | |||
"SELECT single XFORM FROM SY INTO @DATA(ld_callback_form). | ||||
DATA(ld_callback_form) | = ' '. | |||
DATA(ld_selection_screen) | = ' '. | |||
"SELECT single FIELDNAME FROM DFIES INTO @DATA(ld_fieldname). | ||||
DATA(ld_searchhelp) | = ' '. | |||
DATA(ld_shlpparam) | = ' '. | |||
"SELECT single REPID FROM SY INTO @DATA(ld_dynpprog). | ||||
DATA(ld_dynpprog) | = ' '. | |||
"SELECT single DYNNR FROM SY INTO @DATA(ld_dynpnr). | ||||
DATA(ld_dynpnr) | = ' '. | |||
"SELECT single DYNPROFLD FROM HELP_INFO INTO @DATA(ld_dynprofield). | ||||
DATA(ld_dynprofield) | = ' '. | |||
"SELECT single STEPL FROM SY INTO @DATA(ld_stepl). | ||||
"SELECT single FLDVALUE FROM HELP_INFO INTO @DATA(ld_value). | ||||
DATA(ld_value) | = ' '. | |||
Search for further information about these or an SAP related objects