Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9052

Re: How to enable/disable based on condition for a standard field??

$
0
0

Hi,

 

Create a  context attribute "VISIBILITY" of type WDY_BOOLEAN.

 

  Bind this attribute to input field's property "ENABLED" in the view.

 

  Initialise this variable in WDDOINIT of controller using below code :

 

Data: lo_context type ref to if_wd_context_element,

           lv_enable  type wd_this->element_context-field_enable.

 

  lo_context = wd_context->get_element( ).

  lv_enable  = abap_true.

  lo_context->set_attribute(name = 'FIELD_ENABLE'   value = lv_enable).

 

Now select the action of which the field should be disabled and write same code just change the value of LV_ENABLE = abap_false.

 

 

Thanks

Deepak


Viewing all articles
Browse latest Browse all 9052

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>