SAP Function Modules

HELP_VALUES_SHOW SAP Function module







HELP_VALUES_SHOW is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name HELP_VALUES_SHOW into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: SHL2
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM HELP_VALUES_SHOW - HELP VALUES SHOW





CALL FUNCTION 'HELP_VALUES_SHOW' "
  EXPORTING
*   cucol = SY-CUCOL            " sy-cucol      Cursor position: Column
*   curow = SY-CUROW            " sy-curow      Cursor position: Line
*   display = SPACE             "               Display flag
    fieldinfo =                 " help_info     Help structure
*   max_entries = 100           "               Number of entries until limit
*   shrink_flag = SPACE         "               Flag whether restriction was made
*   number_of_f4_call = SPACE   "               Flag, how often F4 has been processed
*   space_means_generic = 'X'   "               SPACE is interpreted generically for restrictions
*   do_not_display_values = SPACE  "
  IMPORTING
    retcode =                   " sy-subrc      Return code
    selection =                 "               Selection flag
    select_value =              " help_info-fldvalue  Selected value
    next_call =                 "               Next F4 call
    select_index =              " sy-tabix      Selected list/table index
  TABLES
    dynpselect =                " dselc         Screen input structure
    dynpvaluetab =              " dval          Screen input value
*   structure_table =           " shstruc
*   values_table =              " shvalue
  EXCEPTIONS
    CHECK_TABLE_LOCKED = 1      "               Check table locked
    NO_VALUES_FOR_FIELD = 2     "               No entries for field
    TABLEFIELD_DOES_NOT_EXIST = 3  "            Table field does not exist
    .  "  HELP_VALUES_SHOW

ABAP code example for Function Module HELP_VALUES_SHOW





The ABAP code below is a full code listing to execute function module HELP_VALUES_SHOW including all data declarations. The code uses 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 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).

DATA:
ld_retcode  TYPE SY-SUBRC ,
ld_selection  TYPE STRING ,
ld_select_value  TYPE HELP_INFO-FLDVALUE ,
ld_next_call  TYPE STRING ,
ld_select_index  TYPE SY-TABIX ,
it_dynpselect  TYPE STANDARD TABLE OF DSELC,"TABLES PARAM
wa_dynpselect  LIKE LINE OF it_dynpselect ,
it_dynpvaluetab  TYPE STANDARD TABLE OF DVAL,"TABLES PARAM
wa_dynpvaluetab  LIKE LINE OF it_dynpvaluetab ,
it_structure_table  TYPE STANDARD TABLE OF SHSTRUC,"TABLES PARAM
wa_structure_table  LIKE LINE OF it_structure_table ,
it_values_table  TYPE STANDARD TABLE OF SHVALUE,"TABLES PARAM
wa_values_table  LIKE LINE OF it_values_table .

DATA(ld_cucol) = '123 '.
DATA(ld_curow) = '123 '.
DATA(ld_display) = 'some text here'.
DATA(ld_fieldinfo) = 'Check type of data required'.
DATA(ld_max_entries) = 'some text here'.
DATA(ld_shrink_flag) = 'some text here'.
DATA(ld_number_of_f4_call) = 'some text here'.
DATA(ld_space_means_generic) = 'some text here'.
DATA(ld_do_not_display_values) = 'some text here'.

"populate fields of struture and append to itab
append wa_dynpselect to it_dynpselect.

"populate fields of struture and append to itab
append wa_dynpvaluetab to it_dynpvaluetab.

"populate fields of struture and append to itab
append wa_structure_table to it_structure_table.

"populate fields of struture and append to itab
append wa_values_table to it_values_table. . CALL FUNCTION 'HELP_VALUES_SHOW' EXPORTING * cucol = ld_cucol * curow = ld_curow * display = ld_display fieldinfo = ld_fieldinfo * max_entries = ld_max_entries * shrink_flag = ld_shrink_flag * number_of_f4_call = ld_number_of_f4_call * space_means_generic = ld_space_means_generic * do_not_display_values = ld_do_not_display_values IMPORTING retcode = ld_retcode selection = ld_selection select_value = ld_select_value next_call = ld_next_call select_index = ld_select_index TABLES dynpselect = it_dynpselect dynpvaluetab = it_dynpvaluetab * structure_table = it_structure_table * values_table = it_values_table EXCEPTIONS CHECK_TABLE_LOCKED = 1 NO_VALUES_FOR_FIELD = 2 TABLEFIELD_DOES_NOT_EXIST = 3 . " HELP_VALUES_SHOW
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 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.

DATA:
ld_retcode  TYPE SY-SUBRC ,
ld_cucol  TYPE SY-CUCOL ,
it_dynpselect  TYPE STANDARD TABLE OF DSELC ,
wa_dynpselect  LIKE LINE OF it_dynpselect,
ld_selection  TYPE STRING ,
ld_curow  TYPE SY-CUROW ,
it_dynpvaluetab  TYPE STANDARD TABLE OF DVAL ,
wa_dynpvaluetab  LIKE LINE OF it_dynpvaluetab,
ld_select_value  TYPE HELP_INFO-FLDVALUE ,
ld_display  TYPE STRING ,
it_structure_table  TYPE STANDARD TABLE OF SHSTRUC ,
wa_structure_table  LIKE LINE OF it_structure_table,
ld_next_call  TYPE STRING ,
ld_fieldinfo  TYPE HELP_INFO ,
it_values_table  TYPE STANDARD TABLE OF SHVALUE ,
wa_values_table  LIKE LINE OF it_values_table,
ld_select_index  TYPE SY-TABIX ,
ld_max_entries  TYPE STRING ,
ld_shrink_flag  TYPE STRING ,
ld_number_of_f4_call  TYPE STRING ,
ld_space_means_generic  TYPE STRING ,
ld_do_not_display_values  TYPE STRING .

ld_cucol = '123 '.

"populate fields of struture and append to itab
append wa_dynpselect to it_dynpselect.
ld_curow = '123 '.

"populate fields of struture and append to itab
append wa_dynpvaluetab to it_dynpvaluetab.
ld_display = 'some text here'.

"populate fields of struture and append to itab
append wa_structure_table to it_structure_table.
ld_fieldinfo = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_values_table to it_values_table.
ld_max_entries = 'some text here'.
ld_shrink_flag = 'some text here'.
ld_number_of_f4_call = 'some text here'.
ld_space_means_generic = 'some text here'.
ld_do_not_display_values = 'some text here'.

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 HELP_VALUES_SHOW or its description.