2013 Jun 21 3:03 PM
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
2013 Jun 21 3:36 PM
You could call function with addition AS SEPARATE UNIT.
This would be a shortcut to get around global memory issue.
2013 Jun 21 5:06 PM
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.