SAP REUSE_ALV_POPUP_TO_SELECT Function Module for List in dialog box to choose one or more entries (or display only)
REUSE_ALV_POPUP_TO_SELECT is a standard reuse alv popup to select SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for List in dialog box to choose one or more entries (or display only) 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 reuse alv popup to select FM, simply by entering the name REUSE_ALV_POPUP_TO_SELECT into the relevant SAP transaction such as SE37 or SE38.
Function Group: SALV
Program Name: SAPLSALV
Main Program: SAPLSALV
Appliation area:
Release date: 16-Jul-1997
Mode(Normal, Remote etc): Normal Function Module
Update:
Function REUSE_ALV_POPUP_TO_SELECT 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 'REUSE_ALV_POPUP_TO_SELECT'"List in dialog box to choose one or more entries (or display only).
EXPORTING
* I_TITLE = "Dialog box title
* I_LINEMARK_FIELDNAME = "Line selection color information field name
* I_SCROLL_TO_SEL_LINE = 'X' "Scroll to default selection if necessary
I_TABNAME = "Table name with chosen values
* I_STRUCTURE_NAME = "Internal output table structure name
* IT_FIELDCAT = "Field catalog with field descriptions
* IT_EXCLUDING = "Table of inactive function codes
* I_CALLBACK_PROGRAM = "Name of the calling program
* I_CALLBACK_USER_COMMAND = "USER_COMMAND handling form routine name
* IS_PRIVATE = "Internal private use only
* I_SELECTION = 'X' "(X) = Selection possible, ( ) = Display
* I_ALLOW_NO_SELECTION = "Allow copy although nothing is selected
* I_ZEBRA = ' ' "Line output with alternating color
* I_SCREEN_START_COLUMN = 0 "Coordinates for list in dialog box
* I_SCREEN_START_LINE = 0 "Coordinates for list in dialog box
* I_SCREEN_END_COLUMN = 0 "Coordinates for list in dialog box
* I_SCREEN_END_LINE = 0 "Coordinates for list in dialog box
* I_CHECKBOX_FIELDNAME = "Output table checkbox field name
IMPORTING
ES_SELFIELD = "Selection info for simple selection
E_EXIT = "'X' = Cancel by user
TABLES
T_OUTTAB = "Selection value table
EXCEPTIONS
PROGRAM_ERROR = 1
IMPORTING Parameters details for REUSE_ALV_POPUP_TO_SELECT
I_TITLE - Dialog box title
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
I_LINEMARK_FIELDNAME - Line selection color information field name
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
I_SCROLL_TO_SEL_LINE - Scroll to default selection if necessary
Data type:Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_TABNAME - Table name with chosen values
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
I_STRUCTURE_NAME - Internal output table structure name
Data type: DD02L-TABNAMEOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_FIELDCAT - Field catalog with field descriptions
Data type: SLIS_T_FIELDCAT_ALVOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_EXCLUDING - Table of inactive function codes
Data type: SLIS_T_EXTABOptional: Yes
Call by Reference: No ( called with pass by value option)
I_CALLBACK_PROGRAM - Name of the calling program
Data type: SY-REPIDOptional: Yes
Call by Reference: No ( called with pass by value option)
I_CALLBACK_USER_COMMAND - USER_COMMAND handling form routine name
Data type: SLIS_FORMNAMEOptional: Yes
Call by Reference: No ( called with pass by value option)
IS_PRIVATE - Internal private use only
Data type: SLIS_DATA_CALLER_EXITOptional: Yes
Call by Reference: No ( called with pass by value option)
I_SELECTION - (X) = Selection possible, ( ) = Display
Data type:Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_ALLOW_NO_SELECTION - Allow copy although nothing is selected
Data type: CHAR1Optional: Yes
Call by Reference: No ( called with pass by value option)
I_ZEBRA - Line output with alternating color
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_SCREEN_START_COLUMN - Coordinates for list in dialog box
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
I_SCREEN_START_LINE - Coordinates for list in dialog box
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
I_SCREEN_END_COLUMN - Coordinates for list in dialog box
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
I_SCREEN_END_LINE - Coordinates for list in dialog box
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
I_CHECKBOX_FIELDNAME - Output table checkbox field name
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for REUSE_ALV_POPUP_TO_SELECT
ES_SELFIELD - Selection info for simple selection
Data type: SLIS_SELFIELDOptional: No
Call by Reference: No ( called with pass by value option)
E_EXIT - 'X' = Cancel by user
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for REUSE_ALV_POPUP_TO_SELECT
T_OUTTAB - Selection value table
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
PROGRAM_ERROR - Program errors
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for REUSE_ALV_POPUP_TO_SELECT 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_i_title | TYPE STRING, " | |||
lt_t_outtab | TYPE STANDARD TABLE OF STRING, " | |||
lv_es_selfield | TYPE SLIS_SELFIELD, " | |||
lv_program_error | TYPE SLIS_SELFIELD, " | |||
lv_i_linemark_fieldname | TYPE SLIS_SELFIELD, " | |||
lv_i_scroll_to_sel_line | TYPE SLIS_SELFIELD, " 'X' | |||
lv_i_tabname | TYPE SLIS_SELFIELD, " | |||
lv_i_structure_name | TYPE DD02L-TABNAME, " | |||
lv_it_fieldcat | TYPE SLIS_T_FIELDCAT_ALV, " | |||
lv_it_excluding | TYPE SLIS_T_EXTAB, " | |||
lv_i_callback_program | TYPE SY-REPID, " | |||
lv_i_callback_user_command | TYPE SLIS_FORMNAME, " | |||
lv_is_private | TYPE SLIS_DATA_CALLER_EXIT, " | |||
lv_e_exit | TYPE SLIS_DATA_CALLER_EXIT, " | |||
lv_i_selection | TYPE SLIS_DATA_CALLER_EXIT, " 'X' | |||
lv_i_allow_no_selection | TYPE CHAR1, " | |||
lv_i_zebra | TYPE CHAR1, " SPACE | |||
lv_i_screen_start_column | TYPE CHAR1, " 0 | |||
lv_i_screen_start_line | TYPE CHAR1, " 0 | |||
lv_i_screen_end_column | TYPE CHAR1, " 0 | |||
lv_i_screen_end_line | TYPE CHAR1, " 0 | |||
lv_i_checkbox_fieldname | TYPE CHAR1. " |
  CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT' "List in dialog box to choose one or more entries (or display only) |
EXPORTING | ||
I_TITLE | = lv_i_title | |
I_LINEMARK_FIELDNAME | = lv_i_linemark_fieldname | |
I_SCROLL_TO_SEL_LINE | = lv_i_scroll_to_sel_line | |
I_TABNAME | = lv_i_tabname | |
I_STRUCTURE_NAME | = lv_i_structure_name | |
IT_FIELDCAT | = lv_it_fieldcat | |
IT_EXCLUDING | = lv_it_excluding | |
I_CALLBACK_PROGRAM | = lv_i_callback_program | |
I_CALLBACK_USER_COMMAND | = lv_i_callback_user_command | |
IS_PRIVATE | = lv_is_private | |
I_SELECTION | = lv_i_selection | |
I_ALLOW_NO_SELECTION | = lv_i_allow_no_selection | |
I_ZEBRA | = lv_i_zebra | |
I_SCREEN_START_COLUMN | = lv_i_screen_start_column | |
I_SCREEN_START_LINE | = lv_i_screen_start_line | |
I_SCREEN_END_COLUMN | = lv_i_screen_end_column | |
I_SCREEN_END_LINE | = lv_i_screen_end_line | |
I_CHECKBOX_FIELDNAME | = lv_i_checkbox_fieldname | |
IMPORTING | ||
ES_SELFIELD | = lv_es_selfield | |
E_EXIT | = lv_e_exit | |
TABLES | ||
T_OUTTAB | = lt_t_outtab | |
EXCEPTIONS | ||
PROGRAM_ERROR = 1 | ||
. " REUSE_ALV_POPUP_TO_SELECT |
ABAP code using 7.40 inline data declarations to call FM REUSE_ALV_POPUP_TO_SELECT
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.DATA(ld_i_scroll_to_sel_line) | = 'X'. | |||
"SELECT single TABNAME FROM DD02L INTO @DATA(ld_i_structure_name). | ||||
"SELECT single REPID FROM SY INTO @DATA(ld_i_callback_program). | ||||
DATA(ld_i_selection) | = 'X'. | |||
DATA(ld_i_zebra) | = ' '. | |||
Search for further information about these or an SAP related objects