08-05-2009 2:48 PM
Hi all
i try to create a new program with cl_SALV_TABLE but i have 2 parts with errors maybe somebody could help me
first; i would like to sort my itab means interntable has BSCHL COUNT ICON on Screen i would like to have ICON COUNT BSCHL
my code but it doesnt work ?
DATA: gr_sorts TYPE REF TO cl_salv_sorts.
*-
gr_sorts = gr_table->get_sorts( ).
*-
gr_sorts->add_sort( columnname = 'GROUP' subtotal = abap_true ).
gr_sorts->add_sort( columnname = 'ICON' ).
gr_sorts->add_sort( columnname = 'COUNT' sequence = if_salv_c_sort=>sort_up ).
gr_sorts->add_sort( columnname = 'BSCHL' ).
*-
gr_sorts->set_position( columnname = 'ICON' position = 1 ).
gr_sorts->set_position( columnname = 'COUNT' position = 2 ).
gr_sorts->set_position( columnname = 'BSCHL' position = 3 ).
secount; i would like to save user-sepific and Default setting
my code but it doesnt work ? i could only user-specific....
DATA:
gr_layout TYPE REF TO cl_salv_layout,
l_key TYPE salv_s_layout_key,
gr_layout = gr_table->get_layout( ).
*-
l_key-report = sy-repid.
gr_layout->set_key( l_key ).
gr_layout->set_save_restriction(
cl_salv_layout=>restrict_none ).
Thanks for help
08-05-2009 3:12 PM
>
>
> secount; i would like to save user-sepific and Default setting
>
> my code but it doesnt work ? i could only user-specific....
>
Regarding the layout user should have authority object S_LAYOUT in their profile to save global layouts. otherwise global layout saving will be disabled.
08-05-2009 3:41 PM
08-05-2009 3:30 PM
The SET_POSITION for the SORT object should work.
Put a breakpoint in the method SET_POSITION in the class CL_SALV_SORTS and see, is it changing the sequence in the internal table ME->T_SORT?
Regards,
Naimesh Patel
08-05-2009 3:41 PM
hi
yes but on the screen doesn't i have also run BALVBUFDEL to delete buffer but now right display ??