Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Setting Text Object to Read Only mode, then back to Editable

Former Member
0 Kudos

Hi,

I have a custom transaction where if User A tries to access a record that is locked by User B, it goes into the transaction in read only mode. I therefore set my text control to read only using method 'set_readonly_mode' .


      CALL METHOD go_pcctextedit->set_readonly_mode.

If the record then is unlocked by User B. User A backs out of the main screen to the selection screen and selects the same record again I make the text controls editable by making the call:


      CALL METHOD go_pcctextedit->set_readonly_mode
        EXPORTING
          readonly_mode = cl_gui_textedit=>false.

However the text object on the screen is still in read only mode.

Does anyone know what could be causing this problem?

Many Thanks

David

1 ACCEPTED SOLUTION

ennowulff
Active Contributor
0 Kudos

set cl_gui_cfw=>flush( ). afterwards.

5 REPLIES 5

ennowulff
Active Contributor
0 Kudos

set cl_gui_cfw=>flush( ). afterwards.

Former Member
0 Kudos

Thanks Enno. Unfortunately I have already tried that and it doesn't work.

ennowulff
Active Contributor
0 Kudos

Hi David,

please free and destroy all controls before!

Former Member
0 Kudos

Thanks Enno, thay's solved the problem.

Edited by: David Bibby on Apr 29, 2009 11:35 AM

ennowulff
Active Contributor
0 Kudos

Each class normally does have a method "FREE" named "Destroy"

Normally it should be enough to clear the object reference.

if it's still not working, try to copy your report and eliminate all stuff that has nothing to do with this problem. if you do not find the error then, pls post this coding.