on 05-17-2012 1:47 PM
Hi All,
I have used SALV_WD_TABLE in my component,
Now in one view i m displaying data into ALV
i want to hide some field of this ALV
How to do this ?
Thanks and regards
Abhishek
Hi
I have used following code
method WDDOINIT .
DATA lo_INTERFACECONTROLLER TYPE REF TO IWCI_SALV_WD_TABLE .
lo_INTERFACECONTROLLER = wd_comp_controller->wd_cpifc_emp_alv( ).
DATA lv_value TYPE ref to cl_salv_wd_config_table.
lv_value = lo_interfacecontroller->get_model(
).
lv_value->if_salv_wd_column_settings~delete_column( 'PASSWORD' ).
* DATA : lref_config TYPE REF TO cl_salv_wd_config_table.
* CREATE OBJECT lref_config.
* CALL METHOD lref_config->if_salv_Wd_column_Settings~delete_column('Client').
endmethod.
But it is showing that wd_cpifc_emp_alv is nor defied or protected
Here i have used ALV component in my component.
Instead of wd_comp_controller i have also used wd_this but it is showing sam error .
"emp_alv" is my ALV Component Name.
Where is problem ?
Please Correct me
Thanks and regads
Abhishek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Abhi,
Refer below: (Just copy paste the below code)
DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
lo_cmp_usage = wd_this->wd_cpuse_emp_alv( ).
IF lo_cmp_usage->has_active_component( ) IS INITIAL.
lo_cmp_usage->create_component( ).
ENDIF.
DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .
lo_interfacecontroller = wd_this->wd_cpifc_emp_alv( ).
DATA lv_value TYPE REF TO cl_salv_wd_config_table.
lv_value = lo_interfacecontroller->get_model(
).
Data:
lo_column_settings TYPE REF TO if_salv_wd_column_settings,
lo_column TYPE REF TO cl_salv_wd_column.
lo_column_settings ?= lv_value.
lo_column = lo_column_settings->get_column( 'PASSWORD' ).
lo_column->set_visible( if_wdl_core=>visibility_none ).
Hope will resollve.
Thanks Cheng and Jayanthi
It is working correctly....
Yuhuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu 🙂 🙂
Thanks Alot 🙂
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If you want to remove the field completely even from layout, you need to use
if_salv_wd_column_settings~delete_column. If you want it to be hidden only in display, then set_visible should be used.
Refer this thread.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
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.