on 11-05-2010 2:09 PM
Hi,
I have created a ALV table by adding a View Container Element and addding SALV_WD_TABLE. Somehow the table is input disabled. I want to make it input enabled. In one of the posts I was advised to make the cell editor from default textView to textEdit. But i am not sure how to do this. In the Layout tab i am not seeing any column names in the desing time as i have added a "View Container Element". Do i need to do this programatically? If yes, can you please suggest how to do this?
Thanks,
Aditya.
Hi,
see the [Documentation|http://help.sap.com/saphelp_nw2004s/helpdata/en/7e/ce322aa1684aafaad4acdeadb5660b/frameset.htm] on write protection
Grtz,
Koen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thanks for the link. I have gone through this. It is taking about how to switch off the write protection. I did that but still the cell fields are disabled. Can you please let me know?
create an instance of ALV component
DATA:
lr_salv_wd_table_usage TYPE REF TO if_wd_component_usage.
lr_salv_wd_table_usage = wd_this->wd_cpuse_alv_comp( ).
IF lr_salv_wd_table_usage->has_active_component( ) IS INITIAL.
lr_salv_wd_table_usage->create_component( ).
ENDIF.
get ALV component
DATA:
lr_salv_wd_table TYPE REF TO iwci_salv_wd_table.
lr_salv_wd_table = wd_this->wd_cpifc_alv_comp( ).
wd_this->alv_config_table = lr_salv_wd_table->get_model( ).
DATA: lr_table_settings TYPE REF TO if_salv_wd_table_settings.
lr_table_settings ?= wd_this->alv_config_table.
lr_table_settings->set_read_only( abap_false ).
lr_table_settings->SET_ENABLED( abap_true ).
Please try the below code;
DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings,
lr_col_header TYPE REF TO cl_salv_wd_column_header.
DATA: lt_columns TYPE salv_wd_t_column_ref.
DATA: ls_column TYPE salv_wd_s_column_ref.
DATA: ls_tooltip TYPE string.
DATA: lr_inputfield TYPE REF TO cl_salv_wd_uie_input_field.
lr_column_settings ?= wd_this->alv_config_table.
lt_columns = lr_column_settings->get_columns( ).
loop over table - in each loop each column can be modified
LOOP AT lt_columns INTO ls_column.
" get header of column
IF ls_column-id = 'XXXX' OR ls_column-id = 'YYYY'. ".... Exclude the columns that you dont want to handle
ELSE.
CREATE OBJECT lr_inputfield
EXPORTING
value_fieldname = ls_column-id.
lr_col_header = ls_column-r_column->get_header( ).
ls_column-r_column->set_cell_editor( lr_inputfield ).
" do any other settings here.
ENDIF.
ENDLOOP.
Let me know if it helps.
Regards,
Kumar.
You need to do it Programmatically.
see salv_wd_test_extended component , method on_data_set( ).
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.