当前位置 : 主页 > 编程语言 > java >

Demo:cl_salv_table ALV 弹出框

来源:互联网 收集:自由互联 发布时间:2022-10-14
效果图: 代码 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

效果图:

Demo:cl_salv_table ALV 弹出框_行编辑


代码

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;不过万能的开发还是有办法的,就是麻烦一些……


Demo:cl_salv_table ALV 弹出框_行编辑_02



网友评论