0
votes

SAP GUI scripting is a powerful tool for automating any SAP GUI actions / workflows, but it is hard to find complete documentation (some on the SAP wiki, SAP blog, and YouTube). I want to set the connection language to English to avoid language-specific column descriptions and errors, but have only found the "get" method and not the "set" method. Does anyone know where it might be or if it's not possible?

In VBScript, here is the "get" method for the connection language, which is only accessible at the session level (child of connection)

Dim desiredSystem As String
Dim Application As Object  'GuiApplication
Dim Connection As Object  'GuiConnection
Dim Session As Object  'GuiSession

' Open a new connection to desiredSystem, and select the first session
Set Application = GetObject("SAPGUI").GetScriptingEngine
desiredSystem = "..."
Set Connection = Application.OpenConnection(desiredSystem, True)
Set Session = Connection.Sessions(0)

' Display the language of the session in a message box
MsgBox Session.Info.Language
1
The full complete "SAP GUI Scripting API" documentation is available officially in SAP web site in PDF format and in online HTML formatSandra Rossi

1 Answers

0
votes

You can try recording it as a script but I doubt it will work. Why?

SAP must be restarted after a language change.

BUT - changing the language doesn't change the codepage values.