The various cell types can be used both in container mode and complete mode. The cell types are constructed based on the Attribute of the Interface ‘IF_SALV_C_CELL_TYPE’.
Type of cell | Attribute of IF_SALV_C_CELL_TYPE | Display mode container / complete | Event |
Text | => Text | Both | – |
Checkbox | => Checkbox | Both | – |
Checkbox hotspot | => checkbox_hotspot | Both | link_click |
Button | => Button | Both | link_click |
Dropdown | => dropdown | Container | |
Hotspot | => Hotspot | Both | link_click |
The method set_cell_type of the column object ( cl_salv_column_table ) can be used to set the cell type for the cells in the ALV Display.
DATA lr_all_columns TYPE REF TO cl_salv_columns_table.
DATA lr_single_column TYPE REF TO cl_salv_column_table.
lr_all_columns = lr_alv_grid->get_columns ().
lr_single_column ?= lr_all_columns->get_column (‘Contact_name’ ).
lr_single_column->set_cell_type (if_salv_c_cell_type =>Button).