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: 

" sy-uzeit" field to calculate time taken to run a report program !!

Former Member
0 Kudos

Hi .

I am picking some values from text file , performing some functionalities and then and then generating a text file again , containing time taken to perfom these functionalities .

I am trying to acheive it through sy-uzeit field.

code for same :

data : lv_start type sy-uzeit, lv_end type sy-uzeit, lv_diff type sy-uzeit .

clear : lv_start , lv_end , lv_diff .

lv_start = sy-uzeit .

**********

**********

performing some funtionalities

**********

**********

lv_end = sy-uzeit .

lv_diff =lv_end - lv_start .

write lv_diff .

now its taking approx 2 min. to perform these functionalities still lv_diff is coming as zero !

what might be wrong ? do i need to do something else also to calculate this time difference in program execution .

rgrds

Piyush

3 REPLIES 3

Former Member
0 Kudos

sy-uzeit will not get uldated unless you use GET TIME.

Regards

Shital

Former Member
0 Kudos

Check if this works for you.


data : lv_start type sy-uzeit, lv_end type sy-uzeit, lv_diff type sy-uzeit .
clear : lv_start , lv_end , lv_diff .

*lv_start = sy-uzeit 
GET RUN TIME FIELD lv_start .
**********
**********
performing some funtionalities
**********
**********
*lv_end = sy-uzeit .
GET RUN TIME FIELD lv_end.

lv_diff =lv_end - lv_start .

write lv_diff .

0 Kudos

This message was moderated.