02-23-2008 11:00 AM
Hi ,
I am using two ALVs on single screen for display using 'REUSE_ALV_BLOCK_LIST_APPEND' and 'REUSE_ALV_BLOCK_LIST_DISPLAY'.
Now I want my report as an autorefresh.Please tell me how to do that.
Though I am able to use autorefresh using 'REUSE_ALV_GRID_DISPLAY' but I want it for two ALVs.
Thank You,
Regards,
Vijendra
02-23-2008 11:08 AM
03-28-2008 10:07 PM
Hi,
I don't know the answer to your question, sorry
Actually I'm interested by your method to autorefresh an ALV list using the function REUSE_ALV_GRID_DISPLAY (and not REUSE_ALV_LIST_DISPLAY). Could you precise how you do it please?
Thank you in advance
03-28-2008 11:43 PM
Hi Vijendra,
it is amazingly easy but I don't have the code here - weekend, sorry.
You can start a timer with method cl_gui_timer=>start. Then you need a local class as an event handler for event finish (or what it is called). This event will restart the time and call cl_gui_cfw=>set_new_okcode.
Sorry some names may be misspelled, its not more than a dozen code lines. Search here for autorefresh or wait until monday - I could post it from my office.
Regards,
Clemens
05-08-2008 8:42 AM
HI
Im also looking for auto refresh functionality in ALV. Could some one send me a sample code?
05-08-2008 9:01 AM
Hi Vijendra,
Refer to the link below:
http://erpgenie.com/abaptips/content/view/346/61/
Hope this helps.
Reward if helpful.
Regards,
Sipra
05-08-2008 9:11 AM
Hi,
Go through the following links for auto refresh of ALV reports
Create automatic refresh report.
http://www.sapdevelopment.co.uk/reporting/rep_autorefresh.htm
http://abapprogramming.blogspot.com/search/label/ABAP%20ALV%20IN%20BRIEF
Reward,if useful.
Thanks,
Chandu
05-08-2008 9:21 AM
Hi together,
there is always a simple solution for such complex things:
CONSTANTS:
gc_cmd_refresh TYPE sy-ucomm VALUE 'REFRESH'.
*======================================================================*
*= local event handling
*======================================================================*
*---------------------------------------------------------------------*
* CLASS lcl_event_handler DEFINITION
*---------------------------------------------------------------------*
CLASS lcl_event_handler DEFINITION.
PUBLIC SECTION.
CLASS-METHODS: on_finished FOR EVENT finished OF cl_gui_timer.
ENDCLASS. "lcl_event_handler DEFINITION
*---------------------------------------------------------------------*
* CLASS lcl_event_handler IMPLEMENTATION
*---------------------------------------------------------------------*
CLASS lcl_event_handler IMPLEMENTATION.
METHOD on_finished.
* Start Timer again
gr_gui_timer->interval = pa_autow.
CALL METHOD gr_gui_timer->run.
* cause PAI
CALL METHOD cl_gui_cfw=>set_new_ok_code
EXPORTING
new_code = gc_cmd_refresh.
ENDMETHOD. "on_finished
ENDCLASS. "lcl_event_handler IMPLEMENTATION
START-OF-SELECTION.
PERFORM init_autorefresh.
* create and display ALV, have REFRESH defined in GUI-Status
*&---------------------------------------------------------------------*
*& Form init_autorefresh
*&---------------------------------------------------------------------*
* Timer start or stop
*&---------------------------------------------------------------------*
FORM init_autorefresh .
IF pa_autow IS NOT INITIAL.
CREATE OBJECT gr_gui_timer.
SET HANDLER gr_event_handler->on_finished FOR gr_gui_timer.
gr_gui_timer->interval = pa_autow.
CALL METHOD gr_gui_timer->run.
ELSEIF gr_gui_timer IS BOUND.
gr_gui_timer->cancel( ).
ENDIF.
ENDFORM. " init_autorefresh
The principle is explained in my previous posting.
Regards,
Clemens
12-09-2010 8:57 AM
Hi
A question regarding to such functionality. Is it possible to use it for displaying a popup when user goes for example to another transaction, or will the instance of the cl_gui_timer be removed from the memory?
02-27-2011 7:16 AM
Hi Clemens
I need to form auto refresh of a report running with the function "REUSE_ALV_GRID_DISPLAY" .
Can you advise me on this?
Thank you, koby
03-03-2011 10:16 PM
Hi Kobi,
post a question. Explain what you did, what you tried, where you faced a problem.
Regards,
Clemens
02-22-2011 9:10 AM
Hello,
I menage to make auto refresh using "REUSE_ALV_LIST_DISPLAY" , but not for "REUSE_ALV_GRID_DISPLAY".
Can anyone help me on this?
Thanks,
koby
03-04-2011 1:36 AM
You can refer to the BALVBT01 sample and read the [Auto Refresh ALV List |http://www.sap-basis-abap.com/abap/auto-refresh-alv-list.htm] . The RS_SELFIELD-REFRESH is important, you have to set 'X' into it.