SAP REUSE_ALV_LIST_DISPLAY Function Module for Output a simple list (single line or several lines)









REUSE_ALV_LIST_DISPLAY is a standard reuse alv list display SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Output a simple list (single line or several lines) 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 list display FM, simply by entering the name REUSE_ALV_LIST_DISPLAY into the relevant SAP transaction such as SE37 or SE38.

Function Group: SALV
Program Name: SAPLSALV
Main Program: SAPLSALV
Appliation area:
Release date: 18-Jul-1997
Mode(Normal, Remote etc): Normal Function Module
Update:



Function REUSE_ALV_LIST_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 'REUSE_ALV_LIST_DISPLAY'"Output a simple list (single line or several lines)
EXPORTING
* I_INTERFACE_CHECK = ' ' "Interface consistency check log output
* IT_EXCLUDING = "Table of inactive function codes
* IT_SPECIAL_GROUPS = "Grouping fields for column selection
* IT_SORT = "Sort criteria for first list display
* IT_FILTER = "Filter criteria for first list output
* IS_SEL_HIDE = "Selection information modification
* I_DEFAULT = 'X' "Initial variant active/inactive logic
* I_SAVE = ' ' "Variants can be saved
* IS_VARIANT = "Variant information
* IT_EVENTS = "Table of events to perform
* IT_EVENT_EXIT = "Standard fcode exit requests table
* I_BYPASSING_BUFFER = "Skip All Buffers?
* IS_PRINT = "Print information
* IS_REPREP_ID = "Initialization key for Re/Re interface
* 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
* IR_SALV_LIST_ADAPTER = "Adapter for Output of Data in a List
* IT_EXCEPT_QINFO = "
* I_SUPPRESS_EMPTY_DATA = ABAP_FALSE "If no data exist, no table is output
* I_BUFFER_ACTIVE = ' ' "Buffer active
* I_CALLBACK_PROGRAM = ' ' "Name of the calling program
* I_CALLBACK_PF_STATUS_SET = ' ' "Set EXIT routine to status
* I_CALLBACK_USER_COMMAND = ' ' "EXIT routine for command handling
* I_STRUCTURE_NAME = "Internal output table structure name
* IS_LAYOUT = "List layout specifications
* IT_FIELDCAT = "Field catalog with field descriptions

IMPORTING
E_EXIT_CAUSED_BY_CALLER = "Delete list in CALLBACK_USER_COMMAND
ES_EXIT_CAUSED_BY_USER = "How the user left the list

TABLES
T_OUTTAB = "Table with data to be displayed

EXCEPTIONS
PROGRAM_ERROR = 1
.



IMPORTING Parameters details for REUSE_ALV_LIST_DISPLAY

I_INTERFACE_CHECK - Interface consistency check log output

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

IT_EXCLUDING - Table of inactive function codes

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

IT_SPECIAL_GROUPS - Grouping fields for column selection

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

IT_SORT - Sort criteria for first list display

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

IT_FILTER - Filter criteria for first list output

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

IS_SEL_HIDE - Selection information modification

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

I_DEFAULT - Initial variant active/inactive logic

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

I_SAVE - Variants can be saved

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

IS_VARIANT - Variant information

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

IT_EVENTS - Table of events to perform

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

IT_EVENT_EXIT - Standard fcode exit requests table

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

I_BYPASSING_BUFFER - Skip All Buffers?

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

IS_PRINT - Print information

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

IS_REPREP_ID - Initialization key for Re/Re interface

Data type: SLIS_REPREP_ID
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)

IR_SALV_LIST_ADAPTER - Adapter for Output of Data in a List

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

IT_EXCEPT_QINFO -

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

I_SUPPRESS_EMPTY_DATA - If no data exist, no table is output

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

I_BUFFER_ACTIVE - Buffer active

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

I_CALLBACK_PROGRAM - Name of the calling program

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

I_CALLBACK_PF_STATUS_SET - Set EXIT routine to status

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

I_CALLBACK_USER_COMMAND - EXIT routine for command handling

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

I_STRUCTURE_NAME - Internal output table structure name

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

IS_LAYOUT - List layout specifications

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

IT_FIELDCAT - Field catalog with field descriptions

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

EXPORTING Parameters details for REUSE_ALV_LIST_DISPLAY

E_EXIT_CAUSED_BY_CALLER - Delete list in CALLBACK_USER_COMMAND

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

ES_EXIT_CAUSED_BY_USER - How the user left the list

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

TABLES Parameters details for REUSE_ALV_LIST_DISPLAY

T_OUTTAB - Table with data to be displayed

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_LIST_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:
lt_t_outtab  TYPE STANDARD TABLE OF STRING, "   
lv_program_error  TYPE STRING, "   
lv_i_interface_check  TYPE STRING, "   SPACE
lv_e_exit_caused_by_caller  TYPE STRING, "   
lv_it_excluding  TYPE SLIS_T_EXTAB, "   
lv_it_special_groups  TYPE SLIS_T_SP_GROUP_ALV, "   
lv_it_sort  TYPE SLIS_T_SORTINFO_ALV, "   
lv_it_filter  TYPE SLIS_T_FILTER_ALV, "   
lv_is_sel_hide  TYPE SLIS_SEL_HIDE_ALV, "   
lv_i_default  TYPE SLIS_SEL_HIDE_ALV, "   'X'
lv_i_save  TYPE SLIS_SEL_HIDE_ALV, "   SPACE
lv_is_variant  TYPE DISVARIANT, "   
lv_it_events  TYPE SLIS_T_EVENT, "   
lv_it_event_exit  TYPE SLIS_T_EVENT_EXIT, "   
lv_i_bypassing_buffer  TYPE CHAR01, "   
lv_es_exit_caused_by_user  TYPE SLIS_EXIT_BY_USER, "   
lv_is_print  TYPE SLIS_PRINT_ALV, "   
lv_is_reprep_id  TYPE SLIS_REPREP_ID, "   
lv_i_screen_start_column  TYPE SLIS_REPREP_ID, "   0
lv_i_screen_start_line  TYPE SLIS_REPREP_ID, "   0
lv_i_screen_end_column  TYPE SLIS_REPREP_ID, "   0
lv_i_screen_end_line  TYPE SLIS_REPREP_ID, "   0
lv_ir_salv_list_adapter  TYPE CL_SALV_LIST_ADAPTER, "   
lv_it_except_qinfo  TYPE SLIS_T_QINFO_ALV, "   
lv_i_suppress_empty_data  TYPE SAP_BOOL, "   ABAP_FALSE
lv_i_buffer_active  TYPE SAP_BOOL, "   SPACE
lv_i_callback_program  TYPE SY-REPID, "   SPACE
lv_i_callback_pf_status_set  TYPE SLIS_FORMNAME, "   SPACE
lv_i_callback_user_command  TYPE SLIS_FORMNAME, "   SPACE
lv_i_structure_name  TYPE DD02L-TABNAME, "   
lv_is_layout  TYPE SLIS_LAYOUT_ALV, "   
lv_it_fieldcat  TYPE SLIS_T_FIELDCAT_ALV. "   

  CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'  "Output a simple list (single line or several lines)
    EXPORTING
         I_INTERFACE_CHECK = lv_i_interface_check
         IT_EXCLUDING = lv_it_excluding
         IT_SPECIAL_GROUPS = lv_it_special_groups
         IT_SORT = lv_it_sort
         IT_FILTER = lv_it_filter
         IS_SEL_HIDE = lv_is_sel_hide
         I_DEFAULT = lv_i_default
         I_SAVE = lv_i_save
         IS_VARIANT = lv_is_variant
         IT_EVENTS = lv_it_events
         IT_EVENT_EXIT = lv_it_event_exit
         I_BYPASSING_BUFFER = lv_i_bypassing_buffer
         IS_PRINT = lv_is_print
         IS_REPREP_ID = lv_is_reprep_id
         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
         IR_SALV_LIST_ADAPTER = lv_ir_salv_list_adapter
         IT_EXCEPT_QINFO = lv_it_except_qinfo
         I_SUPPRESS_EMPTY_DATA = lv_i_suppress_empty_data
         I_BUFFER_ACTIVE = lv_i_buffer_active
         I_CALLBACK_PROGRAM = lv_i_callback_program
         I_CALLBACK_PF_STATUS_SET = lv_i_callback_pf_status_set
         I_CALLBACK_USER_COMMAND = lv_i_callback_user_command
         I_STRUCTURE_NAME = lv_i_structure_name
         IS_LAYOUT = lv_is_layout
         IT_FIELDCAT = lv_it_fieldcat
    IMPORTING
         E_EXIT_CAUSED_BY_CALLER = lv_e_exit_caused_by_caller
         ES_EXIT_CAUSED_BY_USER = lv_es_exit_caused_by_user
    TABLES
         T_OUTTAB = lt_t_outtab
    EXCEPTIONS
        PROGRAM_ERROR = 1
. " REUSE_ALV_LIST_DISPLAY




ABAP code using 7.40 inline data declarations to call FM REUSE_ALV_LIST_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.

 
 
DATA(ld_i_interface_check) = ' '.
 
 
 
 
 
 
 
DATA(ld_i_default) = 'X'.
 
DATA(ld_i_save) = ' '.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
DATA(ld_i_suppress_empty_data) = ABAP_FALSE.
 
DATA(ld_i_buffer_active) = ' '.
 
"SELECT single REPID FROM SY INTO @DATA(ld_i_callback_program).
DATA(ld_i_callback_program) = ' '.
 
DATA(ld_i_callback_pf_status_set) = ' '.
 
DATA(ld_i_callback_user_command) = ' '.
 
"SELECT single TABNAME FROM DD02L INTO @DATA(ld_i_structure_name).
 
 
 


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!