cancel
Showing results for 
Search instead for 
Did you mean: 

How to create a editable table control in web dynpro abap

Former Member
0 Kudos

Dear All,

I want to create a table control which i can give values, when i creating its in grayed out(non-editable), when i search in scn people suggested to append some initial lines to the internal table, Is that is the correct procedure, the method to make "input field" when binding the node to table is not giving editable option to the table .. but in code wizard its displaying with editable option , without code wizard how to get it. like the below editable table i want in web dynpro abap.

Thanks.

Accepted Solutions (0)

Answers (1)

Answers (1)

Gowtham
Contributor
0 Kudos

Hi Nanda,

  • Make the first column s.no as non editable & put some values to it ( for first 100 rows from 1 to 100) , so that it will make the first 100 columns as editable.

  • Provide a button called append row in table toolbar, on click of it add rows one by one by setting s.no values to it.

- Gowtham

Former Member
0 Kudos

Hi Gowtham thanks for reply,  so i need to append initial lines to internal table and bind it to the node?, is any other other method to achieve it, in that case when i using coding wizard to generate a table control its not generating any code for initial lines then how its coming as editable table. i can get editable table in webdynpro by doing append initial lines, is any other other method to get it..

Gowtham
Contributor
0 Kudos

Hi Nanda Kumar ,

For init level table values append you can use following code :


   DATA lo_nd_data_tab TYPE REF TO if_wd_context_node.

   DATA lo_el_data_tab TYPE REF TO if_wd_context_element.

   DATA ls_data_tab TYPE wd_this->element_data_tab.

   DATA lt_data_tab TYPE wd_this->elements_data_tab.

   DATA lv_temp     TYPE i.

   lo_nd_data_tab = wd_context->get_child_node( name = wd_this->wdctx_data_tab ).

   lo_el_data_tab = lo_nd_data_tab->get_element).

   DO 100 TIMES.

     ADD 1 TO lv_temp.

     MOVE lv_temp TO ls_data_tab-s_no.

     APPEND ls_data_tab TO lt_data_tab.

   ENDDO.

   lo_nd_data_tab->bind_table( lt_data_tab ).

- Gowtham

Former Member
0 Kudos

Dear Gowtham , Is this is the only to get a editable table in webdynpro

any other ways also availbale, because i already tried with this, but in one existing program(done by previous vendor ) i not seen any code like this but its editable

Gowtham
Contributor
0 Kudos

Hi Nanda,

as per my understanding , to make the table fields as editable for a line , that particular index should have at least one value.

- Gowtham