cancel
Showing results for 
Search instead for 
Did you mean: 

drop down value problem when i change tabs

Former Member
0 Kudos

Hi Experts,

I have the following scenario.

1. Two tabs are present in my screen in the same view.

2. In each tab i have a dropdown button for currency. I am using search for this dropdown buttons.

3. In the first tab, if i select a currency from dropdown say, ALL.

4. Then i select tab two, i am not doing any process here. But here i have a drop down box the value of which is INR.

5. Now i again select tab one.

Herecomes my problem.

The dropdown field for currency should have the first value as ADP (This is default value). But it is showing as INR. when i click the drowdown i call see the value ALL has changed to INR.

Note: There is one more INR below.

I need two solutions.

1. How to display ADP in tab1.

2. How to stop ALL changing to INR.

In my select if it is tab2 i just do the following code.

  • navigate from <CONTEXT> to <N_CURRENCY> via lead selection

lo_nd_n_currency = wd_context->get_child_node( name = wd_this->wdctx_n_currency ).

  • get element via lead selection

lo_el_n_currency = lo_nd_n_currency->get_element( ).

  • set currency attribute

lo_el_n_currency->set_attribute(

name = `A_WAERS`

value = wa_inbox-zbill_zcurn ).

If it is tab1 is do the following code.

  • navigate from <CONTEXT> to <N_CURRENCY> via lead selection

lo_nd_n_currency = wd_context->get_child_node( name = wd_this->wdctx_n_currency ).

  • get element via lead selection

lo_el_n_currency = lo_nd_n_currency->get_element( ).

  • default to first index of currency drop down

lo_nd_n_currency->set_lead_selection_index( index = 1 ).

Please help me.

Thanks in advance.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

What i understood is, you are using same view in both the tabs, just setting different data for the dropdown.

Lead selection will select always the one set in that field, thats why, when u select INR in tab2 and come back to tab1 it select the lead selected that is INR, you need to set it by hardcoding default value 'ADS'


If it is tab1 is do the following code.

* navigate from <CONTEXT> to <N_CURRENCY> via lead selection
lo_nd_n_currency = wd_context->get_child_node( name = wd_this->wdctx_n_currency ).
* get element via lead selection
lo_el_n_currency = lo_nd_n_currency->get_element( ).

* set currency attribute
lo_el_n_currency->set_attribute(
name = `A_WAERS`
value = 'ADS' ).  "Default currency

Hope this helps!

Thanks,

Tejaswini

Former Member
0 Kudos

Hi,

I think you are using the same node for the 2 dropdowns and also the ACTION handlers for both the dropdowns are same.

As the node is same for both, setting an attribute to this node will effect the both the dropdowns.

One more thing, on tab change event you need to set the value of dropdown dynamically.

Regards,

Lekha.

Edited by: Lekha on Aug 27, 2009 3:36 PM