SAP Tables

F4IF_FIELD_VALUE_REQUEST SAP Function module - F4 help for fields that are only known at runtime

F4IF_FIELD_VALUE_REQUESTis a standard SAP function module available within R/3 SAPsystems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import/export parameters, exceptions etc as well as any documentation contributions specific to the object. See here to view full function module documentation and code listing, simply by entering the name F4IF_FIELD_VALUE_REQUEST into the relevant SAP transaction such as SE37 or SE80.

Contribute (Add Comments)
Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name F4IF_FIELD_VALUE_REQUEST or its description.

Associated Function Group: SDHI
Released Date: 27.05.1999
CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST' "F4 help for fields that are only known at runtime
    tabname =                   " dfies-tabname  Table/structure name from Dictionary
    fieldname =                 " dfies-fieldname  Field name from Dictionary
*   searchhelp = SPACE          " shlpname      Search help as screen field attribute
*   shlpparam = SPACE           " shlpfield     Search help parameter in screen field
*   dynpprog = SPACE            " sy-repid      Current program
*   dynpnr = SPACE              " sy-dynnr      Screen number
*   dynprofield = SPACE         " help_info-dynprofld  Name of screen field for value return
*   stepl = 0                   " sy-stepl      Steploop line of screen field
*   value = SPACE               " help_info-fldvalue  Field contents for F4 call
*   multiple_choice = SPACE     " ddbool_d      Switch on multiple selection
*   display = SPACE             " ddbool_d      Override readiness for input
*   suppress_recordlist = SPACE  " ddshf4ctrl-hide_list  Skip display of the hit list
*   callback_program = SPACE    " sy-repid      Program for callback before F4 start
*   callback_form = SPACE       " sy-xform      Form for callback before F4 start (-> long docu)
*   callback_method =           " if_f4callback_value_request  Interface for Callback Routines
*   selection_screen = SPACE    " ddbool_d      Behavior as in Selection Screen (->Long Docu)
    user_reset =                " c             Single-Character Flag
*   return_tab =                " ddshretval    Return the selected value
    FIELD_NOT_FOUND = 1         "               Field does not exist in the Dictionary
    NO_HELP_FOR_FIELD = 2       "               No F4 help is defined for the field
    INCONSISTENT_HELP = 3       "               F4 help for the field is inconsistent
    NO_VALUES_FOUND = 4         "               No values found

ABAP code example for Function Module F4IF_FIELD_VALUE_REQUEST

The ABAP code below is a full code listing to execute function module F4IF_FIELD_VALUE_REQUEST including all data declarations. The code uses the latest in-line data declaration syntax but I have included an abap code snipet at the end to show how declarations would look using the original method of declaring data variables up front. 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).
ld_user_reset   TYPE C,
it_return_tab   TYPE STANDARD TABLE OF DDSHRETVAL,"tables param
wa_return_tab LIKE LINE OF it_return_tab  .

DATA(ld_tabname). = 'some text here'

DATA(ld_fieldname). = 'some text here'
DATA(ld_searchhelp) = 'Check type of data required'.
DATA(ld_shlpparam) = 'Check type of data required'.
DATA(ld_dynpprog) = 'some text here'.
DATA(ld_dynpnr) = 'some text here'.

DATA(ld_dynprofield). = 'some text here'
DATA(ld_stepl) = 'some text here'.

DATA(ld_value). = 'some text here'
DATA(ld_multiple_choice) = 'some text here'.
DATA(ld_display) = 'some text here'.

DATA(ld_suppress_recordlist). = 'some text here'
DATA(ld_callback_program) = 'some text here'.
DATA(ld_callback_form) = 'some text here'.
DATA(ld_callback_method) = 'some text here'.
DATA(ld_selection_screen) = 'some text here'.

"populate fields of struture and append to itab
append wa_return_tab to it_return_tab.. CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST' EXPORTING tabname = ld_tabname fieldname = ld_fieldname * searchhelp = ld_searchhelp * shlpparam = ld_shlpparam * dynpprog = ld_dynpprog * dynpnr = ld_dynpnr * dynprofield = ld_dynprofield * stepl = ld_stepl * value = ld_value * multiple_choice = ld_multiple_choice * display = ld_display * suppress_recordlist = ld_suppress_recordlist * callback_program = ld_callback_program * callback_form = ld_callback_form * callback_method = ld_callback_method * selection_screen = ld_selection_screen IMPORTING user_reset = ld_user_reset * TABLES * return_tab = it_return_tab EXCEPTIONS FIELD_NOT_FOUND = 1 NO_HELP_FOR_FIELD = 2 INCONSISTENT_HELP = 3 NO_VALUES_FOUND = 4 . " F4IF_FIELD_VALUE_REQUEST
IF SY-SUBRC EQ 0.   "All OK ELSEIF SY-SUBRC EQ 1. "Exception   "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception   "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception   "Add code for exception here ELSEIF SY-SUBRC EQ 4. "Exception   "Add code for exception here ENDIF.

ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.
ld_user_reset TYPE C ,
wa_return_tab LIKE LINE OF it_return_tab,
ld_searchhelp TYPE SHLPNAME ,
ld_shlpparam TYPE SHLPFIELD ,
ld_dynpprog TYPE SY-REPID ,
ld_dynpnr TYPE SY-DYNNR ,
ld_stepl TYPE SY-STEPL ,
ld_multiple_choice TYPE DDBOOL_D ,
ld_display TYPE DDBOOL_D ,
ld_suppress_recordlist TYPE DDSHF4CTRL-HIDE_LIST ,
ld_callback_program TYPE SY-REPID ,
ld_callback_form TYPE SY-XFORM ,
ld_selection_screen TYPE DDBOOL_D .

ld_user_reset = 'some text here'.

DATA(ld_tabname). = 'some text here'

"populate fields of struture and append to itab
append wa_return_tab to it_return_tab.

DATA(ld_fieldname). = 'some text here'
ld_searchhelp = 'some text here'.
ld_shlpparam = 'some text here'.
ld_dynpprog = 'some text here'.
ld_dynpnr = 'some text here'.

DATA(ld_dynprofield). = 'some text here'
ld_stepl = 'some text here'.

DATA(ld_value). = 'some text here'
ld_multiple_choice = 'some text here'.
ld_display = 'some text here'.

DATA(ld_suppress_recordlist). = 'some text here'
ld_callback_program = 'some text here'.
ld_callback_form = 'some text here'.
ld_callback_method = 'some text here'.
ld_selection_screen = 'some text here'..


This module permits the implementation of the standard help for a screen field whose reference to the ABAP Dictionary is only known at ...See here for full SAP fm documentation