on 06-19-2008 7:42 AM
Here is my coding......
*******************************************************************
*coding to get the district value
DATA lo_nd_district TYPE REF TO if_wd_context_node.
DATA lo_el_district TYPE REF TO if_wd_context_element.
DATA ls_district TYPE wd_this->element_district.
DATA lv_district_txt LIKE ls_district-district_txt.
navigate from <CONTEXT> to <DISTRICT> via lead selection
lo_nd_district = wd_context->get_child_node( name = wd_this->wdctx_district ).
get element via lead selection
lo_el_district = lo_nd_district->get_element( ).
get single attribute
lo_el_district->get_attribute(
EXPORTING
name = `DISTRICT_TXT`
IMPORTING
value = lv_district_txt ).
*******************************************************************
*coding to diplay records when clicking a button(Submit)
DATA lo_nd_table TYPE REF TO if_wd_context_node.
DATA lo_el_table TYPE REF TO if_wd_context_element.
DATA ls_table TYPE wd_this->element_table.
DATA lv_district LIKE ls_table-district.
navigate from <CONTEXT> to <TABLE> via lead selection
lo_nd_table = wd_context->get_child_node( name = wd_this->wdctx_table ).
get element via lead selection
lo_el_table = lo_nd_table->get_element( ).
get single attribute
lo_el_table->set_attribute(
EXPORTING
name = `DISTRICT`
" IMPORTING
value = lv_district_txt ).
*******************************************************************
The above coding updates only one record to that
table created in view.
If i enter 2nd district value means then the first record
in the table is overwritten.
So my need is the record should not be overwritten.
it(2nd record ) should be displayed after the 1st record.
Any one can help me and send the coding plz....
instead of using set attribute you should use bind table method to display/update the records in table view.
step1 ) collect all the data in a local table
step2 ) and the bind that lacal table with your node
search1 = wd_context->get_child_node( name = `TABLE1` ).
search1->bind_table( lt_detail)
here lt_detail is your local table and TABLE1 is node which is bound with table ui element.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.