cancel
Showing results for 
Search instead for 
Did you mean: 

INPUT EDITABLE DYNAMICALLY

0 Kudos

hi frnds,

ton in the

I am facing one prb in wda can you please solve it.

I have one input field in that properties , i have changed the enable checkbox as disable, i working disable now but ,

i have another button in view ,

My requirement is :::: When i click the button the input field should be change to enable .

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

1. In the context put an attribute of type boolean.

2. Bind your input field's read only attribute to this attribute

3. In wdDoInit initialize the context attribute to true

4. In the button event handler change the context attribute to false.

5. Now you must decide when you want this field to change to true once again.

regards

yuval peery

0 Kudos

thanks

0 Kudos

1. Create a context attribute of type wdy_boolean with the name say "Field_enable"

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

3. initialize this variable to abap_true in the wddoinit of the controller or view with the following code

DATA lo_el_context TYPE REF TO if_wd_context_element.

DATA ls_context TYPE wd_this->element_context.

DATA lv_field_enable TYPE wd_this->element_context-field_enable.

  • get element via lead selection

lo_el_context = wd_context->get_element( ).

  • fill attribute

lv_field_enable = abap_true.

  • set single attribute

lo_el_context->set_attribute(

name = `FIELD_ENABLE`

value = lv_field_enable ).

4. select the action on which you need to disable the fields and write the following code

  • get element via lead selection

lo_el_context = wd_context->get_element( ).

  • fill attribute

lv_field_enable = abap_false.

  • set single attribute

lo_el_context->set_attribute(

name = `FIELD_ENABLE`

value = lv_field_enable ).

5. If you want to make it invisible or visible use the above method with the view element property visible instead of "enabled"

Answers (0)