on 04-16-2008 7:26 AM
Hai
i have tablenode like - POITEM and
i have two subnodes like - PONODE and ITEMNODE
i have two dropdowns in a table.
i bind PONODE -> poid -> attribute to first dropdown
next i bind ITEMNODE->itemid-> attribute to second dropdown
now i am showing the records in the first dropdown using some coding in supplyfunction or wddoinit method.
First dropdown code (wddoinitmethod)
***********************
data:
node_poitem type ref to if_wd_context_node,
node_ponode1 type ref to if_wd_context_node,
elem_ponode1 type ref to if_wd_context_element,
stru_ponode1 type if_employeepopvu1=>element_ponode1,
itab_sflight_node type STANDARD TABLE OF ZSPOID1,
stru_sflight_node LIKE LINE OF itab_sflight_node.
SELECT poid FROM table1 INTO TABLE itab_sflight_node.
node_ponode1->bind_table(
new_items = itab_sflight_node
set_initial_elements = abap_true ).
the above code is working fine.
when i select the value from first dropdown and pass it to bring the values for second dropdown.this scnario is not working now
i have written the following syntax in
First Dropdown click method
*********************************
data : itabitem type STANDARD TABLE OF ZSPOID,
elem_ponode1->get_attribute(
exporting
name = `POID`
importing
value = item_poid ).
select itemid from table into corresponding fields of table itabitem where poid eq item_poid.
data:
node_poitem type ref to if_wd_context_node,
node_itemnode1 type ref to if_wd_context_node,
elem_itemnode1 type ref to if_wd_context_element,
stru_itemnode1 type if_employeepopvu1=>element_itemnode1 ,
item_itemcode like stru_itemnode1-itemcode.
elem_itemnode1 = node_itemnode1->create_element( ).
node_itemnode1->bind_table(
new_items = itabitem
set_initial_elements = abap_false ).
Guide me
Regards
Dhinakaran J
HI Dhina,
So now whts the problem?
First Drop down working fine means, Did you got the selected POID at the Event handler for the first Dropdown?
If you got POID means based on that you can also got the Itemid?
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dhina,
Do you have supply function for the Second dropdown?
The probelm is If you wrote the code in doinit method means its not supply the value to the second dropdown. Because Doinit method executed only one time.
So If you're wrote the code in Doinit menas change into Your supply function for second drop down.
Thanks.
Hai
forget about supply function
i have written in the first dropdown click method.OK
when we click first dropdown,sure it goes every time to first dropdown method.
My Q is?
how to show the corresponding values in the second dropdwon?
is the following syntax corerct in the first dropdown method?
node_itemnode1->bind_table(
new_items = itabitem
set_initial_elements = abap_false ).
or
Shall i bind the elements like
node_itemnode1->bind_elements( stru_item ).
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.