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

Function Module call exponentially slowing down

Former Member
0 Likes
819

I’m going through our EarlyWatch list to reduce runtime of the poor performing programs. The one I’m addressing now runs within 2 minutes without a function module call, but nearly 2 hours with it. It has 1,200 calls to the function and starts by performing 10 per second. By the time it gets to 500 it’s doing 1 call every 3 seconds. It’s a Z function module that is quite intricate and I don't want to change it.

I’d like to know if there is a way to clear all memory used by the function module (and it's global data) with a single command - outside the function module - before and after calling it? This way I can be sure it has a “fresh” start every call. I believe it is a memory issue, because if I run the program for e.g. 500 entries and I run the last processed entry in SE37 it runs immediate without the 3 second slow down/delay.

Best regards,

Adrian

2 REPLIES 2
Read only

Former Member
0 Likes
639

You could call function with addition AS SEPARATE UNIT.

This would be a shortcut to get around global memory issue.

Read only

Pawan_Kesari
Active Contributor
0 Likes
639

Function module global data is often used to buffer values and make subsequent calls faster. I am not sure clearing global data, if possible, is the right approach.

My opinion, I don't think there is any easy way,  you will have to go through the code of both calling program and function module to see why its taking time.

Regards,

Pawan.