07-20-2007 5:20 PM
Hi All,
I want to create a timed out error as I need it for testing some code.
I am using "Wait" statement to make it wait more than the set run time, but its not working.
Can some one give me a code snippet to create timed out error.
Thanks and Regards
Ankit.
07-20-2007 5:38 PM
hi,
take a two variables of type sy-uzeit.
at the beginning of the program..
v_starttime = sy-uzeit.
loop at itab.
v_difference = sy-uzieit - v_starttime.
if v_difference > 100.
raise execption TIMED_OUT.
endif.
endloop..
THANKS
Mahesh
07-20-2007 5:38 PM
hi,
take a two variables of type sy-uzeit.
at the beginning of the program..
v_starttime = sy-uzeit.
loop at itab.
v_difference = sy-uzieit - v_starttime.
if v_difference > 100.
raise execption TIMED_OUT.
endif.
endloop..
THANKS
Mahesh
07-20-2007 5:40 PM
If you want a program to keep running until the max runtime parameter is reached you could try;
WHILE 1 = 1.
ENDWHILE.
07-20-2007 6:49 PM
check below..
DATA: sec TYPE i,
temp TYPE t.
sec = 0.
start-of-selection.
temp = sy-uzeit.
WAIT UP TO 10 SECONDS.
WHILE sec LT 11.
sec = sy-uzeit - temp.
IF sec GE 10.
MESSAGE 'Time out' TYPE 'E'.
ENDIF.
ENDWHILE.
It gives time out for 11 secs..
If useful .. reward points...
Regards
Prax
07-23-2007 8:31 AM