Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Layout for Class CL_SALV_LAYOUT

Hello all,

Please find below the piece of code i am using.

PARAMETERS : p_vari  TYPE  slis_vari.

DATA: gr_alv         TYPE REF TO cl_salv_table,
           lr_layout     TYPE REF TO cl_salv_layout.

 *--- This code is to get the layout,save the layout and display the
*    layout
      lr_layout = gr_alv->get_layout( ).
      key-report = sy-repid.
      lr_layout->set_key( key ).
      lr_layout->set_save_restriction( cl_salv_layout=>restrict_none )

      DATA: init_layout TYPE slis_vari.
      init_layout = p_vari.
      lr_layout->set_initial_layout( init_layout ).

*--- display report
      gr_alv->display( ).

Now when the grid is being displayed, I am creating a layout. When I click on "Save Layout", a popup comes where we give the name for layout. If you see, there is a checkbox for "Default Setting". This checkbox is disabled in my case. I want to enable this checkbox.

Can anyone please help me out for the above problem.

Points rewarded for helpful answers.



Not what you were looking for? View more on this topic or Ask a question