1 FORM adjust_edittables USING pt_list LIKE gt_list[]. 2 3 DATA ls_listrow LIKE LINE OF pt_list. 4 5 DATA ls_stylerow TYPE lvc_s_styl. 6 7 DATA lt_styletab TYPE lvc_t_styl. 8 9 10 11 LOOP AT pt_list INTO ls_listrow. 12 13 IF ls_listrow-carrid = ‘XY’. 14 15 Ls_stylerow-fieldname = ‘SEATSMAX’. 16 17 Ls_stylerow-style = cl_alv_grid=>mc_style_disabled. 18 19 APPEND ls_stylerow TO lt_styletab. 20 21 ENDIF. 22 23 IF ls_listrow-connid = ‘02’. 24 25 Ls_stylerow-fieldname = ‘PLANETYPE’ 26 27 Ls_stylerow-.style = cl_alv_grid=>mc_style_enabled. 28 29 APPEND ls_Pstylerow TO lt_styletab. 30 31 ENDIF. 32 33 INSERT LINES OF lt_styletab INTO ls_listrow-cellstyles. 34 35 MODIFY pt_list FROM ls_listrow. 36 37 ENDLOOP. 38 39 ENDFORM.
一般狀況下,單元格的設置會覆蓋整列的設置。能夠在程序裏動態切換各類模式。只須要在內表中插入想要的設置並刷新顯示便可。對於整列來講能夠設置field catalog的EDIT屬性,而後經過方法set_frontent_fieldcatalog來從新設置field catalog。ui
Get_cell_value
|
Gets the cell value.You pass the interface the position of the cell
|
Modify_cell
|
Modifies the cell value addressed via parameters
|
Add_protocol_entry
|
Add a log entry. You make use of standard message interface with message type, message id etc.
|
Protocol_is_visible
|
Make the error table visible or not
|
Refresh_protocol
|
Refreshing log entries
|
MT_MOD_CELLS
|
Contains address of modified cells with rowed and field name
|
MT_MOD_ROWS
|
Contain modified rows Its type is genric
|
MT_GOOD_CELLS
|
Contain cells have proper values
|
MT_DELETED_ROWS
|
Contain rows deleted from the list
|
MT_INSERTED_ROWS
|
Contain rows deleted from the list
|