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 not working over RFC

Former Member
0 Kudos

Hi,

I´m calling a function about rfc. Directly, at the beginning of the function, I´m saving the time of sy-uzeit in a lcoal field. After the processing of the function, I´m subtracting that saved tiome from the actual sy-uzeit and write that into an integer, to get the processing time.

when I debug the function, it is working well.

but when I call it over RFC from an external server application, it is always showing 0 or 1 second. And sometimes, it takes more tahn 2 minutes, until the function processing is finished. So 0 to 1 second is surely not right.

anybody an idea, what I can do to get the real processing time? Is there another field I could use, instead of sy-uzeit?

Thank you!

Reward points guaranteed

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Arne,

Y dont you swith on the runtime analysis of the program.

The path is menu bar -> System-> utilities->runtime analysis

hope this would solve your problem

thanks and regards

Satya

4 REPLIES 4

Former Member
0 Kudos

Hi Arne,

Y dont you swith on the runtime analysis of the program.

The path is menu bar -> System-> utilities->runtime analysis

hope this would solve your problem

thanks and regards

Satya

0 Kudos

Hi,

thank you for the answer.

The problem is, I only need to know the runtime for each function call. this is going to be logged in one table, where you can see the different types of function calls, when the function has been called and how long the porcessing was.

Because the function is going to be called from outside SAP about rfc, it is not possible to check the runtime over the runtime analysis.

Any tips?

0 Kudos

Hi..

To calculate the Runtime use the Statement GET Runtime Field <T1>.

Eg:

Data : v_start type t.

Data : v_endt type t.

Data : v_diff type t.

GET RUNTIME FIELD V_START.

CALL FUNCTION '<RFC>' DESTINATION '<DEST>'

GET RUNTIME FIELD V_END.

V_DIFF = V_END - V_START.

Write:/ 'Time taken = ', v_diff.

REWARD IF HELPFUL.

0 Kudos

Hi,

thank you for the example. Is it also working, when I use the get runtime field V_start at the beginning of the function and the get runtime field v_end in the end?

Because, I´m not calling the function over RFC from another system. I´m calling the function via RFC from a C++ application, outside of SAP. So I need to get the time from the beinning of the function call to the end of the function call.

Arne