Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos

This document will walk you through :

The concept of Enabling/Disabling a web dynpro UI-Element using the UI-element property "Enabled".

*********************************************************************************************************************************************************************

Assumption :

    1. You have created a web dynpro application .

    2. You have created the UI elements "Field1" in the view , which you have to enable/disable .

  

Procedure :

   Step 1 : Create a Attribute in the context of the view with type "WDY_BOOLEAN" lets say i have created "field1_enabled".

   Step 2 : Bind the property "Enabled" of the Field1 with "field1_enabled" (context attribute created in step 1 ).

   Step 3 : Now based on your requirement , place the below code in the appropriate method for enabling the Field1 .

             

                 DATA lv_field1_enable TYPE wd_this->element_context-field1_enabled.

                

                 lv_field1_enable = abap_true.            " Enable field1

                 lo_el_context->set_attribute(

                 name = `field1_enabled`

                 value = lv_field1_enable ).

Step 3 :  Same way place the below code in the appropriate method for disabling the field1

                DATA lv_field1_enable TYPE wd_this->element_context-field1_enabled.

                lv_field_enable1 = abap_false.          " Disable  field1

                lo_el_context->set_attribute(

                name = `field1_enabled`

                value = lv_field1_enable ).

               

2 Comments
Labels in this area