cancel
Showing results for 
Search instead for 
Did you mean: 

Set Key for DropdownbyKey dynamically

Former Member
0 Kudos

Hello,

I want to set the selectedKey Property of the DropDownByKey UI Element dynamically in wdDoModifyView() method, what code can be used for the same?

Any help would be highly Appreciated.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Rohit,

CL_FITV_WD_UTIL can be used to access UI Elements and set their properties. In wddomodifyview I think you can use template below for setting selectedKey property:

    CL_FITV_WD_UTIL=>ui_set_property(

     EXPORTING
      iv_property_name =     'selectedKey'
      iv_value         =     " Value for property that you want to set it to
      iv_id            =     " ID of view-element

      io_view      = view "view is alwasys a parameter to wddomodifyview so leave as view
    RECEIVING
*      rv_successful    =     " Supplement for True Boolean Type: 'X' == True '' == False
  ).

I have not used the ui_set_property method but know that for example ui_set_visible works like this:

cl_fitv_wd_util=>ui_set_visible( io_view = view iv_id = 'xyz'' iv_visible = abap_false ).

BR Jan

Former Member
0 Kudos

Hi Rohit.

Did you get it to work? Since my post I have succesfully used the ui_set_property method so it does work as expected.

BR Jan

Answers (1)

Answers (1)

m_aravindan
Active Participant
0 Kudos

Hi Rohit ,

               Could you please elaborate your question more specific, pls describe your scenario ?

Regards

Aravindan