cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Dynamic change of Fields

Former Member
0 Kudos

Hi Frnds,

I have a requirement were based on the value of one field is yes then the other field is set to display mode and vice versa.

Both the read only property of the fields is binded to a atribute Display only which is used to make it in display mode when the whole application is to be run on display mde.

Also when i was trying to change the read only binding of the field to the other attribute then it is not letting me change the binding and giving me a error of "error occured ". Can anybody tel me what is the efficient way to do this.

Thanks

Rohit

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi ,

You can change the element at run time base on some condition.

First hide elements by writing code on method WDDOMODIFYVIEW

data : lr_button type ref to cl_wd_button,

data lo_textview type ref to cl_wd_text_view.

lo_textview ?= view->get_element( id = 'ID of your element' ).

call method lo_textview->set_visible

exporting

value = '01'.

You can display element by changing display property on the base of some condition like this

data lo_textview type ref to cl_wd_text_view.

lo_textview ?= view->get_element( id = 'ID of your element' ).

call method lo_textview->set_visible

exporting

value = '02'.

I hope it will help you.

Regards

Kulvendra Kumar

Former Member
0 Kudos

Hi Rohit,

First delete the binding by clicking delete binding on the pop up. then bind the UI element with other attribute.

Former Member
0 Kudos

I tried doing that but after deleting then when i try assiging the new atribut it is showing me "error when binding the context". When i delete the binding and then when i agin go inside it i see that it is still binded to the same atribute.

Thanks

Rohit