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

Response time of a function module

Former Member
0 Likes
1,229

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

4 REPLIES 4
Read only

Former Member
0 Likes
844

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

Read only

Former Member
0 Likes
844

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.

Read only

Former Member
0 Likes
844

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.

Read only

Former Member
0 Likes
844

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