'-Begin-----------------------------------------------------------------
'-Directives----------------------------------------------------------
Option Explicit
'-Sub Main------------------------------------------------------------
Sub Main()
'-Variables-------------------------------------------------------
Dim SapGuiAuto, application, connection, session, info
Dim oFSO, oFile, FileName
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
Set info = session.Info
FileName = "C:\Dummy\Info.txt"
Set oFSO=CreateObject("Scripting.FileSystemObject")
Set oFile = oFSO.CreateTextFile(FileName, True)
oFile.Write "Transaction : " & _
Info.Transaction & vbCrLf
oFile.Write "Program : " & _
Info.Program & vbCrLf
oFile.Write "ScreenNumber : " & _
CStr(Info.ScreenNumber) & vbCrLf
oFile.Write "CodePage : " & _
CStr(Info.CodePage) & vbCrLf
oFile.Write "GuiCodePage : " & _
CStr(Info.GuiCodePage) & vbCrLf
oFile.Write "I18NMode : " & _
CStr(Info.I18NMode) & vbCrLf
oFile.Write "Language : " & _
CStr(Info.Language) & vbCrLf
oFile.Write "IsLowSpeedConnection : " & _
CStr(Info.IsLowSpeedConnection) & vbCrLf
oFile.Close
End Sub
'-Main----------------------------------------------------------------
Main
'-End-------------------------------------------------------------------
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
36 | |
8 | |
7 | |
5 | |
5 | |
4 | |
4 | |
4 | |
3 | |
3 |