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

executing program depending on time

Former Member
0 Likes
373

is it possible to run the report after being the list is generated with out user interaction

2 REPLIES 2
Read only

Former Member
0 Likes
343

after being the list is generated

what is the List...?

Can you let me know...

Read only

Former Member
0 Likes
343

Hi Ramesh,

You can execute the report. by using the CL_GUI_TIMER Class.

I am sending you the Timer Program just copy and paste this program and do the necessary changes where you need to execute.

&*******************<removed_by_moderator>********************&


*&---------------------------------------------------------------------*
*& Report  ZCC_OOPS_TIMER_
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*

report  zcc_oops_timer no standard page heading.

data : wa(72) type c.


*----------------------------------------------------------------------*
*       CLASS my DEFINITION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
class my definition.

  public section.

    methods : run_handler for event finished of cl_gui_timer.

endclass. "my DEFINITION

data timer type ref to cl_gui_timer.
data myh type ref to my.

data: usr_time type sy-uzeit.
data: time type sy-uzeit.

*----------------------------------------------------------------------*
*       CLASS my IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
class my implementation.
  method run_handler.
    call method timer->run.
    perform mylist.
  endmethod. "run_handler

endclass. "my IMPLEMENTATION

*----------------------------------------------------------------------*
*    Initialization.
*----------------------------------------------------------------------*

initialization.

  create object timer.
  create object myh.
  set handler myh->run_handler for all instances.


*----------------------------------------------------------------------*
*    Start of selection
*----------------------------------------------------------------------*

start-of-selection.
  usr_time = sy-uzeit.
  time  = '000000'.

  write time.

  timer->interval = '1'.

  call method timer->run.

  if time+3(2) = 01.
    leave program.
  endif.

*----------------------------------------------------------------------*
*    Form MyList
*----------------------------------------------------------------------*
form mylist.

  time = sy-uzeit - usr_time.

  write time to wa.
  modify line 1 line value from wa.
  if wa+3(2) = '01'.
    leave program.
  endif.
endform. "MYLIST

Edited by: Julius Bussche on Jun 24, 2008 7:03 PM