Application Development 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: 

TIME Computing

Former Member
0 Kudos
62

Hello All!

Do you know a FM like START_TIME_DETERMINE which

computes the startime

<b>outgoing not from sy-uzeit</b> but outgoing any time

<b>specified by user.</b>

regards

ilhan

1 ACCEPTED SOLUTION

former_member189059
Active Contributor
0 Kudos
38

Hello Ilhan,

I haven't understood you properly, but see if this helps

REPORT zeureka. 

CLASS lcl_handler DEFINITION.
PUBLIC SECTION.
METHODS: when_done FOR EVENT finished OF cl_gui_timer.
ENDCLASS. "lcl_event_handler DEFINITION


CLASS lcl_handler IMPLEMENTATION.
METHOD when_done.
cl_gui_cfw=>set_new_ok_code( new_code = 'ONLI' ). "ONLI = Execute
ENDMETHOD. "explode
ENDCLASS. "lcl_event_handler IMPLEMENTATION



TABLES: spfli, sscrfields.
PARAMETERS: pa_carr TYPE s_carrid DEFAULT 'AA'.
DATA: timer TYPE REF TO cl_gui_timer.
DATA: href TYPE REF TO lcl_handler.


AT SELECTION-SCREEN OUTPUT.
*Create the timer as well as the handler
CREATE OBJECT: timer, href.
*Register event handler
SET HANDLER href->when_done FOR timer.
*Set value according to your requirement
timer->interval = 10.
*Start timer
timer->run( ).

START-OF-SELECTION.
*Stop Timer once list processing begins
timer->cancel( ).

SELECT * FROM spfli WHERE carrid = pa_carr.

WRITE:/ spfli-connid, spfli-cityfrom.

ENDSELECT.

U can change the time interval there in the code...

I got this from : /people/dushyant.shetty/blog/2007/06/06/abap-programming-technique-if-you-dont-run-this-report-in-10-seconds-itll-run-itself

Check out that blog..

1 REPLY 1

former_member189059
Active Contributor
0 Kudos
39

Hello Ilhan,

I haven't understood you properly, but see if this helps

REPORT zeureka. 

CLASS lcl_handler DEFINITION.
PUBLIC SECTION.
METHODS: when_done FOR EVENT finished OF cl_gui_timer.
ENDCLASS. "lcl_event_handler DEFINITION


CLASS lcl_handler IMPLEMENTATION.
METHOD when_done.
cl_gui_cfw=>set_new_ok_code( new_code = 'ONLI' ). "ONLI = Execute
ENDMETHOD. "explode
ENDCLASS. "lcl_event_handler IMPLEMENTATION



TABLES: spfli, sscrfields.
PARAMETERS: pa_carr TYPE s_carrid DEFAULT 'AA'.
DATA: timer TYPE REF TO cl_gui_timer.
DATA: href TYPE REF TO lcl_handler.


AT SELECTION-SCREEN OUTPUT.
*Create the timer as well as the handler
CREATE OBJECT: timer, href.
*Register event handler
SET HANDLER href->when_done FOR timer.
*Set value according to your requirement
timer->interval = 10.
*Start timer
timer->run( ).

START-OF-SELECTION.
*Stop Timer once list processing begins
timer->cancel( ).

SELECT * FROM spfli WHERE carrid = pa_carr.

WRITE:/ spfli-connid, spfli-cityfrom.

ENDSELECT.

U can change the time interval there in the code...

I got this from : /people/dushyant.shetty/blog/2007/06/06/abap-programming-technique-if-you-dont-run-this-report-in-10-seconds-itll-run-itself

Check out that blog..