on 05-30-2012 2:21 PM
Hi All,
I've got a view with a button triggering action onactiondothis. Button-text is bound to context element ct_text and property enabled is bound to ct_enabled.
onactiondothis calls a method "longmethod()" which takes time.
My aim is to change the button text to "being processed..." and button-property- enabled = abap_false before method longmethod() is called and reset text and property-enabled after longmethod() is finished.
So I implemented following onactiondothis (pseudocode):
method onactiondothis.
- set_attribute ct_text = 'being processed'. "Part1
- set_attribute ct_enabled = abap_false. "Part1
- call method longmethod() "Part2
- set_attribute ct_text = 'Do This'. "Part3
- set_attribute ct_enabled = abap_true. "Part3
endmethod onactiondothis.
But this does not work!
The attributes in Part1 are beeing set, but I can't see any change on my view unstill on actiondothis is not finished. (I think the view is not beeing refreshed till onactiondothis is finished)
Does anybody have a solution for this?
(I tried another approach too. Displaying a "Please wait" popup till onactiondothis does not work either. Realizing with *->open() before Part2 and *->close() after Part2. )
Thanks for your answers!
Hi Ismail,
You can use Timer.
- Change text and activate timer.
- In timer call your long method.
- When your long timed method finished change text and enable button.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.