on 02-05-2010 2:56 PM
Hi Experts,
I have a requirement where i have to set the no of visible Columns on my ALV. Any idea how i can set the visible columns programatically?
Thanks in Advance!!
This issue in general must be resolved by using the scrollable column count. For my specific case these might be an issue some other point which i have to investigate.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
data: l_ref_cmp_usage type ref to if_wd_component_usage.
l_ref_cmp_usage = wd_this->wd_cpuse_alv( ). "Adjust for your component usage name - mine is ALV
if l_ref_cmp_usage->has_active_component( ) is initial.
l_ref_cmp_usage->create_component( ).
endif.
data l_salv_wd_table type ref to iwci_salv_wd_table.
l_salv_wd_table = wd_this->wd_cpifc_alv( ). "Again adjust for your component usage name
data l_table type ref to cl_salv_wd_config_table.
l_table = l_salv_wd_table->get_model( ).
data l_column type ref to cl_salv_wd_column.
l_column = l_table->if_salv_wd_column_settings~get_column( 'CLIENT' ).
l_column->set_visible( cl_wd_uielement=>e_visible-none ).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tomas,
As i understand this code will show a particular column. but i am actually looking for the' Number of columns',
Example: I want to display 10 columns.
How can i specify the no '10'
The issue in my case what every i do there are only 10 columns visible on my ALV the 11 the columns is becoming scrollable. I have tried adjusting the width still this is hapening. so when i right click on my ALV a pop up opens with 4 tabs the 4 th tab 'DISPLAY' has a parameter No of Visible columns as '10' . I want to programatically change it to 11. So that it becomes common to all the user.
Thanks!!
Hi Thomas,
Thanks for all ur input!!
But although i set the scrollable column count to 11 it is not working. If i again right click on my ALV>> select the user detail settrngs>>and go to the display tab the no of visible columns is still showing as 10.
Do you think we have any way by which this field can be updated programatically.
Thanks!!
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.