cancel
Showing results for 
Search instead for 
Did you mean: 

DropDownClick event in table

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hai

My Q is?

after clicking the first dropdown, corresponding records will not fall in the second dropdown.always it shows 0 in the second dropdown

how to proceed?

thats all

Dhina

Former Member
0 Kudos

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.

Former Member
0 Kudos

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 ).

Former Member
0 Kudos

Hi Dhina,

You can use Bind table method.

Check the Internal Table consist of data or not and also check your second drop down binding.

Thanks.

Former Member
0 Kudos

Hai

i got the Result

i set bindelements concept instead of bindtable.its working now

In my table i have 5 rows.

When i execute the form i am seing only one row in editable mode.

how to set the 5 rows to be editable node in the table

Guide me

Dhina

Former Member
0 Kudos

HI,

If you want editable colomn in table means you can use set the colomn as Input field.

Thanks.