cancel
Showing results for 
Search instead for 
Did you mean: 

make editable tablecontrol

Former Member
0 Kudos

hi,

is it possible to make table editable table control in abap webdynpro.

if possible then how?

Accepted Solutions (1)

Accepted Solutions (1)

uday_gubbala2
Active Contributor
0 Kudos

Hi Rajan,

It is possible to create an editable table control in webdynpro. Just create the standard cell editors of the table control as, "Input Fields" instead of the normal 'TextView". (This can be done as follows... When you right click on the table UI element (under ROOTUIELEMENTCONTAINER) & say "Create Binding" you have the, "Standard Cell Editor" & "Standard Property" fields. Set "Standard Cell Editor" to "InputField" & "Standard Property" to "Value") You also should have the readOnly property of the Table set to false. (i.e, the checkbox for readOnly should be unchecked in the table properties) You will then get the output as how desired.

Regards,

Uday

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Rajan,

Yes it is possible you can do it in 2 ways.

1. Insert input field in directly in to the column.

2. Give editable through coding.

First option already Uday has given.Now see the how to make column editable.

write this code in WDMIDIFYVIEW method.
data: obj_table type ref to cl_wd_table,
      lr_column type ref to cl_wd_table_column,
      lr_input type ref to cl_wd_input_field.
     
obj_table ?= view->get_element( 'TABLE1' ).
obj_table->set_visible_row_count( value = 50  ).

lr_column = obj_table->get_column(
               id         = 'TABLE1_PRICE'
*              INDEX      = INDEX
                 ).
lr_input = cl_wd_input_field=>new_input_field(
      bind_value          = 'FLIGHTS.PRICE'
      id                  = 'IP1'
        ).

 lr_input->set_read_only( value = abap_false   ).

Thanks

Suman