Application Development and Automation 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: 
Read only

Auto Refresh the Graph Report

Former Member
0 Likes
1,382

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

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

5 REPLIES 5
Read only

Former Member
0 Likes
1,096

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

Read only

0 Likes
1,096

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

Read only

0 Likes
1,096

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

Read only

0 Likes
1,096

Hi Alexandre,


Its not working bro...

can you have anymore idea?




Best Regards,

Ajay

Read only

0 Likes
1,096

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.