cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with WebDynPro ALV

Former Member
0 Kudos

Hi,

I have an ALV with all the cell editors of the columns are input fields.

But, the point is, the rows are not editable and it is not allowing me to do copy paste.

Is there any way to do this.

Best Regards

Sid

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Siddharth,

You can Make the Row edittable by following the below steps.

1.)You Need to call the get model method.

DATA : lr_table_settings TYPE REF TO if_salv_wd_table_settings,

lo_value TYPE REF TO cl_salv_wd_config_table,

lr_column TYPE REF TO cl_salv_wd_column,

lr_all TYPE REF TO salv_wd_t_column_ref,

lr_column_settings TYPE REF TO if_salv_wd_column_settings,

lr_input_field TYPE REF TO cl_salv_wd_uie_input_field.

DATA: lt_columns TYPE salv_wd_t_column_ref,

ls_column TYPE salv_wd_s_column_ref,

lo_column TYPE REF TO cl_salv_wd_column,

lo_col_head TYPE REF TO cl_salv_wd_column_header.

lo_value = lo_interfacecontroller->get_model(

).

2.)Then call the method get_column()

Here you need to mention the field name to make it editable.

lr_column_settings ?= lo_value.

CALL METHOD lr_column_settings->get_column

EXPORTING

id = 'Field name'

RECEIVING

value = lr_column.

CREATE OBJECT lr_input_field

EXPORTING

value_fieldname = 'Field name'.

lr_column->set_cell_editor( lr_input_field ).

This Will worek .Please let me know if it works out.

Thanks and regards,

Amita Gupta

lr_table_settings ?= lo_value.

lr_table_settings->set_read_only( abap_false ).

Answers (1)

Answers (1)

former_member182190
Active Participant
0 Kudos

Hi,

To make your ALV editable you need to make the property read_only of ALV to abap_false.

.

DATA:

lr_salv_wd_table TYPE REF TO iwci_salv_wd_table.

lr_salv_wd_table = wd_this->wd_cpifc_alv( ).

*... (1) get ConfigurationModel from ALV Component

*... r_Table is of type CL_SALV_WD_CONFIG_TABLE .

wd_this->r_table = lr_salv_wd_table->get_model( ).

DATA:

lr_table_settings TYPE REF TO if_salv_wd_table_settings.

lr_table_settings ?= wd_this->r_table .

lr_table_settings->set_read_only( abap_false ).

Hope this helps.

Regards,

Ismail.