‎2009 Oct 01 12:04 PM
Hi Friends,
I'm creating a cutom program where i was using a BAPI ,which exist in other server.
Now i want to record the response time of the BAPI , after placing the request in it and display the Time for the
corresponding record in output.
Is there any procedure to record the response time in the program / I'm not asking the transactions where we can
measure the performances.
Moderator message - please do not ask for or promise rewards.
Thanks & Warm Regards
Krishna
Edited by: Rob Burbank on Oct 1, 2009 8:50 AM
‎2009 Oct 01 12:10 PM
hi,
use ABAP command GET RUN TIME, see example:
GET RUN TIME FIELD t1.
call function .....
GET RUN TIME FIELD t2.
xresponseTime = t2 - t1.
regards, darek
‎2009 Oct 12 8:10 AM
Hi Murali,
Use ABAP Command GET RUN Time as what Dariusz Sobczak said to know the response time.
But If u r BAPI is not waiting for further operations, use BAPI_TRANSACTION_COMMIT after ur BAPI FM and enable the wait parameter eq 'X'.
So that BAPI will wait untill the operation is going to be complete.
Thanks & Regards,
Pydi Reddy.
‎2009 Oct 12 8:18 AM
what should it be good for to display the runtime ???
I does not help, if a poor operation needs 3min and after waiting 3 min it is displayed that it was 3min.
I have never seen GET RUNTIME in productive use.
‎2009 Oct 14 2:10 PM
Hello,
The correct method, as pointed out in previous posts, is with GET RUN TIME. Note that this returns time in microseconds, so you may want to scale this up to a larger unit.
As to the usefulness: it is perfectly legitimate to include time measurements in your program as long as this has a clear purpose, e.g. comparing response times between different remote systems, identifying erratic response times, etc. In that case I would advise you to also include some other measurement, e.g. the amount of data processed (whether you can do this and how depends on the BAPI, e.g. you could use the number of lines in the returned internal tables as a metric). If your time measurement creates separate log/trace records, then it would also be a good idea to have the option to enable and disable the time measurement.
Regards,
Mark