Skip to Content
avatar image
Former Member

Getting Dropdown in select option


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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Jan 08, 2014 at 09:45 AM

    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


    Add comment
    10|10000 characters needed characters exceeded

  • Jan 08, 2014 at 09:51 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 08, 2014 at 12:25 PM
    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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