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

Time while executing a select

Former Member
0 Likes
913

Hello Experts,

this part is working well

write : / sy-uzeit.

wait up to X seconds

write : / sy-uzeit.

but for next example is another behaviour

i have simpler an report, but the time for start is the same as for the end

write : / sy-uzeit.

SELECT *

FROM table ....

CALL FUNCTION 'XXX

ENDSELECT.

write : / sy-uzeit.

Thanks for advice

Martin

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
855

Hi ,

since select stament takes milisecond in execution and sy-uzeit format is hh:mm:ss , thats why both the time are same.

if u use the statement

get tim stamp into var1

write var1.

select * ...

get time stamp into var2

write var2 .

now u will get different time .

6 REPLIES 6
Read only

Former Member
0 Likes
855

Hi,

Are you saying that the first SY-UZEIT is same as the second SY-UZEIT.

Thanks,

Harini

Read only

0 Likes
855

yes, first and second sy-uzeit are the same in the second example ( sy-uzeit select and end select sy-uzeit)

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
855

Hello Martin,

I think you can make use of the ABAP stmt:

GET RUN TIME FIELD

Do an F1 on this & SAP documentation has a very good example how to use this.

Also there is a class CL_ABAP_RUNTIME & method GET_RUNTIME which you can utilise.

BR,

Suhas

Read only

0 Likes
855

Hi,

If both the SY-UZEIT are same it means that your select statement did not take any time to process.

Thanks,

Harini

Read only

Former Member
0 Likes
856

Hi ,

since select stament takes milisecond in execution and sy-uzeit format is hh:mm:ss , thats why both the time are same.

if u use the statement

get tim stamp into var1

write var1.

select * ...

get time stamp into var2

write var2 .

now u will get different time .

Read only

0 Likes
855

FYI - select statement took OVER seconds.

but statement get time field is working well

thanks