12-19-2006 3:56 PM
hi experts,
I am have a selection screen which generates a basic list and i need to let this list available for the user for 3 mins.
if the time expires i need to go back to the selection screen.
how could i program this. i guess there might be any func module.but i dont know the name.
pls help.
12-19-2006 4:07 PM
Please implement the following program, you can see that it uses the class CL_GUI_TIMER to automatically leave the list after 10 seconds, you can adjust the timeout to whatever you want.
report zrich_0002.
*---------------------------------------------------------------------*
* CLASS lcl_event_handler DEFINITION
*---------------------------------------------------------------------*
class lcl_event_handler definition.
public section.
class-methods: on_finished for event finished of lcl_gui_timer.
endclass.
*---------------------------------------------------------------------*
* CLASS lcl_event_handler IMPLEMENTATION
*---------------------------------------------------------------------*
class lcl_event_handler implementation.
method on_finished.
leave list-processing.
endmethod.
endclass.
data: gui_timer type ref to cl_gui_timer.
data: event_handler type ref to lcl_event_handler.
data: timeout type i value '10'. "<-- In Seconds
parameters : p_check type c.
start-of-selection.
create object gui_timer.
set handler event_handler->on_finished for gui_timer.
gui_timer->interval = timeout.
call method gui_timer->run.
perform write_list.
*----------------------------------------------------
* FORM write_list
*----------------------------------------------------
form write_list.
do 10 times.
write:/ sy-index.
enddo.
endform.
Regards,
Rich Heilman
12-20-2006 4:37 PM
hi riich,
your solution almost solved my problem, but I need one more help.
I need to exit list only if the user is idle for some time
how can i read that the user is idle and how to do this.
thanks.
12-20-2006 5:55 PM