cancel
Showing results for 
Search instead for 
Did you mean: 

Editable Text View in Webdynpro ALV

Former Member
0 Kudos

Hi,

How to make one text view column editable in Webdynpro ALV.

I have tried below code, but the field is not becoming editable:

CALL METHOD lv_value->if_salv_wd_column_settings~get_column

     EXPORTING

       id    = 'ACTNT'

     RECEIVING

       value = lr_column.

   CREATE OBJECT lr_txview.

   CALL METHOD lr_txview->set_text_fieldname

     EXPORTING

       value  = 'ACTNT'

lr_column->set_cell_editor( lr_txview ).

Thanks and Regards,

Debarshi Maity

Accepted Solutions (0)

Answers (1)

Answers (1)

ramakrishnappa
Active Contributor
0 Kudos

Hi,

Its not possible to make TEXTVIEW as editable.

Instead, set the cell editor with input field of type CL_SALV_WD_UIE_INPUT_FIELD.

Here you can controll the READ_ONLY property of input field by using method SET_READ_ONLY.

You can achieve your requirement as below


data lr_input_field          type ref to cl_salv_wd_uie_input_field.

CALL METHOD lv_value->if_salv_wd_column_settings~get_column

     EXPORTING

       id    = 'ACTNT'

     RECEIVING

       value = lr_column.

" create object of type input field

CREATE OBJECT lr_input_field
          EXPORTING
            value_fieldname = 'ACTNT'.

lr_column->set_cell_editor( lr_input_field ).

Hope this helps you.

Regards,

Rama

Former Member
0 Kudos

Hi Rama,

I want to have comments field in ALV, this field can contain multiple rows. How can I make this?

Thanks and Regards,

Debarshi Maity

ramakrishnappa
Active Contributor
0 Kudos

Hi Maity,

Sorry, there is no  ui element called TEXT_EDIT in alv to meet your requirement.

To meet your requirement, you should have text edit / formatted text edit as editor

I would like to suggest you the below 2 options

  1. Go for table : in table you can use TEXT EDIT ui element as editor for column.
  2. Create a button in alv cell as 'comments' , onCELLaction event you can show a popup window with only TEXT_EDIT and you can save the comments back to context node attribute

Here, option 2 would require more efforts from your end as well as users may not accept to click on button and again enter comments

Check out the option whichever suits you.

Hope this helps you.

Regards,

Rama

Former Member
0 Kudos

Try to implement Table, there you can find all UI element, according to your requirement..