cancel
Showing results for 
Search instead for 
Did you mean: 

Value on ON_SELECT for DropDownList

former_member300754
Participant
0 Kudos

Hi all,

I set onSelect event to update another Dropdownlist. But how which one is selected. Then, i would fetch the data from transparent table by using the selected value.

Thanks in advance,

Peerasit

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Read your context node using code wizard,you will get structure with value use that value to write a select query to get the set of values for other drop down.

Also check this blog

Answers (1)

Answers (1)

uday_gubbala2
Active Contributor
0 Kudos

Hi Peerasit,

First use the get_lead_selection_index( ) method to get the index of the value that you had selected in the dropdown. So you can then read the table with which you are filling the dropdown using this index value. Next use the value read in your select clause to get the relevant data. Find a sample code snippet as shown below. Hope that this helps.

Regards,

Uday

data : lead_selection_index type i,
           lv_node type ref to if_wd_context_node,
           lt_sflight type standard table of sflight.

  lv_node = wd_context->get_child_node( name = 'NODE1' ).

  lead_selection_index = lv_node->get_lead_selection_index( ).

  READ TABLE lt_application INTO wa_application INDEX lead_selection_index.

  select * from SFLIGHT into table lt_sflight where carrid = wa_application-carrid.