on 03-26-2009 11:15 AM
Hi
I have an ALV column which is of type DropdownByKey. I can control the visibility of the dropdown by setting it based on another context node attribute (for e.g., 'CAT_VALUE_I_VISIBLE') which I modify at runtime. But then I want to hide the column itself based on the other context node attribute which I am not able to. Is it possible ?
I have something like this to hide the dropdown
lo_drdn_by_key->set_visible_fieldname( 'CAT_VALUE_I_VISIBLE' ).
But on the column level there is only a method like :
DATA lo_column type ref to cl_salv_wd_column.
lo_column-r_column->set_visible( cl_wd_uielement=>e_visible-none ).
Is there a possibility to control the visibility of an ALV column at runtime ?
Thanks and regards
Sukanya
Hi,
You can use this code to hide the column of the alv table:
data l_salv_wd_table type ref to iwci_salv_wd_table.
l_salv_wd_table = wd_this->wd_cpifc_alv_first( ).
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( 'CARRID' ).
l_column->SET_VISIBLE( IF_WDL_CORE=>VISIBILITY_BLANK ).
I hope it helps.
Regards
Arjun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Depending upon another context attribute condition get th ecolumn ref of the alv field which you want to hide and set the visibility property to none.
data : lt_columns type SALV_WD_T_COLUMN_REF.
Get the column ref
CALL METHOD lo_value->if_salv_wd_column_settings~get_columns
RECEIVING
value = lt_columns.
CALL METHOD lr_column->set_visible
EXPORTING
value = cl_wd_uielement=>e_visible-none.
Thanks,
Shailaja Ainala.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.