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

how to maintain a timer

Former Member
0 Likes
508

Hi,

in my program i am executing a set of select statements and i need to calculate the time taken to execute those. how to maintain a timer for this ? what statements to use ?

thanks

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
480

This was Rob's replies in a similiar post:

You can do this:code

data: start TYPE i,

end TYPE i,

dif TYPE i.

GET RUN TIME FIELD start.

SELECT SINGLE bukrs belnr gjahr blart budat

FROM bkpf

INTO (cc, doc, fy, doc_ty, pst_dt)

WHERE bukrs = p_bukrs

AND belnr = p_belnr

AND gjahr = p_gjahr.

GET RUN TIME FIELD end.

dif = end - start.

WRITE: /001 'Time for select',

067 ':', dif, 'microseconds'.

[/code]Rob

2 REPLIES 2
Read only

Former Member
0 Likes
481

This was Rob's replies in a similiar post:

You can do this:code

data: start TYPE i,

end TYPE i,

dif TYPE i.

GET RUN TIME FIELD start.

SELECT SINGLE bukrs belnr gjahr blart budat

FROM bkpf

INTO (cc, doc, fy, doc_ty, pst_dt)

WHERE bukrs = p_bukrs

AND belnr = p_belnr

AND gjahr = p_gjahr.

GET RUN TIME FIELD end.

dif = end - start.

WRITE: /001 'Time for select',

067 ':', dif, 'microseconds'.

[/code]Rob

Read only

0 Likes
480

I don't have the original post in front of me, but I probably also said that you should do this a number of times and take the lowest time for comparison.

Rob