on 09-18-2008 2:33 PM
Hi Gurus,
Shortly I have these things :
1) A node with some attributes like customer_no, customer_name, status etc.
2) A view which contains an element(viewcontainerelement) and this displays the node.
This node is in CONTEXT of my view and in componentcontroller.
Now i want to hide some attributes(columns) when displaying this alv. Can anybody help me?
Thanks..
Hi,
Check the interface if_salv_wd_column_settings.
there is a method delete_column. you can always delete the columns which are not required.
Regards,
Kinshuk
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is a method that I wrote to not show a column.
Input parameter col_name is string containing column name in table.
method alv_col_set_invis .
data: l_ref_interfacecontroller type ref to iwci_salv_wd_table,
l_value type ref to cl_salv_wd_config_table,
lr_column type ref to cl_salv_wd_column.
Component name is 'ALV'
l_ref_interfacecontroller = wd_this->wd_cpifc_alv( ).
l_value = l_ref_interfacecontroller->get_model( ).
lr_column = l_value->if_salv_wd_column_settings~get_column( col_name ).
lr_column->set_visible( cl_wd_abstr_table_column=>e_visible-none ).
endmethod.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Use this code to donot display the some of your attributes in ALV.
L_VALUE->IF_SALV_WD_COLUMN_SETTINGS~DELETE_COLUMN( ID = 'STATUS ).
where l_value is the table reference.
Thanks
Suman
Edited by: suman kumar chinnam on Sep 18, 2008 7:24 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Adil,
You can hide column using below code:
data: lr_salv_column type ref to cl_salv_wd_column,
lr_salv_table type ref to cl_salv_wd_config_table.
lr_salv_column = lr_salv_table-if_salv_wd_column_settings~get_column( 'column_ name' ).
lr_salv_column->set_visible( if_wdl_core=>visibility_blank ).
Thanks...
Edited by: Router on Sep 18, 2008 1:21 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
When i write that code, it gives me an error message :
data: lr_salv_column type ref to cl_salv_wd_column,
lr_salv_table type ref to cl_salv_wd_config_table.
lr_salv_column = lr_salv_table-if_salv_wd_column_settings~get_column( 'm_no' ).
lr_salv_column->set_visible( if_wdl_core=>visibility_blank ).
Error message:
"Class "CL_MAINV_CTR" does not contain an interface
"LR_SALV_TABLE-IF_SALV_WD_COLUMN_SETTINGS". "
"Mainv" is the name of my view.
I am new at WDA, please give me detailed information.
Thanks
Edited by: Adil Gündüz on Sep 22, 2008 11:13 AM
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.