on 07-25-2008 3:31 PM
Hi All,
Can any on tell me how to get the coloumns of the O/P ALV table in eit mode. I have an alv table ready its working fine.
All I know is I need to use some codes like
call method l_value->if_salv_wd_table_settings~SET_READ_ONLY
EXPORTING
VALUE = ABAP_FALSE
along with method SET_CELL_EDITOR. But I am not able to implement it. Can anyone give me the details. The only thing ready is an alv table which takes i/p from select parameter and gies the data in the display.
I get a lot of syntax error and am not able to understand clearly .
Thanks in advance.
Rgds,
Anu.
I'm afraid you might have to clarify your question a little bit. What exactly are you needing help with? Are you just wanting to know how to interact with the ALV Table model. If so, you can do that via the component usage and the component interface. Here is a small example. The thing to keep mind is that the code must be adjust for what you named your alv component usage. For example in this code I named my component usage alv. Therefore the method names are wd_this->wd_cpuse_alv and wd_this->wd_cpifc_alv. If I had instead named the component usage XYX, the generated method names would change to wd_this->wd_cpuse_xyz and wd_this->wd_cpifc_xyz.
data: l_ref_cmp_usage type ref to if_wd_component_usage.
l_ref_cmp_usage = wd_this->wd_cpuse_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( ).
data l_table type ref to cl_salv_wd_config_table.
l_table = l_salv_wd_table->get_model( ).
l_table->if_salv_wd_table_settings~set_scrollable_col_count( 8 ).
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 ).
data textview type ref to cl_salv_wd_uie_text_view.
l_column = l_table->if_salv_wd_column_settings~get_column( 'ADD_PARTICIPANTS' ).
create object textview.
textview->set_text_fieldname( 'ADD_PARTICIPANTS' ).
textview->set_wrapping( abap_true ).
l_column->set_cell_editor( textview ).
l_column = l_table->if_salv_wd_column_settings~get_column( 'STATUS' ).
data ddlb type ref to cl_salv_wd_uie_dropdown_by_key.
create object ddlb
exporting
selected_key_fieldname = 'STATUS'.
ddlb->set_read_only( abap_true ).
l_column->set_cell_editor( ddlb ).
l_column = l_table->if_salv_wd_column_settings~get_column( 'CHANGED_BY' ).
l_header = l_column->get_header( ).
l_header->set_text( `Changed By` ).
l_column = l_table->if_salv_wd_column_settings~get_column( 'LIFE_CYCLE_STAT' ).
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.
Thanks to all,
Anupma Chandra.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
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.