on 01-14-2009 12:37 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
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
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.