on 02-14-2012 5:01 AM
In my requirement there is a add button if u press the button it will open a popup in that we have to select a jpg image and give upload means it should come into the table.But its not updating if u press the back button and come to the same view it is updating.
[http://prabhuabap.blogspot.in/2012/02/webdynpro_13.html]
if you want to add only one record, then use bind_element( new item = element setinitial_eleements = abap_false ).
Binding entire table again it will take more memory.
Regards
Srinivas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
In onAction Upload button you read the internal table using get_static_attributes of node and loop the internal table and modify it using modify statement and then rebind the table using bind_table( lt_tab ) method of internal table.
note: the reason why it is updating after back and coming to view is, I think you have return the code in WDDOINIT method. So you need to rebind the internal table to show immediate effect.
Hope this helps u.,
Thanks & Regards,
Kiran.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Check my sample code, here per1 is the node name.in that there are four attributes say pernr, grade, organization, location.
I am passing some dummy values and it creates one new record.
LO_EL_N_PER1 = lo_nd_n_per1->create_element( ).
ls_n_per1-pernr = LV_AEMPID.
ls_n_per1-grade = 'NO VALUE FOUND'.
ls_n_per1-ORGANIZATION = 'NO VALUE FOUND'.
ls_n_per1-LOCATION = 'NO VALUE FOUND'.
lo_el_n_per1->set_static_attributes( exporting static_attributes = LS_N_PER1 ).
lo_nd_n_per1->bind_element( new_item = lo_el_n_per1
set_initial_elements = ABAP_FALSE ).
Regards
Srinivas
User | Count |
---|---|
95 | |
11 | |
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.