<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Report Refresh in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/report-refresh/m-p/2929995#M690404</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dont know if this is any help but an example automatic refresh report can be found here: &lt;A href="http://www.sapdevelopment.co.uk/reporting/rep_autorefresh.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/reporting/rep_autorefresh.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*******************************************&lt;/P&gt;&lt;P&gt;*******************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can also use CL_GUI_TIMER:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CREATE OBJECT refresh_timer&lt;/P&gt;&lt;P&gt;EXCEPTIONS OTHERS = 1.&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;SET HANDLER event_handler-&amp;gt;handle_autorefresh FOR refresh_timer.&lt;/P&gt;&lt;P&gt;refresh_timer-&amp;gt;interval = refr_interval.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then the front end will wait up to refr_interval seconds.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*************************************************&lt;/P&gt;&lt;P&gt;*******************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In release 620 there is Frontend Timer control that you can use. The proxy class for this control is CL_GUI_TIMER. Because the timer runs on the frontend no system resources are used up waiting for the timer to fire. Your report just has to register this timer and respond to the raised event. If you aren't on 620, but you are running the 620 SAPGui, you can back-port this useful proxy class. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to create a class that inherits from the superclass CL_GUI_CONTROL and has a forward declaration for SFES. You need to declare one public constant called EVENTID_FINISHED of type I with an initial value of 1. You need to delare one Public Instance attribute of type I with an initial value of 0. You have to declare one public instance event named FINISHED with no parameters. You will create three Public Methods:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Constructor&lt;/P&gt;&lt;P&gt;Interface&lt;/P&gt;&lt;P&gt;@78\QImporting@ LIFETIME TYPE I OPTIONAL Lifetime&lt;/P&gt;&lt;P&gt;@78\QImporting@ VALUE( SHELLSTYLE ) TYPE I OPTIONAL Shell Style&lt;/P&gt;&lt;P&gt;@78\QImporting@ VALUE( PARENT ) TYPE REF TO CL_GUI_CONTAINER OPTIONAL Parent Container&lt;/P&gt;&lt;P&gt;@03\QException@ ERROR error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;method constructor.&lt;/P&gt;&lt;P&gt;data clsid(80).&lt;/P&gt;&lt;P&gt;data event_tab type cntl_simple_events.&lt;/P&gt;&lt;P&gt;data event_tab_line type cntl_simple_event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if clsid is initial.&lt;/P&gt;&lt;P&gt;data: return,&lt;/P&gt;&lt;P&gt;guitype type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;guitype = 0.&lt;/P&gt;&lt;P&gt;call function 'GUI_HAS_OBJECTS'&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;object_model = sfes_obj_activex&lt;/P&gt;&lt;P&gt;importing&lt;/P&gt;&lt;P&gt;return = return&lt;/P&gt;&lt;P&gt;exceptions&lt;/P&gt;&lt;P&gt;others = 1.&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;raise error.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if return = 'X'.&lt;/P&gt;&lt;P&gt;guitype = 1.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;if guitype = 0.&lt;/P&gt;&lt;P&gt;call function 'GUI_HAS_OBJECTS'&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;object_model = sfes_obj_javabeans&lt;/P&gt;&lt;P&gt;importing&lt;/P&gt;&lt;P&gt;return = return&lt;/P&gt;&lt;P&gt;exceptions&lt;/P&gt;&lt;P&gt;others = 1.&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;raise error.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if return = 'X'.&lt;/P&gt;&lt;P&gt;guitype = 2.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;case guitype.&lt;/P&gt;&lt;P&gt;when 1.&lt;/P&gt;&lt;P&gt;clsid = 'Sapgui.InfoCtrl.1'.&lt;/P&gt;&lt;P&gt;when 2.&lt;/P&gt;&lt;P&gt;clsid = 'com.sap.components.controls.sapImage.SapImage'.&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call method super-&amp;gt;constructor&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;clsid = clsid&lt;/P&gt;&lt;P&gt;shellstyle = 0&lt;/P&gt;&lt;P&gt;parent = cl_gui_container=&amp;gt;default_screen&lt;/P&gt;&lt;P&gt;autoalign = space&lt;/P&gt;&lt;P&gt;exceptions others = 1.&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;raise error.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call method cl_gui_cfw=&amp;gt;subscribe&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;shellid = h_control-shellid&lt;/P&gt;&lt;P&gt;ref = me&lt;/P&gt;&lt;P&gt;exceptions others = 1.&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;raise error.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Register the events&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;event_tab_line-eventid = zcl_es_gui_timer=&amp;gt;eventid_finished.&lt;/P&gt;&lt;P&gt;append event_tab_line to event_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call method set_registered_events&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;events = event_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endmethod.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cancel&lt;/P&gt;&lt;P&gt;Interface&lt;/P&gt;&lt;P&gt;@03\QException@ ERROR Error During Method Call&lt;/P&gt;&lt;P&gt;method cancel.&lt;/P&gt;&lt;P&gt;call method call_method&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;method = 'SetTimer'&lt;/P&gt;&lt;P&gt;p_count = 1&lt;/P&gt;&lt;P&gt;p1 = -1&lt;/P&gt;&lt;P&gt;queue_only = 'X'&lt;/P&gt;&lt;P&gt;exceptions others = 1.&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;raise error.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endmethod.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Run&lt;/P&gt;&lt;P&gt;Interface&lt;/P&gt;&lt;P&gt;@03\QException@ ERROR Error&lt;/P&gt;&lt;P&gt;method run.&lt;/P&gt;&lt;P&gt;call method call_method&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;method = 'SetTimer'&lt;/P&gt;&lt;P&gt;p_count = 1&lt;/P&gt;&lt;P&gt;p1 = interval&lt;/P&gt;&lt;P&gt;queue_only = 'X'&lt;/P&gt;&lt;P&gt;exceptions others = 1.&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;raise error.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endmethod.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You also need on Redefinition of method Dispatch.&lt;/P&gt;&lt;P&gt;Interface&lt;/P&gt;&lt;P&gt;@78\QImporting@ VALUE( CARGO ) TYPE SYUCOMM Cargo&lt;/P&gt;&lt;P&gt;@78\QImporting@ VALUE( EVENTID ) TYPE I Event ID&lt;/P&gt;&lt;P&gt;@78\QImporting@ VALUE( IS_SHELLEVENT ) TYPE CHAR1 Shell Event&lt;/P&gt;&lt;P&gt;@78\QImporting@ VALUE( IS_SYSTEMDISPATCH ) TYPE CHAR1 OPTIONAL System event&lt;/P&gt;&lt;P&gt;@03\QException@ CNTL_ERROR Control No Longer Valid&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;method dispatch.&lt;/P&gt;&lt;P&gt;case eventid.&lt;/P&gt;&lt;P&gt;when eventid_finished.&lt;/P&gt;&lt;P&gt;raise event finished.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endmethod. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*******************************************&lt;/P&gt;&lt;P&gt;************************************************&lt;/P&gt;&lt;P&gt;WAIT UP TO n SECONDS....will tie up a work process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a function module like this. No parameters&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FUNCTION Z_ENQUE_SLEEP.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'ENQUE_SLEEP'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;SECONDS = 1.&lt;/P&gt;&lt;P&gt;ENDFUNCTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Next implement the following report program.&lt;/P&gt;&lt;P&gt;This is a sample....it should give you an idea of &lt;/P&gt;&lt;P&gt;what you have to do in your program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZRICH_0010&lt;/P&gt;&lt;P&gt;no standard page heading.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'Z_ENQUE_SLEEP'&lt;/P&gt;&lt;P&gt;STARTING NEW TASK 'WAIT'&lt;/P&gt;&lt;P&gt;PERFORMING WHEN_FINISHED ON END OF TASK.&lt;/P&gt;&lt;P&gt;Write:/ sy-datum, sy-uzeit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;END-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT USER-COMMAND.&lt;/P&gt;&lt;P&gt;SY-LSIND = SY-LSIND - 1.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'Z_ENQUE_SLEEP'&lt;/P&gt;&lt;P&gt;STARTING NEW TASK 'INFO'&lt;/P&gt;&lt;P&gt;PERFORMING WHEN_FINISHED ON END OF TASK.&lt;/P&gt;&lt;P&gt;Write:/ sy-datum, sy-uzeit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**********************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;WHEN_FINISHED&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;**********************************************************&lt;/P&gt;&lt;P&gt;FORM WHEN_FINISHED USING TASKNAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Trigger an event to run the at user-command&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;RECEIVE RESULTS FROM FUNCTION 'Z_ENQUE_SLEEP'.&lt;/P&gt;&lt;P&gt;SET USER-COMMAND 'BUMM'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;*******************************************&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="43" type="ul"&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Oct 2007 15:20:03 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-11T15:20:03Z</dc:date>
    <item>
      <title>Report Refresh</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/report-refresh/m-p/2929994#M690403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;Is it possible to refresh a report automatically for every one minute.If yes &lt;/P&gt;&lt;P&gt;tell me how to do it manually through coding ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Oct 2007 15:18:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/report-refresh/m-p/2929994#M690403</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-11T15:18:21Z</dc:date>
    </item>
    <item>
      <title>Re: Report Refresh</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/report-refresh/m-p/2929995#M690404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dont know if this is any help but an example automatic refresh report can be found here: &lt;A href="http://www.sapdevelopment.co.uk/reporting/rep_autorefresh.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/reporting/rep_autorefresh.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*******************************************&lt;/P&gt;&lt;P&gt;*******************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can also use CL_GUI_TIMER:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CREATE OBJECT refresh_timer&lt;/P&gt;&lt;P&gt;EXCEPTIONS OTHERS = 1.&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;SET HANDLER event_handler-&amp;gt;handle_autorefresh FOR refresh_timer.&lt;/P&gt;&lt;P&gt;refresh_timer-&amp;gt;interval = refr_interval.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then the front end will wait up to refr_interval seconds.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*************************************************&lt;/P&gt;&lt;P&gt;*******************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In release 620 there is Frontend Timer control that you can use. The proxy class for this control is CL_GUI_TIMER. Because the timer runs on the frontend no system resources are used up waiting for the timer to fire. Your report just has to register this timer and respond to the raised event. If you aren't on 620, but you are running the 620 SAPGui, you can back-port this useful proxy class. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to create a class that inherits from the superclass CL_GUI_CONTROL and has a forward declaration for SFES. You need to declare one public constant called EVENTID_FINISHED of type I with an initial value of 1. You need to delare one Public Instance attribute of type I with an initial value of 0. You have to declare one public instance event named FINISHED with no parameters. You will create three Public Methods:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Constructor&lt;/P&gt;&lt;P&gt;Interface&lt;/P&gt;&lt;P&gt;@78\QImporting@ LIFETIME TYPE I OPTIONAL Lifetime&lt;/P&gt;&lt;P&gt;@78\QImporting@ VALUE( SHELLSTYLE ) TYPE I OPTIONAL Shell Style&lt;/P&gt;&lt;P&gt;@78\QImporting@ VALUE( PARENT ) TYPE REF TO CL_GUI_CONTAINER OPTIONAL Parent Container&lt;/P&gt;&lt;P&gt;@03\QException@ ERROR error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;method constructor.&lt;/P&gt;&lt;P&gt;data clsid(80).&lt;/P&gt;&lt;P&gt;data event_tab type cntl_simple_events.&lt;/P&gt;&lt;P&gt;data event_tab_line type cntl_simple_event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if clsid is initial.&lt;/P&gt;&lt;P&gt;data: return,&lt;/P&gt;&lt;P&gt;guitype type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;guitype = 0.&lt;/P&gt;&lt;P&gt;call function 'GUI_HAS_OBJECTS'&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;object_model = sfes_obj_activex&lt;/P&gt;&lt;P&gt;importing&lt;/P&gt;&lt;P&gt;return = return&lt;/P&gt;&lt;P&gt;exceptions&lt;/P&gt;&lt;P&gt;others = 1.&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;raise error.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if return = 'X'.&lt;/P&gt;&lt;P&gt;guitype = 1.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;if guitype = 0.&lt;/P&gt;&lt;P&gt;call function 'GUI_HAS_OBJECTS'&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;object_model = sfes_obj_javabeans&lt;/P&gt;&lt;P&gt;importing&lt;/P&gt;&lt;P&gt;return = return&lt;/P&gt;&lt;P&gt;exceptions&lt;/P&gt;&lt;P&gt;others = 1.&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;raise error.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if return = 'X'.&lt;/P&gt;&lt;P&gt;guitype = 2.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;case guitype.&lt;/P&gt;&lt;P&gt;when 1.&lt;/P&gt;&lt;P&gt;clsid = 'Sapgui.InfoCtrl.1'.&lt;/P&gt;&lt;P&gt;when 2.&lt;/P&gt;&lt;P&gt;clsid = 'com.sap.components.controls.sapImage.SapImage'.&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call method super-&amp;gt;constructor&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;clsid = clsid&lt;/P&gt;&lt;P&gt;shellstyle = 0&lt;/P&gt;&lt;P&gt;parent = cl_gui_container=&amp;gt;default_screen&lt;/P&gt;&lt;P&gt;autoalign = space&lt;/P&gt;&lt;P&gt;exceptions others = 1.&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;raise error.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call method cl_gui_cfw=&amp;gt;subscribe&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;shellid = h_control-shellid&lt;/P&gt;&lt;P&gt;ref = me&lt;/P&gt;&lt;P&gt;exceptions others = 1.&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;raise error.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Register the events&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;event_tab_line-eventid = zcl_es_gui_timer=&amp;gt;eventid_finished.&lt;/P&gt;&lt;P&gt;append event_tab_line to event_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call method set_registered_events&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;events = event_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endmethod.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cancel&lt;/P&gt;&lt;P&gt;Interface&lt;/P&gt;&lt;P&gt;@03\QException@ ERROR Error During Method Call&lt;/P&gt;&lt;P&gt;method cancel.&lt;/P&gt;&lt;P&gt;call method call_method&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;method = 'SetTimer'&lt;/P&gt;&lt;P&gt;p_count = 1&lt;/P&gt;&lt;P&gt;p1 = -1&lt;/P&gt;&lt;P&gt;queue_only = 'X'&lt;/P&gt;&lt;P&gt;exceptions others = 1.&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;raise error.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endmethod.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Run&lt;/P&gt;&lt;P&gt;Interface&lt;/P&gt;&lt;P&gt;@03\QException@ ERROR Error&lt;/P&gt;&lt;P&gt;method run.&lt;/P&gt;&lt;P&gt;call method call_method&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;method = 'SetTimer'&lt;/P&gt;&lt;P&gt;p_count = 1&lt;/P&gt;&lt;P&gt;p1 = interval&lt;/P&gt;&lt;P&gt;queue_only = 'X'&lt;/P&gt;&lt;P&gt;exceptions others = 1.&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;raise error.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endmethod.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You also need on Redefinition of method Dispatch.&lt;/P&gt;&lt;P&gt;Interface&lt;/P&gt;&lt;P&gt;@78\QImporting@ VALUE( CARGO ) TYPE SYUCOMM Cargo&lt;/P&gt;&lt;P&gt;@78\QImporting@ VALUE( EVENTID ) TYPE I Event ID&lt;/P&gt;&lt;P&gt;@78\QImporting@ VALUE( IS_SHELLEVENT ) TYPE CHAR1 Shell Event&lt;/P&gt;&lt;P&gt;@78\QImporting@ VALUE( IS_SYSTEMDISPATCH ) TYPE CHAR1 OPTIONAL System event&lt;/P&gt;&lt;P&gt;@03\QException@ CNTL_ERROR Control No Longer Valid&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;method dispatch.&lt;/P&gt;&lt;P&gt;case eventid.&lt;/P&gt;&lt;P&gt;when eventid_finished.&lt;/P&gt;&lt;P&gt;raise event finished.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endmethod. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*******************************************&lt;/P&gt;&lt;P&gt;************************************************&lt;/P&gt;&lt;P&gt;WAIT UP TO n SECONDS....will tie up a work process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a function module like this. No parameters&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FUNCTION Z_ENQUE_SLEEP.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'ENQUE_SLEEP'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;SECONDS = 1.&lt;/P&gt;&lt;P&gt;ENDFUNCTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Next implement the following report program.&lt;/P&gt;&lt;P&gt;This is a sample....it should give you an idea of &lt;/P&gt;&lt;P&gt;what you have to do in your program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZRICH_0010&lt;/P&gt;&lt;P&gt;no standard page heading.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'Z_ENQUE_SLEEP'&lt;/P&gt;&lt;P&gt;STARTING NEW TASK 'WAIT'&lt;/P&gt;&lt;P&gt;PERFORMING WHEN_FINISHED ON END OF TASK.&lt;/P&gt;&lt;P&gt;Write:/ sy-datum, sy-uzeit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;END-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT USER-COMMAND.&lt;/P&gt;&lt;P&gt;SY-LSIND = SY-LSIND - 1.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'Z_ENQUE_SLEEP'&lt;/P&gt;&lt;P&gt;STARTING NEW TASK 'INFO'&lt;/P&gt;&lt;P&gt;PERFORMING WHEN_FINISHED ON END OF TASK.&lt;/P&gt;&lt;P&gt;Write:/ sy-datum, sy-uzeit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**********************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;WHEN_FINISHED&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;**********************************************************&lt;/P&gt;&lt;P&gt;FORM WHEN_FINISHED USING TASKNAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Trigger an event to run the at user-command&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;RECEIVE RESULTS FROM FUNCTION 'Z_ENQUE_SLEEP'.&lt;/P&gt;&lt;P&gt;SET USER-COMMAND 'BUMM'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;*******************************************&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="43" type="ul"&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Oct 2007 15:20:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/report-refresh/m-p/2929995#M690404</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-11T15:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: Report Refresh</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/report-refresh/m-p/2929996#M690405</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Padmasri,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check out below thread...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_community" href="https://community.sap.com/" __jive_macro_name="community" modifiedtitle="true" __default_attr="2015"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it will help you a lot..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;ilesh 24x7&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Oct 2007 15:50:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/report-refresh/m-p/2929996#M690405</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-11T15:50:54Z</dc:date>
    </item>
    <item>
      <title>Re: Report Refresh</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/report-refresh/m-p/2929997#M690406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vasu,&lt;/P&gt;&lt;P&gt;I have tried the link you have given,it is giving error while executing the sample program.&lt;/P&gt;&lt;P&gt;The error is:the main program of the function "Z_ENQUE_SLEEP" does not begin with "FUNCTIONAL-POOL".If possible help me in this regard.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Oct 2007 15:56:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/report-refresh/m-p/2929997#M690406</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-11T15:56:14Z</dc:date>
    </item>
  </channel>
</rss>

