Skip to Content
author's profile photo Former Member
Former Member

How to get execution time of a script?

I have a program to report the result of MRP. It need to process 8000 materials. I used loop to process them one by one. Now, I want to know the processing leadtime for each material. I placed following code

loop at out_put.

write: <b>sy-timlo</b>, out_put-matnr, /.

endloop.

But, unfortunately the timestamp in output is all same though the program ran for 10 minuties.

So, anyone can told me how can I get the actual execution time for each material. Thanks.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Dec 05, 2007 at 01:21 AM

    You need to use the GET TIME syntax.

    Like:

    DATA: L_ST_TIME TYPE T,
          L_ED_TIME TYPE T.
    
    
    DO 10 TIMES.
      GET TIME FIELD L_ST_TIME       .  " << start time
      WRITE: / L_ST_TIME.
      WAIT UP TO 1 SECONDS.
      GET TIME FIELD L_ED_TIME       .  " << end time
      WRITE: L_ED_TIME.
    ENDDO.

    Regards,

    Naimesh Patel

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 05, 2007 at 01:33 AM

    Thanks a lot!

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.