SAP VALUES_DISPLAY Function Module for









VALUES_DISPLAY is a standard values display SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 values display FM, simply by entering the name VALUES_DISPLAY into the relevant SAP transaction such as SE37 or SE38.

Function Group: SHL2
Program Name: SAPLSHL2
Main Program: SAPLSHL2
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function VALUES_DISPLAY 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 'VALUES_DISPLAY'"
EXPORTING
* CUCOL = 0 "Cursor position: Column
* CUROW = 0 "Cursor position: Line
* DISPLAY = ' ' "Display flag
* FIELDNAME = ' ' "Table field name
* TABNAME = ' ' "Name of an ABAB/4 Dictionary table
* SHRINK_FLAG = ' ' "
* TITLE_IN_VALUES_LIST = ' ' "
* NO_CONVERSION = ' ' "No conversion
* EXTERNAL_F4 = ' ' "

IMPORTING
SELECT_INDEX = "
SELECT_VALUE = "Selected value
EXTERNAL_F4_CALL_2ND_TIME = "

TABLES
VALUES = "Values to be displayed
VALUESTRUCTURE = "Values structure definition
* SELECT_VALUES = "Selected Values

EXCEPTIONS
CHECK_TABLE_LOCKED = 1 NO_VALUES_FOR_FIELD = 2 TABLEFIELD_DOES_NOT_EXIST = 3
.



IMPORTING Parameters details for VALUES_DISPLAY

CUCOL - Cursor position: Column

Data type: SY-CUCOL
Optional: Yes
Call by Reference: No ( called with pass by value option)

CUROW - Cursor position: Line

Data type: SY-CUROW
Optional: Yes
Call by Reference: No ( called with pass by value option)

DISPLAY - Display flag

Data type:
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

FIELDNAME - Table field name

Data type: HELP_INFO-FIELDNAME
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

TABNAME - Name of an ABAB/4 Dictionary table

Data type: HELP_INFO-TABNAME
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

SHRINK_FLAG -

Data type:
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

TITLE_IN_VALUES_LIST -

Data type:
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

NO_CONVERSION - No conversion

Data type:
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXTERNAL_F4 -

Data type:
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for VALUES_DISPLAY

SELECT_INDEX -

Data type: SY-TABIX
Optional: No
Call by Reference: No ( called with pass by value option)

SELECT_VALUE - Selected value

Data type: HELP_INFO-FLDVALUE
Optional: No
Call by Reference: No ( called with pass by value option)

EXTERNAL_F4_CALL_2ND_TIME -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for VALUES_DISPLAY

VALUES - Values to be displayed

Data type: SHVALUE
Optional: No
Call by Reference: No ( called with pass by value option)

VALUESTRUCTURE - Values structure definition

Data type: SHSTRUC
Optional: No
Call by Reference: No ( called with pass by value option)

SELECT_VALUES - Selected Values

Data type: HELP_VTAB
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

CHECK_TABLE_LOCKED - Check table locked

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NO_VALUES_FOR_FIELD - No values exist

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

TABLEFIELD_DOES_NOT_EXIST - Table Field Does Not Exist

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for VALUES_DISPLAY 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_values  TYPE STANDARD TABLE OF SHVALUE, "   
lv_select_index  TYPE SY-TABIX, "   
lv_check_table_locked  TYPE SY, "   
lv_curow  TYPE SY-CUROW, "   0
lv_select_value  TYPE HELP_INFO-FLDVALUE, "   
lt_valuestructure  TYPE STANDARD TABLE OF SHSTRUC, "   
lv_no_values_for_field  TYPE SHSTRUC, "   
lv_display  TYPE SHSTRUC, "   SPACE
lt_select_values  TYPE STANDARD TABLE OF HELP_VTAB, "   
lv_external_f4_call_2nd_time  TYPE HELP_VTAB, "   
lv_tablefield_does_not_exist  TYPE HELP_VTAB, "   
lv_fieldname  TYPE HELP_INFO-FIELDNAME, "   SPACE
lv_tabname  TYPE HELP_INFO-TABNAME, "   SPACE
lv_shrink_flag  TYPE HELP_INFO, "   SPACE
lv_title_in_values_list  TYPE HELP_INFO, "   SPACE
lv_no_conversion  TYPE HELP_INFO, "   SPACE
lv_external_f4  TYPE HELP_INFO. "   SPACE

  CALL FUNCTION 'VALUES_DISPLAY'  "
    EXPORTING
         CUCOL = lv_cucol
         CUROW = lv_curow
         DISPLAY = lv_display
         FIELDNAME = lv_fieldname
         TABNAME = lv_tabname
         SHRINK_FLAG = lv_shrink_flag
         TITLE_IN_VALUES_LIST = lv_title_in_values_list
         NO_CONVERSION = lv_no_conversion
         EXTERNAL_F4 = lv_external_f4
    IMPORTING
         SELECT_INDEX = lv_select_index
         SELECT_VALUE = lv_select_value
         EXTERNAL_F4_CALL_2ND_TIME = lv_external_f4_call_2nd_time
    TABLES
         VALUES = lt_values
         VALUESTRUCTURE = lt_valuestructure
         SELECT_VALUES = lt_select_values
    EXCEPTIONS
        CHECK_TABLE_LOCKED = 1
        NO_VALUES_FOR_FIELD = 2
        TABLEFIELD_DOES_NOT_EXIST = 3
. " VALUES_DISPLAY




ABAP code using 7.40 inline data declarations to call FM VALUES_DISPLAY

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 TABIX FROM SY INTO @DATA(ld_select_index).
 
 
"SELECT single CUROW FROM SY INTO @DATA(ld_curow).
 
"SELECT single FLDVALUE FROM HELP_INFO INTO @DATA(ld_select_value).
 
 
 
DATA(ld_display) = ' '.
 
 
 
 
"SELECT single FIELDNAME FROM HELP_INFO INTO @DATA(ld_fieldname).
DATA(ld_fieldname) = ' '.
 
"SELECT single TABNAME FROM HELP_INFO INTO @DATA(ld_tabname).
DATA(ld_tabname) = ' '.
 
DATA(ld_shrink_flag) = ' '.
 
DATA(ld_title_in_values_list) = ' '.
 
DATA(ld_no_conversion) = ' '.
 
DATA(ld_external_f4) = ' '.
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!