2014 Aug 08 10:15 AM
Hi All,
I have develop a graph in ABAP Report using the FM GFW_PRES_SHOW_MULT .
I want to refresh this graph automatecally after every 15 minute.
Can anybody tell proper way to make it happen.
Thanks & Regards,
Ajay
2014 Aug 08 2:27 PM
Hello Ajay.
Did you already try to use a timer with "CL_GUI_TIMER" class?
Some time ago I found a example about it and created a report to test it:
*&---------------------------------------------------------------------*
*& Report ZLC_REPORT_GUI_TIMER
*&---------------------------------------------------------------------*
REPORT zlc_report_gui_timer.
*---------------------------------------------------------------------*
*CLASS lcl_event_handler DEFINITION
*---------------------------------------------------------------------*
CLASS lcl_event_handler DEFINITION.
PUBLIC SECTION.
CLASS-METHODS:
on_finished FOR EVENT finished
OF cl_gui_timer
IMPORTING sender.
ENDCLASS. "lcl_event_handler DEFINITION
*---------------------------------------------------------------------*
*CLASS lcl_event_handler IMPLEMENTATION
*---------------------------------------------------------------------*
CLASS lcl_event_handler IMPLEMENTATION.
METHOD on_finished.
STATICS: lv_refreshed TYPE i.
ADD 1 TO lv_refreshed.
WRITE: 'Refresh number:', lv_refreshed.
***Start timer again
sender->run( ).
ENDMETHOD. "on_finished
ENDCLASS. "lcl_event_handler
***implementation
DATA: cl_gui_timer TYPE REF TO cl_gui_timer.
PARAMETERS: p_refrs TYPE i DEFAULT 1.
START-OF-SELECTION.
CREATE OBJECT cl_gui_timer.
SET HANDLER lcl_event_handler=>on_finished FOR cl_gui_timer.
***Setting the refreshment interval.
cl_gui_timer->interval = p_refrs.
cl_gui_timer->run( ).
***The session must remain active!
WRITE 'Wait for a while...'.
Best regards from Brazil.
Alexandre B. Dambrowski
2014 Aug 13 12:22 PM
Hi Alexandre,
I tried this "CL_GUI_TIMER" class. but its not working. it only refreshing screen not the whole program.
can you give me the another solution.
Thanks & Regards,
Ajay
2014 Aug 13 12:36 PM
Hi Ajay!
Using my previous example, are you updating data values insite "METHOD on_finished"?
After this, you have to call again FM 'GFW_PRES_SHOW_MULT' and start a new timer ("sender->run( ).").
I didn't try it, but believe that works.
Good luck!
Best regards.
Alexandre B. Dambrowski
2014 Aug 14 10:58 AM
Hi Alexandre,
Its not working bro...
can you have anymore idea?
Best Regards,
Ajay
2014 Aug 14 11:19 AM
Keep the whole logic ( execution logic ) inside a subroutine.
PERFORM the subroutine in the handler class everytime the timer finish event gets triggered.
Thus, in every 15min, your whole program execution logic will be re-run, updating all the data objects and refreshing the graph screen.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |