cancel
Showing results for 
Search instead for 
Did you mean: 

Disabling Select options in webdynpro based on condition

Former Member
0 Kudos

Hi Experts,

Requirement : Based on the values entered in the first select-option fields the second select options fields should be either Enabled or Disabled.

Thanks in advance

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member184958
Active Participant
0 Kudos

Hi Rk,

if ....Pass your conditions.

CALL METHOD WD_THIS->M_HANDLER->GET_RANGE_TABLE_OF_SEL_FIELD"From your 1st so

    EXPORTING

      I_ID           = 'EBDAT'

    RECEIVING

      RT_RANGE_TABLE = lt_data.

CALL METHOD WD_THIS->M_HANDLER->upd_SELECTION_FIELD

   EXPORTING

     I_ID                         ='EBDAT'

     IT_RESULT             = lt_data

     I_READ_ONLY        = abap_false   "editable

   or

I_READ_ONLY    = abap_true   "non-editable

endif.

Hope this will solve your problem,

Warm Regards,

John.

Former Member
0 Kudos

Hi RK,

You can check this thread, follow as suggested by Thomas.

https://scn.sap.com/message/8036831

Another way is using upd_selection_field method.

SelectOption Add_selection_field method has a property read_only. You can use this to enable or disable.

    lv_r_helper_class->ADD_SELECTION_FIELD(

        i_id              = 'AUDAT'
        I_DESCRIPTION     = 'SO Date'
*        i_value_help_type = if_wd_value_help_handler=>co_prefix_ovs
        i_read_only       = abap_true
        I_SUGGEST_VALUES  = abap_true
        it_result         = lr_field ).

And again after using get_range_table_of_sel_field, you have to use upd_selection_field with readonly parameter to abap_false.

Cheers,

Krish.