FUNCTION z_very_simple_alv.
*"----------------------------------------------------------------------
*"*"Local interface:
*" IMPORTING
*" REFERENCE(I_START_COLUMN) TYPE I DEFAULT 25
*" REFERENCE(I_START_LINE) TYPE I DEFAULT 6
*" REFERENCE(I_END_COLUMN) TYPE I DEFAULT 100
*" REFERENCE(I_END_LINE) TYPE I DEFAULT 10
*" REFERENCE(I_TITLE) TYPE STRING DEFAULT 'ALV'
*" REFERENCE(I_POPUP) TYPE FLAG DEFAULT ' '
*" TABLES
*" IT_ALV TYPE STANDARD TABLE
*"----------------------------------------------------------------------
DATA go_alv TYPE REF TO cl_salv_table.
TRY.
cl_salv_table=>factory(
IMPORTING
r_salv_table = go_alv
CHANGING
t_table = it_alv[] ).
CATCH cx_salv_msg.
ENDTRY.
DATA: lr_functions TYPE REF TO cl_salv_functions_list.
lr_functions = go_alv->get_functions( ).
lr_functions->set_all( 'X' ).
IF go_alv IS BOUND.
IF i_popup = 'X'.
go_alv->set_screen_popup(
start_column = i_start_column
end_column = i_end_column
start_line = i_start_line
end_line = i_end_line ).
ENDIF.
go_alv->display( ).
ENDIF.
ENDFUNCTION.
REPORT z_very_simple_alv.
DATA gt_tab TYPE STANDARD TABLE OF sflights.
SELECT * FROM sflights INTO TABLE gt_tab.
CALL FUNCTION 'Z_VERY_SIMPLE_ALV'
TABLES
it_alv = gt_tab.
REPORT z_very_simple_alv_popup.
DATA gt_tab TYPE STANDARD TABLE OF sflights.
SELECT *
FROM sflights
INTO TABLE gt_tab.
CALL FUNCTION 'Z_VERY_SIMPLE_ALV'
EXPORTING
i_popup = 'X'
TABLES
it_alv = gt_tab.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
3 | |
3 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |