cancel
Showing results for 
Search instead for 
Did you mean: 

SAP GUI Scripting Timeout

Former Member
0 Kudos

Hi

We are currently configuring an internal front end application that uses SAP Gui Scripting.

The aplication is running fine, but we are facing a problem:

auto logout (maximum user idle time exceeded)


Our front end internal application uses several "sub" applications, so it's normal that a user doesn't send any data to SAP for a long time.

Auditing says we can't change the rdisp/gui_auto_logout, so we tried to use a "ping" every 30 minutes, to avoid the session kill.

However, the session still terminates, even when we see the refresh on SM04. It seems the "ping" is working, but the session still dies.

What can be the cause of this? Am i looking at the wrong timeout parameter?

Is the timeout diferent if comming from GUI Scripting?

Any help will be welcome (and definitely rewarded if helpful:) )

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

script_man
Active Contributor
0 Kudos

Hi Pedro,

I solved the problem for me as follows:

Auto_No_Logout.vbs:

If Not IsObject(application) Then

   Set SapGuiAuto  = GetObject("SAPGUI")

   Set application = SapGuiAuto.GetScriptingEngine

End If

If Not IsObject(connection) Then

   Set connection = application.Children(0)

End If

If Not IsObject(session) Then

   Set session    = connection.Children(0)

End If

If IsObject(WScript) Then

   WScript.ConnectObject session,     "on"

   WScript.ConnectObject application, "on"

End If

wscript.sleep 2000

do

on error resume next

session.findById("wnd[0]").maximize

if err.number <> 0 then exit do

on error goto 0

session.findById("wnd[0]/tbar[0]/okcd").text = "/o"

session.findById("wnd[0]").sendVKey 0

session.findById("wnd[1]").close

wscript.sleep 1800000 '= 30 minutes

loop

Regards,

ScriptMan

Former Member
0 Kudos

Hi Script Man Thanks for your help.

I'm not developing the script, I'm just the basis guy. Anyway I will send this info for the team, if it solves, I will mark as correct.

Other thing I find out after opening the thread: users will work through a citrix server. So when i go to SM04, I will see the refresh of the user and the user hostname is the citrix server.

Do you think SAP somehow sends a kill session to the front end machine, if the scripting is going through the citrix server?

Thanks

script_man
Active Contributor
0 Kudos

Hi Pedro,

I do not work with the PING command in SAP. But I suspect that this command does not count as an activity in SAP and therefore the timeout is reached.

Regards,

ScriptMan

Former Member
0 Kudos

Hi Script Man

Indeed your script helped. We are having less timouts. But they are still appearing... I have opened a support message in SAP.. maybe they can help.

Answers (1)

Answers (1)

Former Member
0 Kudos

Anyone?