Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

how to disable the column header using CL_SALV_TABLE class

Former Member
0 Kudos

Hi All,

How can i disable the column header in the ALV display

below is my code

I am trying to pass it_header_data table into factory method, my requirement is not to display the column header, it should be suppressed.

TRY.
        cl_salv_table=>factory(
          EXPORTING
            "LIST_DISPLAY   = 'X'
            r_container    = gr_container
            container_name = 'HEADER_CONT'
          IMPORTING
            r_salv_table   = gr_table
          CHANGING
            t_table        = it_header_data ). "it_fcat_hdr
      CATCH cx_salv_msg.                                "#EC NO_HANDLER
    ENDTRY.
    "lv_layout = lo_alv->r_layout.
    "gr_functions = gr_table->get_functions( ).
    "gr_functions->set_all( abap_true ).
    gr_display = gr_table->get_display_settings( ).
    gr_display->SET_HORIZONTAL_LINES( ' ' ).
    gr_display->SET_VERTICAL_LINES( ' ' ).
    gr_display->set_striped_pattern( cl_salv_display_settings=>false ).
    gr_table->display( ).
  ENDIF.

Thanks,

Prathap

3 REPLIES 3

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

This message was moderated.

0 Kudos

Solved using

lr_columns = lr_table->get_columns( ).

lr_columns->set_headers_visible( abap_false ).

methods.