SAP Tables

REUSE_ALV_HIERSEQ_LIST_DISPLAY SAP Function module - Hierarchical sequential list output

REUSE_ALV_HIERSEQ_LIST_DISPLAYis a standard SAP function module available within R/3 SAPsystems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import/export parameters, exceptions etc as well as any documentation contributions specific to the object. See here to view full function module documentation and code listing, simply by entering the name REUSE_ALV_HIERSEQ_LIST_DISPLAY into the relevant SAP transaction such as SE37 or SE80.

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_HIERSEQ_LIST_DISPLAY or its description.

Associated Function Group: SALV
Released Date: 18.07.1997
CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY' "Hierarchical sequential list output
*   i_interface_check = SPACE   "               Interface consistency check log output
*   i_callback_program =        " 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
*   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_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_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
    i_tabname_header =          " slis_tabname  Header Table Name
    i_tabname_item =            " slis_tabname  Item Table Name
*   i_structure_name_header =   " dd02l-tabname  Internal output table (header) structure name
*   i_structure_name_item =     " dd02l-tabname  Internal output table (posit.) structure name
    is_keyinfo =                " slis_keyinfo_alv  Header/posit. table field links
*   is_print =                  " slis_print_alv  Print information
*   is_reprep_id =              " slis_reprep_id  Initialization key for Re/Re interface
*   i_bypassing_buffer =        " char01        Skip All Buffers?
*   i_buffer_active =           " char01        User Buffer A
*   ir_salv_hierseq_adapter =   " cl_salv_hierseq_adapter  Adapter for the Hierseq. Lists
*   i_suppress_empty_data = ABAP_FALSE  " sap_bool  If no data exist, no table is output
    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
    t_outtab_header =           "               Header table with data to be output
    t_outtab_item =             "               Position table with data to be output
    PROGRAM_ERROR = 1           "               Program errors

ABAP code example for Function Module REUSE_ALV_HIERSEQ_LIST_DISPLAY

The ABAP code below is a full code listing to execute function module REUSE_ALV_HIERSEQ_LIST_DISPLAY including all data declarations. The code uses the latest in-line data declaration syntax but I have included an abap code snipet 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).
ld_e_exit_caused_by_caller   TYPE STRING,
ld_es_exit_caused_by_user   TYPE SLIS_EXIT_BY_USER,
it_t_outtab_header   TYPE STANDARD TABLE OF STRING,"tables param
wa_t_outtab_header LIKE LINE OF it_t_outtab_header  ,
it_t_outtab_item   TYPE STANDARD TABLE OF STRING,"tables param
wa_t_outtab_item LIKE LINE OF it_t_outtab_item  .

DATA(ld_i_interface_check) = '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'.
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_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_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_i_tabname_header) = 'some text here'.
DATA(ld_i_tabname_item) = 'some text here'.

INTO @DATA(ld_i_structure_name_header).

INTO @DATA(ld_i_structure_name_item).

DATA(ld_is_keyinfo) = 'some text here'.
DATA(ld_is_print) = 'some text here'.
DATA(ld_is_reprep_id) = 'some text here'.
DATA(ld_i_bypassing_buffer) = 'some text here'.
DATA(ld_i_buffer_active) = 'some text here'.
DATA(ld_ir_salv_hierseq_adapter) = 'some text here'.
DATA(ld_i_suppress_empty_data) = 'some text here'.

"populate fields of struture and append to itab
append wa_t_outtab_header to it_t_outtab_header.

"populate fields of struture and append to itab
append wa_t_outtab_item to it_t_outtab_item.. CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY' EXPORTING * i_interface_check = ld_i_interface_check * 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 * 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_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 * 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 i_tabname_header = ld_i_tabname_header i_tabname_item = ld_i_tabname_item * i_structure_name_header = ld_i_structure_name_header * i_structure_name_item = ld_i_structure_name_item is_keyinfo = ld_is_keyinfo * is_print = ld_is_print * is_reprep_id = ld_is_reprep_id * i_bypassing_buffer = ld_i_bypassing_buffer * i_buffer_active = ld_i_buffer_active * ir_salv_hierseq_adapter = ld_ir_salv_hierseq_adapter * 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_header = it_t_outtab_header t_outtab_item = it_t_outtab_item EXCEPTIONS PROGRAM_ERROR = 1 . " REUSE_ALV_HIERSEQ_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.
ld_e_exit_caused_by_caller TYPE STRING ,
ld_i_interface_check TYPE STRING ,
it_t_outtab_header TYPE STANDARD TABLE OF STRING ,
wa_t_outtab_header LIKE LINE OF it_t_outtab_header,
ld_es_exit_caused_by_user TYPE SLIS_EXIT_BY_USER ,
ld_i_callback_program TYPE SY-REPID ,
wa_t_outtab_item LIKE LINE OF it_t_outtab_item,
ld_i_callback_pf_status_set TYPE SLIS_FORMNAME ,
ld_i_callback_user_command TYPE SLIS_FORMNAME ,
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_filter TYPE SLIS_T_FILTER_ALV ,
ld_is_sel_hide TYPE SLIS_SEL_HIDE_ALV ,
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_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_i_tabname_header TYPE SLIS_TABNAME ,
ld_i_tabname_item TYPE SLIS_TABNAME ,
ld_i_structure_name_header TYPE DD02L-TABNAME ,
ld_i_structure_name_item TYPE DD02L-TABNAME ,
ld_is_keyinfo TYPE SLIS_KEYINFO_ALV ,
ld_is_print TYPE SLIS_PRINT_ALV ,
ld_is_reprep_id TYPE SLIS_REPREP_ID ,
ld_i_bypassing_buffer TYPE CHAR01 ,
ld_i_buffer_active TYPE CHAR01 ,
ld_ir_salv_hierseq_adapter TYPE CL_SALV_HIERSEQ_ADAPTER ,
ld_i_suppress_empty_data TYPE SAP_BOOL .

ld_e_exit_caused_by_caller = 'some text here'.
ld_i_interface_check = 'some text here'.

"populate fields of struture and append to itab
append wa_t_outtab_header to it_t_outtab_header.
ld_es_exit_caused_by_user = 'some text here'.
ld_i_callback_program = 'some text here'.

"populate fields of struture and append to itab
append wa_t_outtab_item to it_t_outtab_item.
ld_i_callback_pf_status_set = 'some text here'.
ld_i_callback_user_command = 'some text here'.
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_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_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_i_tabname_header = 'some text here'.
ld_i_tabname_item = 'some text here'.

INTO ld_i_structure_name_header.

INTO ld_i_structure_name_item.

ld_is_keyinfo = 'some text here'.
ld_is_print = 'some text here'.
ld_is_reprep_id = 'some text here'.
ld_i_bypassing_buffer = 'some text here'.
ld_i_buffer_active = 'some text here'.
ld_ir_salv_hierseq_adapter = 'some text here'.
ld_i_suppress_empty_data = 'some text here'..


This module outputs two internal tables as a formated hierarchical-sequential list. ...See here for full SAP fm documentation