On the ALV page, some custom fields need to report errors during verification, and the red box is located to the error field. For the error reported in the red box, class CL_ GUI_ ALV_ Set in Grid_ ERROR_ The cells method can be implemented, however, this method is protected, so the implementation needs to be rewritten in the program.
1. Rewrite set_ERROR_Cells method
1 CLASS lcl_gui_alv_grid DEFINITION INHERITING FROM cl_gui_alv_grid. 2 3 PUBLIC SECTION. 4 METHODS: 5 m_set_error_cells IMPORTING it_err TYPE lvc_t_err. 6 ENDCLASS.
1 CLASS lcl_gui_alv_grid IMPLEMENTION. 2 METHOD m_set_error_cells. 3 CALL_METHOD me->set_error_cells 4 EXPORTING 5 cell_table = it_err. 6 ENDMETHOD. 7 ENDCLASS.
2. Save the row and column IDs of the fields that need to report errors to the internal table.
1 DATA:gt_err TYPE lvc_t_err, 2 gs_err TYPE lvc_s_err. 3 4 gs_err-row_id = &1. 5 gs_err-row_id = &2. 6 APPEND gs_err TO gt_err. 7 CLEAR:gs_err.
3. When the PbO is refreshed, the method is called
1 IF gt_err IS NOT INITIAL. 2 CALL METHOD go_alv_grid->m_set_error_cells 3 EXPORTING 4 it_err = gt_err. 5 ENDIF.
- [Solved] Search with xadmin_ Related field got invalid lookup: icontains
- Invalid use of incomplete type struct or class solution
- Python uses xlwt length limit to report errors
- org.hibernate.QueryException: could not resolve property
- [Solved] java.lang.IllegalStateException: Cannot get a STRING value from a NUMERIC cell
- SpringMVC @RequestBody Error:Unrecognized field, not marked as ignorable
- [Solved] MySQL Error: ERROR 1615 (HY000): Prepared statement needs to be re-prepared
- [Solved] IOException during persisting of HostData OPatchAuto failed
- [Solved] MySQL Add New Field Error: ERROR 1118 — Row size too large. The maximum row size for the used table type
- [Solved] MYSQL Error: BIGINT UNSIGNED value is out of range