The column can be edited using the column object. The Column object can be retrieved from the get_columns( ) method of the ALV object.
Step1: Get the columns object from the ALV object.
DATA lr_columns TYPE REF TO cl_salv_columns_table.
Lr_columns = lr_alv_object->get_columns( ).
Step2: From the columns object, get the particular specific column object ‘CONTACT_ID’. The name mentioned in the structure must be used. Even if the displayed name in ALV output is different, please always use the name in the structure.
DATA lr_specific column TYPE REF TO cl_salv_column_table.
Lr_specific_column = lr_columns->get_column( ‘CONTACT_ID’ ).
Step3: Call the set_visible method of the column object to hide the column in ALV Display. Please set the abap_false value to the importing parameter.
Lr_specific_column->set_visible( abap_false ).