HOW I DO IT: Avoid SAP GUI disconnection on Wifi network (WSAECONNRESET)
I have been facing this issue with my wifi network connection where for every 2 idle minutes the SAP GUI gets disconnected. It means while i am using SAP i should not switch to any of the application like check a mail or read a doc. And if i use the wired connection there is no issue.
This has been painful experience to work on wifi and keep losing your code.
I tried to apply the system parameters / tweak firewall etc, but some how i didn’t get them right. But what i came to know is that the “ping” which happens back to SAP GUI from app server keeps the connection alive.
So to resolve this, i wanted to write a program which keeps the GUI busy while i am working on other applications on my Windows. And this gave me a great result and my GUI is always live just like as it used to be with the “wired” connection. Its a great relief if i recall how many times i had lost my work due to those disconnections.
I have written the program to GUI_Download a small file and GUI_Upload the same file in an infinite loop. That’s it. It works like charm!
Since you are executing this program in infinite loop you would have only 5 sessions to work with out of the default 6. And i didnt face any performance issues as such. And the defaultmax workprocess limit of 10 minutes is also Unchanged in my system.
The program looks like below :
REPORT zsmash_keep_gui.
DATA: t_file TYPE STANDARD TABLE OF localfile.
APPEND ‘test’ TO t_file.
DATA: w_string_file TYPE string.
w_string_file = ‘D:\123.txt’.
DO.
CALL FUNCTION ‘GUI_DOWNLOAD’
EXPORTING
filename = w_string_file
TABLES
data_tab = t_file
EXCEPTIONS
OTHERS = 22.
IF sy–subrc <> 0.
ENDIF.
CALL FUNCTION ‘GUI_UPLOAD’
EXPORTING
filename = w_string_file
TABLES
data_tab = t_file
EXCEPTIONS
OTHERS = 17.
IF sy–subrc <> 0.
ENDIF.
ENDDO.
Hi,
I am having the same problem right now, I will try your program and I really really hope it works. It's really awfull to have this problem.
Fabián
@Fabian, Its really painful ! Let me know if you could resolve your problem.!
@Kesari It actually works. I add the WAIT UP TO 100 SECONDS and now I dont have that problem.
Thats Cool.!!
It looks like delay of 100 seconds (wait up to seconds statement) can be added between subsequent loop passes as your connection times out after 2 mins of idle time.
@Manish, 2 mins delay is just a random one and it all depends on my SAP system and Router's mercy ! by the way.. my aim is to keep GUI busy all the time! 🙂
Hi Kesari,
My problem is a bit different.
I'm using WiFi internet connection on my computer. Whenever there is an interruption in the connection and the WiFi gets disconnected, the dispatcher will be stopped. I'll have to wait for WiFi to be reconnected and then start the server.
This is very painful. Please help me if you have any solution.
And, just wanted to know.. is it possible to start the server without internet connection?
Thank you,
Prakash
Did you check Wifi security risks ? the source might compromise privacy settings.
Have you thought about troubleshooting your WiFi network connection to see if something is blocking the keepalive packets, perhaps with NIPING?
Another possibility is that your WiFi router, or the settings on your local machine, have an idle timeout that is set faster than the rdisp/keepalive profile setting on the SAP server. If that's the case, then your WiFi connection may be dropping the socket to your SAPGUI. If you make sure any network idle timers are set longer than rdisp/keepalive, and that nothing is blocking the keepalive (ping) packets, then you shouldn't have these disconnects.
By default, the system will wait for 20 minutes of inactivity (the value of rdisp/keepalive), after which it will send a 'ping' to the GUI. It will then wait, by default, for 1 minute to get a 'pong' back from the GUI (the value of rdisp/keepalive_timeout). As long as it gets that 'pong' within 1 minute of sending the 'ping', the connection should stay up.
So, maybe your firewall or router is filtering the pings and pongs, or maybe it's timing out before the 20 minutes passes, so when the server sends the ping, you've already been disconnected.
Best regards,
Matt
Hi kesari,
Can you please update where exactly need to update this code . Is it in somewhere GUI files ?
Thank You,
Sir,
Can any one provide the steps to activate this programe in my laptop.
Regds