on 03-25-2013 12:40 PM
hello,
I have 2 tables connected
(for id_jud from table ytb_jud_iv i have n id_loc from table ytb_loc_iv)
In my component i want to insert two dropdown by index lists , one for the values from ytb_jud_iv and one for ytb_loc_iv
The question is how can i connect this two for this result:
when i select a value from dropdown1 in dropdown2 appears the value corresponding the value for dropdown2.
Please help!
Thanks
Hi,
Follow these steps :
1. Fill data into first drop down box using supply function..
2. Goto events in drop down box property and give action name to populate data into second drop down box ...
3. Write the following code in action method to retrieve data based on first drop down..
DATA lo_nd_list_1 TYPE REF TO if_wd_context_node.
DATA lo_el_list_1 TYPE REF TO if_wd_context_element.
DATA ls_list_1 TYPE wd_this->element_list_1.
DATA lv_ebeln TYPE wd_this->element_list_1-ebeln.
* navigate from <CONTEXT> to <LIST_1> via lead selection
lo_nd_list_1 = wd_context->get_child_node( name = wd_this->wdctx_list_1 ).
* get element via lead selection
lo_el_list_1 = lo_nd_list_1->get_element( ).
* get single attribute
lo_el_list_1->get_attribute(
EXPORTING
name = `EBELN`
IMPORTING
value = lv_ebeln ).
DATA lo_nd_list_2 TYPE REF TO if_wd_context_node.
DATA lt_list_2 TYPE wd_this->elements_list_2.
* navigate from <CONTEXT> to <LIST_2> via lead selection
lo_nd_list_2 = wd_context->get_child_node( name = wd_this->wdctx_list_2 ).
select ekorg
up to 5 rows
from ekko
into table lt_list_2
where ebeln = lv_ebeln.
lo_nd_list_2->bind_table( new_items = lt_list_2 set_initial_elements = abap_true ).
Hope this will be helpful..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
For this requirement create two nodes of 0:N cardinality for
1.Table ytb_jud_iv --> Node should contain field to displayed in drop down i think it is "id_jud"
2.Table ytb_loc_iv --> Node should contain field to displayed in drop down i think it is "id_loc"
So for first drop down by index selection i.e id_jud ,make use of "ON SELECT" event of the drop down and fill the Node of second drop down by index for id_loc...
So by making use of ON SELECT event of first drop down fill the node of second drop down ...
Thanks,
Nandi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Tony,
DDBI has onSelect event, just populate values for second dropdown(LOC_TV) with comparision in onSelect of JUD_TV dropdown...
Regards,
CR
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
please provide more information......
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.