cancel
Showing results for 
Search instead for 
Did you mean: 

Getting Dropdown in select option

Former Member
0 Kudos


Hello experts,

I have created a dropdown using the if_wd_select_options and now i have to read the value which has been selected by the user. Please can you assist me, in how it can be done.

Any help is much appreciated.

Best Regards,

Ashish

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos
Former Member
0 Kudos

Gents,

Thanks a lot for the pointers.

I was able to solve this issue. This reply is coming quite late from me, and i have decided to write a blog on it detailing the nitty gritty things to be kept in mind to implement a drop down using select options in web dynpro.

I will later update the post with the blog link as well.

Ashish

ramakrishnappa
Active Contributor
0 Kudos

Hi Ashish,

I think, your requirement is to read the selected value from the selection field/ parameter field. Once the value is selected, it can be read by using below methods

GET_SELECTION_FIELD

GET_PARAMETER_FIELD

You will get the data in parameter E_VALUE of the above methods.

Hope this helps you.

Regards,

Rama

former_member183069
Active Participant
0 Kudos

Hi Ashis,


In the method were you need to read the selected value put the following code and modify according your variable declaration.


you can get the selected value.




data lo_cmp_usage type ref to if_wd_component_usage.


  lo_cmp_usage =   wd_this->wd_cpuse_select_options( ).

  if lo_cmp_usage->has_active_component( ) is initial.

    lo_cmp_usage->create_component( ).

  endif.



  DATA lo_INTERFACECONTROLLER TYPE REF TO IWCI_WDR_SELECT_OPTIONS .

  lo_INTERFACECONTROLLER =   wd_this->wd_cpifc_select_options( ).


    DATA lv_r_helper_class TYPE ref to if_wd_select_options.

    lv_r_helper_class = lo_interfacecontroller->init_selection_screen(

    ).



  CALL METHOD  lv_r_helper_class->GET_RANGE_TABLE_OF_SEL_FIELD

    EXPORTING

      I_ID           = 'EBELN'

    RECEIVING

      RT_RANGE_TABLE = RANGE

      .



  ASSIGN RANGE->* TO <EBELN>.



Regards,

KK