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: 

Modify SAP timeout for query in SQ01 using C#

Former Member
0 Kudos

I am connecting to an SAP query in SQ01 from a C# console application however due to the large amount of data which needs to be fetched, I am getting a timeout exception. Is there a way to modify the time period before the timeout occurs using C#?

An alternative would be to execute the query in the background. Is there a way to do this using C#?

1 ACCEPTED SOLUTION

horst_keller
Product and Topic Expert
Product and Topic Expert
0 Kudos

If you are allowed to, you  can set the profile parameter rdisp/max_wprun_time  to a higher value in TA RZ11.

5 REPLIES 5

horst_keller
Product and Topic Expert
Product and Topic Expert
0 Kudos

If you are allowed to, you  can set the profile parameter rdisp/max_wprun_time  to a higher value in TA RZ11.

0 Kudos

I believe that this will change the timeout period for all SAP processes though. Is there a way to apply this timeout period for one particular query?

horst_keller
Product and Topic Expert
Product and Topic Expert
0 Kudos

No, not that I know of.

0 Kudos

Urg... it's NOT a clean and safe way but it works: add in your query the call to function 'TH_REDISPATCH'.

The function reset the timeout counter.

This FM should be used at your own risk and only if you are sure the report/query is correct otherwise you risk to keep alive forever a report/query.

Maybe you can call it every 2 minutes (saving the timestamp and checking it).

Another not too nice solution could be scheduling the query and save the result on server file (it can be done easily with specific customer function) and then your C# application read the last file generated.


It's just an option but I do not know your whole scenario.

0 Kudos

Thank you for your answer. I'll keep these two solutions as my last resort