OO ALV 访问保护类方法 实现字段报错红框定位
参考博客
https://www.cnblogs.com/keruigen/p/15696442.html
继承类
CLASS lcl_gui_alv_grid DEFINITION INHERITING FROM cl_gui_alv_grid. PUBLIC SECTION. METHODS: m_set_error_cells IMPORTING it_err TYPE lvc_t_err. ENDCLASS. CLASS lcl_gui_alv_grid IMPLEMENTATION. METHOD m_set_error_cells. CALL METHOD me->set_error_cells EXPORTING cell_table = it_err. ENDMETHOD. ENDCLASS.
对象定义
DATA:go_9000_container TYPE REF TO cl_gui_custom_container, go_9000_alv_grid TYPE REF TO lcl_gui_alv_grid.
PBO 需要放在 ALV刷新之后 或者不刷新
MODULE pbo_9000 OUTPUT. PERFORM frm_set_status_9000. PERFORM frm_head_scr. "设置 PERFORM frm_init_alv_9000. "初始化alv容器 DATA:gt_err TYPE lvc_t_err. BREAK-POINT. IF gt_err IS NOT INITIAL. gt_err = VALUE #( ( row_id = 1 col_id = 1 ) ( row_id = 1 col_id = 2 ) ( row_id = 1 col_id = 3 ) ). CALL METHOD go_9000_alv_grid->m_set_error_cells EXPORTING it_err = gt_err. ENDIF. ENDMODULE.
效果 需要知道列位置