cancel
Showing results for 
Search instead for 
Did you mean: 

Hi....Experts

Former Member
0 Kudos

Hi,

I have a drop down list.....i binded data to dropdown... i want to know about how to get the selected data item from drop down list.

Regards,

Siva.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

If u r having Node - dropdown & Attribute - text then write the Following Code in the onSelect Event of the Dropdown.

DATA lo_nd_dropdown TYPE REF TO if_wd_context_node.
  DATA lo_el_dropdown TYPE REF TO if_wd_context_element.
  DATA ls_dropdown TYPE wd_this->element_dropdown.

* navigate from <CONTEXT> to <COSTCENTER> via lead selection
  lo_nd_dropdown = wd_context->get_child_node( name = wd_this->wdctx_dropdown ).

* get element via lead selection
  lo_el_dropdown = lo_nd_dropdown->get_element(  ).

* get all declared attributes
  lo_el_dropdown->get_static_attributes(
    IMPORTING
      static_attributes = ls_dropdown).

The ls_dropdown-text contains the Value which u selected from the dropdown.

Regards,

Padmam.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Siva,

Did you used dropdown by key or index?

Have a look on standard application WDR_TEST_EVENTS.

If you are using drop down by index means,

1. Create one attribute and bind it to your Drop down Ex: CARRID.

2. After user selecting any values from the list the means the selected value will stored in the same attribute CARRID.

3. So read the attribute using code wizard and then do your codings.

Thanks.