SAP Function Modules

REUSE_ALV_LIST_DISPLAY SAP Function module - Output a simple list (single line or several lines)







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

Associated Function Group: SALV
Released Date: 18.07.1997
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM REUSE_ALV_LIST_DISPLAY - REUSE ALV LIST DISPLAY





CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY' "Output a simple list (single line or several lines)
* EXPORTING
*   i_interface_check = SPACE   "               Interface consistency check log output
*   i_bypassing_buffer =        " char01        Skip All Buffers?
*   i_buffer_active = SPACE     "               Buffer active
*   i_callback_program = SPACE  " sy-repid      Name of the calling program
*   i_callback_pf_status_set = SPACE  " slis_formname  Set EXIT routine to status
*   i_callback_user_command = SPACE  " slis_formname  EXIT routine for command handling
*   i_structure_name =          " dd02l-tabname  Internal output table structure name
*   is_layout =                 " slis_layout_alv  List layout specifications
*   it_fieldcat =               " slis_t_fieldcat_alv  Field catalog with field descriptions
*   it_excluding =              " slis_t_extab  Table of inactive function codes
*   it_special_groups =         " slis_t_sp_group_alv  Grouping fields for column selection
*   it_sort =                   " slis_t_sortinfo_alv  Sort criteria for first list display
*   it_filter =                 " slis_t_filter_alv  Filter criteria for first list output
*   is_sel_hide =               " slis_sel_hide_alv  Selection information modification
*   i_default = 'X'             "               Initial variant active/inactive logic
*   i_save = SPACE              "               Variants can be saved
*   is_variant =                " disvariant    Variant information
*   it_events =                 " slis_t_event  Table of events to perform
*   it_event_exit =             " slis_t_event_exit  Standard fcode exit requests table
*   is_print =                  " slis_print_alv  Print information
*   is_reprep_id =              " slis_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 =      " cl_salv_list_adapter  Adapter for Output of Data in a List
*   it_except_qinfo =           " slis_t_qinfo_alv
*   i_suppress_empty_data = ABAP_FALSE  " sap_bool  If no data exist, no table is output
  IMPORTING
    e_exit_caused_by_caller =   "               Delete list in CALLBACK_USER_COMMAND
    es_exit_caused_by_user =    " slis_exit_by_user  How the user left the list
  TABLES
    t_outtab =                  "               Table with data to be displayed
  EXCEPTIONS
    PROGRAM_ERROR = 1           "               Program errors
    .  "  REUSE_ALV_LIST_DISPLAY

ABAP code example for Function Module REUSE_ALV_LIST_DISPLAY





The ABAP code below is a full code listing to execute function module REUSE_ALV_LIST_DISPLAY 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:
ld_e_exit_caused_by_caller  TYPE STRING ,
ld_es_exit_caused_by_user  TYPE SLIS_EXIT_BY_USER ,
it_t_outtab  TYPE STANDARD TABLE OF STRING,"TABLES PARAM
wa_t_outtab  LIKE LINE OF it_t_outtab .

DATA(ld_i_interface_check) = 'some text here'.
DATA(ld_i_bypassing_buffer) = 'Check type of data required'.
DATA(ld_i_buffer_active) = 'some text here'.
DATA(ld_i_callback_program) = 'some text here'.
DATA(ld_i_callback_pf_status_set) = 'some text here'.
DATA(ld_i_callback_user_command) = 'some text here'.

SELECT single TABNAME
FROM DD02L
INTO @DATA(ld_i_structure_name).

DATA(ld_is_layout) = 'some text here'.
DATA(ld_it_fieldcat) = 'some text here'.
DATA(ld_it_excluding) = 'some text here'.
DATA(ld_it_special_groups) = 'some text here'.
DATA(ld_it_sort) = 'some text here'.
DATA(ld_it_filter) = 'some text here'.
DATA(ld_is_sel_hide) = 'some text here'.
DATA(ld_i_default) = 'some text here'.
DATA(ld_i_save) = 'some text here'.
DATA(ld_is_variant) = 'some text here'.
DATA(ld_it_events) = 'some text here'.
DATA(ld_it_event_exit) = 'some text here'.
DATA(ld_is_print) = 'some text here'.
DATA(ld_is_reprep_id) = 'some text here'.
DATA(ld_i_screen_start_column) = 'some text here'.
DATA(ld_i_screen_start_line) = 'some text here'.
DATA(ld_i_screen_end_column) = 'some text here'.
DATA(ld_i_screen_end_line) = 'some text here'.
DATA(ld_ir_salv_list_adapter) = 'some text here'.
DATA(ld_it_except_qinfo) = 'some text here'.
DATA(ld_i_suppress_empty_data) = 'some text here'.

"populate fields of struture and append to itab
append wa_t_outtab to it_t_outtab. . CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY' * EXPORTING * i_interface_check = ld_i_interface_check * i_bypassing_buffer = ld_i_bypassing_buffer * i_buffer_active = ld_i_buffer_active * i_callback_program = ld_i_callback_program * i_callback_pf_status_set = ld_i_callback_pf_status_set * i_callback_user_command = ld_i_callback_user_command * i_structure_name = ld_i_structure_name * is_layout = ld_is_layout * it_fieldcat = ld_it_fieldcat * it_excluding = ld_it_excluding * it_special_groups = ld_it_special_groups * it_sort = ld_it_sort * it_filter = ld_it_filter * is_sel_hide = ld_is_sel_hide * i_default = ld_i_default * i_save = ld_i_save * is_variant = ld_is_variant * it_events = ld_it_events * it_event_exit = ld_it_event_exit * is_print = ld_is_print * is_reprep_id = ld_is_reprep_id * i_screen_start_column = ld_i_screen_start_column * i_screen_start_line = ld_i_screen_start_line * i_screen_end_column = ld_i_screen_end_column * i_screen_end_line = ld_i_screen_end_line * ir_salv_list_adapter = ld_ir_salv_list_adapter * it_except_qinfo = ld_it_except_qinfo * i_suppress_empty_data = ld_i_suppress_empty_data IMPORTING e_exit_caused_by_caller = ld_e_exit_caused_by_caller es_exit_caused_by_user = ld_es_exit_caused_by_user TABLES t_outtab = it_t_outtab EXCEPTIONS PROGRAM_ERROR = 1 . " REUSE_ALV_LIST_DISPLAY
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "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_e_exit_caused_by_caller  TYPE STRING ,
ld_i_interface_check  TYPE STRING ,
it_t_outtab  TYPE STANDARD TABLE OF STRING ,
wa_t_outtab  LIKE LINE OF it_t_outtab,
ld_es_exit_caused_by_user  TYPE SLIS_EXIT_BY_USER ,
ld_i_bypassing_buffer  TYPE CHAR01 ,
ld_i_buffer_active  TYPE STRING ,
ld_i_callback_program  TYPE SY-REPID ,
ld_i_callback_pf_status_set  TYPE SLIS_FORMNAME ,
ld_i_callback_user_command  TYPE SLIS_FORMNAME ,
ld_i_structure_name  TYPE DD02L-TABNAME ,
ld_is_layout  TYPE SLIS_LAYOUT_ALV ,
ld_it_fieldcat  TYPE SLIS_T_FIELDCAT_ALV ,
ld_it_excluding  TYPE SLIS_T_EXTAB ,
ld_it_special_groups  TYPE SLIS_T_SP_GROUP_ALV ,
ld_it_sort  TYPE SLIS_T_SORTINFO_ALV ,
ld_it_filter  TYPE SLIS_T_FILTER_ALV ,
ld_is_sel_hide  TYPE SLIS_SEL_HIDE_ALV ,
ld_i_default  TYPE STRING ,
ld_i_save  TYPE STRING ,
ld_is_variant  TYPE DISVARIANT ,
ld_it_events  TYPE SLIS_T_EVENT ,
ld_it_event_exit  TYPE SLIS_T_EVENT_EXIT ,
ld_is_print  TYPE SLIS_PRINT_ALV ,
ld_is_reprep_id  TYPE SLIS_REPREP_ID ,
ld_i_screen_start_column  TYPE STRING ,
ld_i_screen_start_line  TYPE STRING ,
ld_i_screen_end_column  TYPE STRING ,
ld_i_screen_end_line  TYPE STRING ,
ld_ir_salv_list_adapter  TYPE CL_SALV_LIST_ADAPTER ,
ld_it_except_qinfo  TYPE SLIS_T_QINFO_ALV ,
ld_i_suppress_empty_data  TYPE SAP_BOOL .

ld_i_interface_check = 'some text here'.

"populate fields of struture and append to itab
append wa_t_outtab to it_t_outtab.
ld_i_bypassing_buffer = 'some text here'.
ld_i_buffer_active = 'some text here'.
ld_i_callback_program = 'some text here'.
ld_i_callback_pf_status_set = 'some text here'.
ld_i_callback_user_command = 'some text here'.

SELECT single TABNAME
FROM DD02L
INTO ld_i_structure_name.

ld_is_layout = 'some text here'.
ld_it_fieldcat = 'some text here'.
ld_it_excluding = 'some text here'.
ld_it_special_groups = 'some text here'.
ld_it_sort = 'some text here'.
ld_it_filter = 'some text here'.
ld_is_sel_hide = 'some text here'.
ld_i_default = 'some text here'.
ld_i_save = 'some text here'.
ld_is_variant = 'some text here'.
ld_it_events = 'some text here'.
ld_it_event_exit = 'some text here'.
ld_is_print = 'some text here'.
ld_is_reprep_id = 'some text here'.
ld_i_screen_start_column = 'some text here'.
ld_i_screen_start_line = 'some text here'.
ld_i_screen_end_column = 'some text here'.
ld_i_screen_end_line = 'some text here'.
ld_ir_salv_list_adapter = 'some text here'.
ld_it_except_qinfo = 'some text here'.
ld_i_suppress_empty_data = 'some text here'.

SAP Documentation for FM REUSE_ALV_LIST_DISPLAY


This module outputs an internal table with any structure as a formatted one-line or multiple-line list. ...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 REUSE_ALV_LIST_DISPLAY or its description.