SAP HELP_VALUES_GET_AND_RETURN_TAB Function Module for Use F4IF_INT_TABLE_VALUE_REQUEST
HELP_VALUES_GET_AND_RETURN_TAB is a standard help values get and return tab SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Use F4IF_INT_TABLE_VALUE_REQUEST 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 help values get and return tab FM, simply by entering the name HELP_VALUES_GET_AND_RETURN_TAB into the relevant SAP transaction such as SE37 or SE38.
Function Group: SHL2
Program Name: SAPLSHL2
Main Program: SAPLSHL2
Appliation area: S
Release date: 25-Mar-1997
Mode(Normal, Remote etc): Normal Function Module
Update:

Function HELP_VALUES_GET_AND_RETURN_TAB 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 'HELP_VALUES_GET_AND_RETURN_TAB'"Use F4IF_INT_TABLE_VALUE_REQUEST.
EXPORTING
* CUCOL = 0 "Cursor position: Column
* MARK_ALL_BY_DEFAULT = ' ' "Display all values as already marked
* RETURN_PRESEL_VALUES = ' ' "Return pre-selected values
* CUROW = 0 "Cursor position: Line
* DISPLAY = ' ' "Display flag: 'X' display only, ' ' with choice
SELECTFIELD = "Chosen table field
TABLENAME = "Name of the Dict.tab.,struct.of the int. table
* WRITE_SELECTFIELD_IN_COLOURS = 'X' "Color display of selected values
* USE_USER_DEFINED_FIELDS = ' ' "User table definition: 'X'
* NO_SCROLL = ' ' "No list scroll when marking: 'X'
* TITEL = ' ' "Title of the F4 popup
IMPORTING
RETURNCODE = "Action code: 12 Cancel, 0 otherwise
TABLES
FULL_TABLE = "Internal Table
SELECTION_TAB = "Lines and values return table
* USER_FIELDS = "User-specified table fields
* USER_MARKED_VALUES = "Values which are to be marked in the list
EXCEPTIONS
NO_TABLEFIELDS_IN_DICTIONARY = 1 NO_TABLESTRUCTURE_GIVEN = 2 FIELD_NOT_IN_DDIC = 3 MORE_THEN_ONE_SELECTFIELD = 4 NO_SELECTFIELD = 5
IMPORTING Parameters details for HELP_VALUES_GET_AND_RETURN_TAB
CUCOL - Cursor position: Column
Data type: SY-CUCOLOptional: Yes
Call by Reference: No ( called with pass by value option)
MARK_ALL_BY_DEFAULT - Display all values as already marked
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
RETURN_PRESEL_VALUES - Return pre-selected values
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
CUROW - Cursor position: Line
Data type: SY-CUROWOptional: Yes
Call by Reference: No ( called with pass by value option)
DISPLAY - Display flag: 'X' display only, ' ' with choice
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
SELECTFIELD - Chosen table field
Data type: HELP_INFO-FIELDNAMEOptional: No
Call by Reference: No ( called with pass by value option)
TABLENAME - Name of the Dict.tab.,struct.of the int. table
Data type: HELP_INFO-TABNAMEOptional: No
Call by Reference: No ( called with pass by value option)
WRITE_SELECTFIELD_IN_COLOURS - Color display of selected values
Data type:Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
USE_USER_DEFINED_FIELDS - User table definition: 'X'
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
NO_SCROLL - No list scroll when marking: 'X'
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
TITEL - Title of the F4 popup
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for HELP_VALUES_GET_AND_RETURN_TAB
RETURNCODE - Action code: 12 Cancel, 0 otherwise
Data type: SY-SUBRCOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for HELP_VALUES_GET_AND_RETURN_TAB
FULL_TABLE - Internal Table
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
SELECTION_TAB - Lines and values return table
Data type: SHVALUEOptional: No
Call by Reference: No ( called with pass by value option)
USER_FIELDS - User-specified table fields
Data type: HELP_VALUEOptional: Yes
Call by Reference: No ( called with pass by value option)
USER_MARKED_VALUES - Values which are to be marked in the list
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NO_TABLEFIELDS_IN_DICTIONARY - No fields available in ABAP Dictionary
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_TABLESTRUCTURE_GIVEN - No Dictionary table name specified
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
FIELD_NOT_IN_DDIC - Table (field) not (active) in DDIC.
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
MORE_THEN_ONE_SELECTFIELD - More than one field flagged as F4 field.
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_SELECTFIELD - No field flagged as F4 field
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for HELP_VALUES_GET_AND_RETURN_TAB 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_cucol | TYPE SY-CUCOL, " 0 | |||
| lt_full_table | TYPE STANDARD TABLE OF SY, " | |||
| lv_returncode | TYPE SY-SUBRC, " | |||
| lv_no_tablefields_in_dictionary | TYPE SY, " | |||
| lv_mark_all_by_default | TYPE SY, " SPACE | |||
| lv_return_presel_values | TYPE SY, " SPACE | |||
| lv_curow | TYPE SY-CUROW, " 0 | |||
| lt_selection_tab | TYPE STANDARD TABLE OF SHVALUE, " | |||
| lv_no_tablestructure_given | TYPE SHVALUE, " | |||
| lv_display | TYPE SHVALUE, " SPACE | |||
| lt_user_fields | TYPE STANDARD TABLE OF HELP_VALUE, " | |||
| lv_field_not_in_ddic | TYPE HELP_VALUE, " | |||
| lv_selectfield | TYPE HELP_INFO-FIELDNAME, " | |||
| lt_user_marked_values | TYPE STANDARD TABLE OF HELP_INFO, " | |||
| lv_more_then_one_selectfield | TYPE HELP_INFO, " | |||
| lv_tablename | TYPE HELP_INFO-TABNAME, " | |||
| lv_no_selectfield | TYPE HELP_INFO, " | |||
| lv_write_selectfield_in_colours | TYPE HELP_INFO, " 'X' | |||
| lv_use_user_defined_fields | TYPE HELP_INFO, " SPACE | |||
| lv_no_scroll | TYPE HELP_INFO, " SPACE | |||
| lv_titel | TYPE HELP_INFO. " SPACE |
|   CALL FUNCTION 'HELP_VALUES_GET_AND_RETURN_TAB' "Use F4IF_INT_TABLE_VALUE_REQUEST |
| EXPORTING | ||
| CUCOL | = lv_cucol | |
| MARK_ALL_BY_DEFAULT | = lv_mark_all_by_default | |
| RETURN_PRESEL_VALUES | = lv_return_presel_values | |
| CUROW | = lv_curow | |
| DISPLAY | = lv_display | |
| SELECTFIELD | = lv_selectfield | |
| TABLENAME | = lv_tablename | |
| WRITE_SELECTFIELD_IN_COLOURS | = lv_write_selectfield_in_colours | |
| USE_USER_DEFINED_FIELDS | = lv_use_user_defined_fields | |
| NO_SCROLL | = lv_no_scroll | |
| TITEL | = lv_titel | |
| IMPORTING | ||
| RETURNCODE | = lv_returncode | |
| TABLES | ||
| FULL_TABLE | = lt_full_table | |
| SELECTION_TAB | = lt_selection_tab | |
| USER_FIELDS | = lt_user_fields | |
| USER_MARKED_VALUES | = lt_user_marked_values | |
| EXCEPTIONS | ||
| NO_TABLEFIELDS_IN_DICTIONARY = 1 | ||
| NO_TABLESTRUCTURE_GIVEN = 2 | ||
| FIELD_NOT_IN_DDIC = 3 | ||
| MORE_THEN_ONE_SELECTFIELD = 4 | ||
| NO_SELECTFIELD = 5 | ||
| . " HELP_VALUES_GET_AND_RETURN_TAB | ||
ABAP code using 7.40 inline data declarations to call FM HELP_VALUES_GET_AND_RETURN_TAB
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 CUCOL FROM SY INTO @DATA(ld_cucol). | ||||
| "SELECT single SUBRC FROM SY INTO @DATA(ld_returncode). | ||||
| DATA(ld_mark_all_by_default) | = ' '. | |||
| DATA(ld_return_presel_values) | = ' '. | |||
| "SELECT single CUROW FROM SY INTO @DATA(ld_curow). | ||||
| DATA(ld_display) | = ' '. | |||
| "SELECT single FIELDNAME FROM HELP_INFO INTO @DATA(ld_selectfield). | ||||
| "SELECT single TABNAME FROM HELP_INFO INTO @DATA(ld_tablename). | ||||
| DATA(ld_write_selectfield_in_colours) | = 'X'. | |||
| DATA(ld_use_user_defined_fields) | = ' '. | |||
| DATA(ld_no_scroll) | = ' '. | |||
| DATA(ld_titel) | = ' '. | |||
Search for further information about these or an SAP related objects