on 02-08-2010 3:33 AM
Dear Gurus,
I've a requirement, wherein, I've to create a table with the first field as a drop down, the other two normal input fileds. For the values to come under the drop down, I've maintained a Supply Function to both the field node, and the table, which is same for both.
Now my issue is, the moment I select a value from the drop down, and enter details under the other two input fields, and then click on an insert row button, my drop down is getting reset to the first value. The selected value gets disappeared.
Kindly requested to suggest on the same.
Regards,
-Syed.
Hi,
In the action method of DD, get the index of the table and set the value that you have selected in DD.
Please find the sample code.
lo_nd_n_node = wd_context->get_child_node( name =<Parent node name>).
*/..get element via lead selection
lo_el_node = lo_nd_n_node ->get_element( ).
Get the index of table
lo_el_table = wdevent->get_context_element( 'CONTEXT_ELEMENT' ).
lv_index = lo_el_table->get_index( ). " Index of table to set value to corresponding row
lo_nd_n_node->set_attribute(
EXPORTING
index = lv_index
name = '<Field name of the column>'
value = <value>). " Value selected in DD
Regards,
Delphi.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear All,
Thank you very much for your answers. I am able to solve the issue.
Regards,
-Syed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Check the value of set_initial_elements parameter of Bind_table mthod. It should be abap_false.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pankaj,
There is no effect with set_initial_elements = abap_false.
The issue is, the Supply Function is same for the parent so as of the Child Node.
The heirarchy of my table:
TABLE --> Parent Node --> Supply Function (SF)
| |__ DD --> Child Node --> Supply Function (SF)
| |__ Action
|__ Field 1
|__ Field 2
Supply Function SF is same for both the nodes. So, Whenever you make change in the dropdown of the table, using the Supplyfunction, it will again reset to the same structure, and the selected value will not be set at the first record.
Regards,
-Syed.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.