cancel
Showing results for 
Search instead for 
Did you mean: 

capturing updates to web dynpro table

Former Member
0 Kudos

Hi all,

if i have got an editable table displayed on my web dynpro application which has say 4 rows of data. The user comes along and changes values in a number of the cells on various rows but does not press enter after each one how can i capture these changes?

Is there a way of capturing the whole table and its currect data in one go?

Regards

Mart

Accepted Solutions (1)

Accepted Solutions (1)

pranav_nagpal2
Contributor
0 Kudos

Hi,

Yes there is a way but in that also after entering/modifying all the values in table you have to press any event... like say press a button.... it is similar to any getting data from any input field on click of button...

regards

Pranav

Former Member
0 Kudos

That would be fine, what i want to do is allow them to enter all the data they want to in the table then thay click the next button and it is at this point i want to be able to capture the whole data of the table being displayed. do you know what the code would be to do this data capture.

Regards

Mart

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

I suggest using the context change log. It will do the work of what you described for you:

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/47/a8e5d273b12fe2e10000000a42189d/frameset.htm

pranav_nagpal2
Contributor
0 Kudos

Hi,

Below code will fetch you whole data of the node you have binded with your table in an internal table which is of same type as that of node which you have binded with your table UI element..

data lo_nd_cn_table type ref to if_wd_context_node.
  data lo_el_cn_table type ref to if_wd_context_element.
  data lt_table type wd_this->elements_cn_table.
  data ls_table type wd_this->element_cn_table.
  data index type i.
* navigate from <CONTEXT> to <CN_TABLE> via lead selection
  lo_nd_cn_table = wd_context->get_child_node( name =
wd_this->wdctx_cn_table ).
 
* @TODO handle not set lead selection
  if lo_nd_cn_table is initial.
  endif.
 
* get element via lead selection
  lo_el_cn_table = lo_nd_cn_table->get_element(  ).
 
* @TODO handle not set lead selection
  if lo_el_cn_table is initial.
  endif.
 
* alternative access  via index
* lo_el_cn_table = lo_nd_cn_table->get_element( index = 1 ).
* @TODO handle non existant child
* IF lo_el_cn_table IS INITIAL.
* ENDIF.
 
* get all declared attributes
  lo_nd_cn_table->get_static_attributes_table(
    importing
      table = lt_table ).

regards

Pranav

Former Member
0 Kudos

Fantastic! thanks Pranav thats spot on, exactly what i need!

Regards

Mart

Former Member
0 Kudos

Cheers Thomas,

I will look into this!

Regards

Mart

Answers (0)