cancel
Showing results for 
Search instead for 
Did you mean: 

Autorefresh a window/view (without user action)

Former Member
0 Kudos

Hi,

I will have a window with several views that will must be refreshed each X seconds, automatically.

At the moment, for testing this functionality, I have only a component with view where there is a uiel text_view that shows sy-uzeit, and a button for refresh the view (this button has the event GO_TO_REFRESH, that fires an outbound plug, linked to an inbound plug of the same view, it's working ok).

Now, I want fire the view method ONACTIONGO_TO_REFRESH, without user action, each X seconds.

I've tryed this code on WDDOMODIFYVIEW of the view:

WAIT UP TO 5 SECONDS.

me->onactiongo_to_refresh( l_event ).

But when executing, it occurs an runtime error because navigation is not allowed here.

Some idea??

Must be the window who refresh all its components??

Must be the component controller? Adding an event may be??

Thanks in advance,

Alejandra

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Thanks a lot everybody

I've used the uiel timed_trigger and it works perfect

vivekananthan_sellavel
Active Participant
0 Kudos

hi ;

Else

you create Node Name Timer.

Attribute name Time.

set attribute proberty defalt value as N(5 ) sec .

Bind that attribute to Delay property of UI .

So if once One cycle is complete then Dely Become 0.

Event will not trigger Again.

  • get element via lead selection
DATA lo_nd_timer TYPE REF TO if_wd_context_node. DATA lo_el_timer TYPE REF TO if_wd_context_element. DATA ls_timer TYPE wd_this->element_timer. DATA lv_time LIKE ls_timer-time. lo_nd_timer = wd_context->get_child_node( name = wd_this->wdctx_timer ). lo_el_timer = lo_nd_timer->get_element( ). lv_time = 0. CALL METHOD lo_nd_timer->set_attribute EXPORTING value = lv_time name = `TIME` .

Regards

Vivekananthan.S

vivekananthan_sellavel
Active Participant
0 Kudos

hi ;

use timedtigger.

And set the Time . But the problem is for ever X sec Event will trigger.

Server perfomace will affect.

Regards

Vivekananthan.S

abhimanyu_lagishetti7
Active Contributor
0 Kudos

use Timed Trigger UI element for auto refresh.

Abhi