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`
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 ).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
10 | |
10 | |
9 | |
7 | |
4 | |
4 | |
3 | |
3 | |
2 | |
2 |