cancel
Showing results for 
Search instead for 
Did you mean: 

Issue on Table Manipulations in WebDynpro ABAP

0 Kudos

Hi,

I am designing simple webdynpro component for displaying information in Table. In that i am getting two issues

First one when i click on add row button one empty row is added but it should in first position but my requirement is once we can click on add row button i want to insert one empty row last position.

Second one : when i click on refresh just refresh the browser and at the same time update table data  {i am using invalidate but it delete the table data}


                                               

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Hi Praveen,

For First  One:: Just Append blank line to table and bind that table to table's node

APPEND stru_input_sec_view to ist_table.

 

       node_table_sec_view->bind_table( new_items = ist_table set_initial_elements = abap_true )

For Second One: invalidate method used to refresh the node.so it will delete the data.you have to rebind the data to table node after refresh or update.

Szczerbowski
Active Participant
0 Kudos

You  can also achieve point number one with just one call

DATA(lr_node) = wd_context->get_child_node( 'TABLE_DATA' ).

   lr_node->bind_element(

     EXPORTING

       new_item             = lr_node->create_element( )    " NEW ELEMENT

       set_initial_elements = abap_false                          " KEEP EXISTING ELEMENTS

       index                = lr_node->get_element_count( ) + 1    " Position = LAST + 1

   ).