SAP Function Modules

HELP_VALUES_GET_RETURN_VALUES SAP Function module - Use F4IF_INT_TABLE_VALUE_REQUEST







HELP_VALUES_GET_RETURN_VALUES 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_GET_RETURN_VALUES into the relevant SAP transaction such as SE37 or SE80.

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


Pattern for FM HELP_VALUES_GET_RETURN_VALUES - HELP VALUES GET RETURN VALUES





CALL FUNCTION 'HELP_VALUES_GET_RETURN_VALUES' "Use F4IF_INT_TABLE_VALUE_REQUEST
  EXPORTING
*   cucol = 0                   " sy-cucol      Cursor Position: Column
*   curow = 0                   " sy-curow      Cursor Position: Line
*   display = SPACE             "               Display Flag: 'X' Display Only, ' ' with Choice
    tabname =                   " help_info-tabname  Table Name
    selectfield =               " help_info-fieldname  Chosen Table Field
*   titel = SPACE               "               Title of the F4 Popup
*   write_selectfield_in_colours = 'X'  "       Select Field Output in Color
*   show_all_values_at_first_time = SPACE  "    Ignore 100 Values Limit for First Call
  TABLES
    selection_tab =             " shvalue       Table of Selected Fields
    all_values_selection_tab =   " shvalue      All Values from Rows of the Selected Fields
*   user_marked_values =        "
*   structure_of_vals =         " shstruc
  EXCEPTIONS
    TABLE_NOT_IN_DDIC = 1       "               Table not in Dictionary
    NO_SELECTFIELD_GIVEN = 2    "               No Field Selected
    ERROR_FROM_DATABASE = 3     "               Database Error
    MORE_THEN_ONE_SELECTFIELD = 4  "            More than One Field Selected
    NO_SELECTFIELD = 5          "               No Field Selected
    NO_TABLEFIELDS_IN_DICTIONARY = 6  "         One or More Fields do not Exist in DDIC
    .  "  HELP_VALUES_GET_RETURN_VALUES

ABAP code example for Function Module HELP_VALUES_GET_RETURN_VALUES





The ABAP code below is a full code listing to execute function module HELP_VALUES_GET_RETURN_VALUES 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:
it_selection_tab  TYPE STANDARD TABLE OF SHVALUE,"TABLES PARAM
wa_selection_tab  LIKE LINE OF it_selection_tab ,
it_all_values_selection_tab  TYPE STANDARD TABLE OF SHVALUE,"TABLES PARAM
wa_all_values_selection_tab  LIKE LINE OF it_all_values_selection_tab ,
it_user_marked_values  TYPE STANDARD TABLE OF STRING,"TABLES PARAM
wa_user_marked_values  LIKE LINE OF it_user_marked_values ,
it_structure_of_vals  TYPE STANDARD TABLE OF SHSTRUC,"TABLES PARAM
wa_structure_of_vals  LIKE LINE OF it_structure_of_vals .

DATA(ld_cucol) = '123 '.
DATA(ld_curow) = '123 '.
DATA(ld_display) = 'some text here'.

DATA(ld_tabname) = some text here

DATA(ld_selectfield) = some text here
DATA(ld_titel) = 'some text here'.
DATA(ld_write_selectfield_in_colours) = 'some text here'.
DATA(ld_show_all_values_at_first_time) = 'some text here'.

"populate fields of struture and append to itab
append wa_selection_tab to it_selection_tab.

"populate fields of struture and append to itab
append wa_all_values_selection_tab to it_all_values_selection_tab.

"populate fields of struture and append to itab
append wa_user_marked_values to it_user_marked_values.

"populate fields of struture and append to itab
append wa_structure_of_vals to it_structure_of_vals. . CALL FUNCTION 'HELP_VALUES_GET_RETURN_VALUES' EXPORTING * cucol = ld_cucol * curow = ld_curow * display = ld_display tabname = ld_tabname selectfield = ld_selectfield * titel = ld_titel * write_selectfield_in_colours = ld_write_selectfield_in_colours * show_all_values_at_first_time = ld_show_all_values_at_first_time TABLES selection_tab = it_selection_tab all_values_selection_tab = it_all_values_selection_tab * user_marked_values = it_user_marked_values * structure_of_vals = it_structure_of_vals EXCEPTIONS TABLE_NOT_IN_DDIC = 1 NO_SELECTFIELD_GIVEN = 2 ERROR_FROM_DATABASE = 3 MORE_THEN_ONE_SELECTFIELD = 4 NO_SELECTFIELD = 5 NO_TABLEFIELDS_IN_DICTIONARY = 6 . " HELP_VALUES_GET_RETURN_VALUES
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 ELSEIF SY-SUBRC EQ 5. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 6. "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_cucol  TYPE SY-CUCOL ,
it_selection_tab  TYPE STANDARD TABLE OF SHVALUE ,
wa_selection_tab  LIKE LINE OF it_selection_tab,
ld_curow  TYPE SY-CUROW ,
it_all_values_selection_tab  TYPE STANDARD TABLE OF SHVALUE ,
wa_all_values_selection_tab  LIKE LINE OF it_all_values_selection_tab,
ld_display  TYPE STRING ,
it_user_marked_values  TYPE STANDARD TABLE OF STRING ,
wa_user_marked_values  LIKE LINE OF it_user_marked_values,
ld_tabname  TYPE HELP_INFO-TABNAME ,
it_structure_of_vals  TYPE STANDARD TABLE OF SHSTRUC ,
wa_structure_of_vals  LIKE LINE OF it_structure_of_vals,
ld_selectfield  TYPE HELP_INFO-FIELDNAME ,
ld_titel  TYPE STRING ,
ld_write_selectfield_in_colours  TYPE STRING ,
ld_show_all_values_at_first_time  TYPE STRING .

ld_cucol = '123 '.

"populate fields of struture and append to itab
append wa_selection_tab to it_selection_tab.
ld_curow = '123 '.

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

"populate fields of struture and append to itab
append wa_user_marked_values to it_user_marked_values.

ld_tabname = some text here

"populate fields of struture and append to itab
append wa_structure_of_vals to it_structure_of_vals.

ld_selectfield = some text here
ld_titel = 'some text here'.
ld_write_selectfield_in_colours = 'some text here'.
ld_show_all_values_at_first_time = 'some text here'.

SAP Documentation for FM HELP_VALUES_GET_RETURN_VALUES


Documentation

Functionality ...See here for full SAP fm documentation

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