cancel
Showing results for 
Search instead for 
Did you mean: 

How to keep Function Module (called by ODATA service) initialized to improve performance?

Roy_Derks
Discoverer
0 Kudos

Dear all,
We have build multiple ODATA services (in gateway system) calling the same Function Module (in R/3) with different import parameters. We have noticed in the performance traces and testing of the FM, the initialization time of the Function Module takes around 40 seconds by default which is time added to the time of execution of the FM. The FM takes execution 2 seconds. Each time the ODATA service is called, the FM needs to be initialized again. Can this be avoided by keeping the FM initialized somehow?

Example;
First run of test function module (transaction SE37): 42 seconds to run on one material. Now I keep the test function module open and execute (second run) for a different material the same function module, it takes 2 seconds to gather the data. This function module is called by ODATA service and requires initialization of the FM each time, meaning the lead time is 42 seconds.

a) How to keep the Function Module (API - which is called by ODATA service) initialized at calling the ODATA service to improve performance?

b) Is there a ODATA URL parameter available to keep the FM function module initialized to avoid the initialization time of the Function Module?

Thank you in advance!

Kind regards,

Roy Derks

nabheetscn
Active Contributor
0 Kudos

What exactly does this function does during the initialization? May be those details can already be stored some where for example in shared memory as mentioned by Gregor or some table

Nabheet

Accepted Solutions (1)

Accepted Solutions (1)

gregorw
Active Contributor

OData is stateless by default. So the server forgets completely about the client request after it fulfilled it. You might adjust the function module and use i.e. shared memory to increase its performance.

Answers (0)