08-24-2016 6:28 AM
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#?
08-24-2016 7:03 AM
If you are allowed to, you can set the profile parameter rdisp/max_wprun_time to a higher value in TA RZ11.
08-24-2016 7:03 AM
If you are allowed to, you can set the profile parameter rdisp/max_wprun_time to a higher value in TA RZ11.
08-24-2016 7:25 AM
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?
08-24-2016 7:33 AM
08-24-2016 7:52 AM
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.
08-24-2016 7:58 AM
Thank you for your answer. I'll keep these two solutions as my last resort