cancel
Showing results for 
Search instead for 
Did you mean: 

edit text

ravi_kumar221
Participant
0 Kudos

edit text   should be gray end when chnge radio buton it should be editable  help

Accepted Solutions (0)

Answers (5)

Answers (5)

former_member184578
Active Contributor
0 Kudos

Hi,

You could check this wiki: Dynamically enable/disable UI elements in WDA

And as mentioned above, you cannot(shouldn't) use CL_GUI* classes/functions in Web Dynpro ABAP.

Regards,

Kiran

venkat_ratnam3
Explorer
0 Kudos

Hello ,

you can bind the change button to an attribute of type Boolean and property in ( "invert attribute " check box  not condition  ) if required .

read the the value which is should be default( change or display ) .

if  lv_change = abap_true .

set attribute ( abap_false ) .

elseif lv_change = abap_false .

set attribute = abap_true .

endif .

with this we can achieve switching of display and change mode .

Thanks ,

Venkat Ratnam Naidu

Former Member
0 Kudos

Hello

There is one read only property in the textedit, bind that property with some attribute and on the change of radio button set and reset that attribute.

** You can create a method related to radio button, One event "on_select", there you can write code for  setting and resetting attribute.

ramakrishnappa
Active Contributor
0 Kudos

Hi Ravi,

You can achieve the same as below

Steps:

  1. Create an attribute READ_ONLY in the context node
  2. Bind the read only property of TEXT EDIT ui element to the context attribute READ_ONLY
  3. On event radio button action, check if radio button key is CHANGE, then set READ_ONLY attribute value to ABAP_FALSE else set to ABAP_TRUE

          ie.

                if radio_button_key eq 'CHANGE'.

                   

                         LV_READ_VALUE = ABAP_FALSE.

               else.

                         LV_READ_VALUE = ABAP_TRUE.

               endif.

Hope this helps you.

Regards,

Rama

venkat_aileni
Contributor
0 Kudos

Hi-

I hope you are using cl_gui_textedit to display text editor.

Use below sample code:

DATA text1 TYPE REF TO cl_gui_textedit.

Here write a condition like if p_rd1 = 'X'

CALL METHOD text1->set_readonly_mode

   EXPORTING

     readonly_mode          = 1

   EXCEPTIONS

     error_cntl_call_method = 1

     invalid_parameter      = 2

     others                 = 3

         .

-Venkat