2007 Oct 05 6:48 PM
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.
Thanks,
Salil
2007 Oct 05 8:03 PM
Hello Salil
Class CL_SALV_LAYOUT has a method <b>SET_DEFAUT</b> (<i>Allow default layout</i>). Perhaps you have to add the following statement:
lr_layout = gr_alv->get_layout( ).
lr_layout->set_default ( CL_SALV_LAYOUT=>true ). " allow default
key-report = sy-repid.
lr_layout->set_key( key ).
lr_layout->set_save_restriction( cl_salv_layout=>restrict_none )
Regards
Uwe
2007 Oct 05 8:03 PM
Hello Salil
Class CL_SALV_LAYOUT has a method <b>SET_DEFAUT</b> (<i>Allow default layout</i>). Perhaps you have to add the following statement:
lr_layout = gr_alv->get_layout( ).
lr_layout->set_default ( CL_SALV_LAYOUT=>true ). " allow default
key-report = sy-repid.
lr_layout->set_key( key ).
lr_layout->set_save_restriction( cl_salv_layout=>restrict_none )
Regards
Uwe
2007 Oct 05 8:39 PM
Hi Uwe,
Thanks a lot for your help. My problem got solved.
Regards,
Salil