on 08-03-2010 5:29 PM
Hi All,
I created a table and filled it with values and bind it to output.
i have a field in ouput when i change the value in the output i need to change the values in my table.
how to get the entie table(table context node ) into my method.
is it possible to get the output table data when "On action " event is triggered.
Hello.
I guess you want to do that with Web Dynpro.
So you need a function which is called, when your click-event is triggered.
And within your function you need something like that:
DATA lo_node_of_table TYPE REF TO if_wd_context_node.
DATA lo_some_other_node TYPE REF TO if_wd_context_node.
DATA lo_element TYPE REF TO if_wd_context_element.
DATA ld_counter TYPE i.
DATA ld_value TYPE i.
DATA ld_sum TYPE i.
lo_node_of_table = wd_context->path_get_node( path = `PATH_TO.CONTEXT_NODE` ).
ld_counter = lo_node_of_table->get_element_count( ).
DO ld_counter TIMES.
lo_element = lo_nd_in->get_element( index = sy-index ).
lo_element->get_attribute(
EXPORTING name = 'FIELD_NAME'
IMPORTING value = ld_value ).
ld_sum = ld_sum + ld_value.
ENDDO.
lo_some_other_node->set_attribute( name = 'SUM_OF_SOMETHING' value = ld_sum ).
Please reply if you meant something else.
Regards
Thomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.