ABAP顾问
分类:
2007-07-23 17:16:21
CLASS方式的ALV:
DATA : lt_excl_func TYPE ui_functions.
APPEND cl_gui_alv_grid=>mc_fc_loc_copy TO lt_excl_func.
APPEND cl_gui_alv_grid=>mc_fc_loc_copy_row TO lt_excl_func.
APPEND cl_gui_alv_grid=>mc_fc_loc_cut TO lt_excl_func.CALL METHOD go_grid->set_table_for_first_display
EXPORTING
is_variant = gs_variant
i_save = 'A'
is_layout = sla
it_toolbar_excluding = lt_excl_func
CHANGING
it_outtab = itab[]
it_fieldcatalog = gt_fieldcat[]
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4.
TYPE-POOLS: slis.DATA: i_excluding TYPE slis_t_extab.APPEND '&ILT' TO i_excluding .
APPEND '&OUP' TO i_excluding .CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = i_repid
it_fieldcat = gd_fieldcat[]
is_layout = sla
it_excluding = i_excluding
TABLES
t_outtab = itab
EXCEPTIONS
program_error = 1
OTHERS = 2.