效果图: 代码 REPORT ZLM_001. DATA: go_alv TYPE REF TO cl_salv_table, go_funlst TYPE REF TO cl_salv_functions_list. DATA: gt_data TYPE STANDARD TABLE OF spfli. DATA: lo_cxroot TYPE REF TO cx_root, lv_excmsg TYPE string. SELECT * FROM
效果图:
代码
REPORT ZLM_001.DATA: go_alv TYPE REF TO cl_salv_table,
go_funlst TYPE REF TO cl_salv_functions_list.
DATA: gt_data TYPE STANDARD TABLE OF spfli.
DATA: lo_cxroot TYPE REF TO cx_root,
lv_excmsg TYPE string.
SELECT * FROM spfli INTO TABLE gt_data .
TRY.
cl_salv_table=>factory(
IMPORTING
r_salv_table = go_alv
CHANGING
t_table = gt_data[] ).
CATCH cx_root INTO lo_cxroot.
lv_excmsg = lo_cxroot->get_text( ).
MESSAGE e000(oo) WITH lv_excmsg.
ENDTRY.
go_funlst = go_alv->get_functions( ).
go_funlst->set_all( 'X' ).
IF go_alv IS BOUND.
go_alv->set_screen_popup(
start_column = 10
end_column = 110
start_line = 5
end_line = 15 ).
go_alv->display( ).
ENDIF.
关于
CL_SALV_TABLE 目前得到的信息是不支持行编辑 列编辑 单元格编辑。
ALV Object Model(CL_SALV_TABLE) does not support editable cells, nor does it support editable columns or rows. You must use the class CL_GUI_ALV_GRID in order to have this functionallity.
PS;不过万能的开发还是有办法的,就是麻烦一些……