on 05-28-2011 4:39 PM
Hello,
I'm using the above approach to connect to SAP in order to upload data from excel to SAP R/3 transaction.
Myquestions is there exist away to prevent the screen flickering from EXCEL to SAP during the macro processing , tried to the statement at the excel macro : Application.ScreenUpdating =FALSE which didn't worked.
In other words my requirement is not see SAP screen at all during the macro processing.
If Not IsObject(SAPguiApp) Then
Set SAPguiApp = CreateObject("Sapgui.ScriptingCtrl.1")
End If
If Not IsObject(Connection) Then
Set Connection = SAPguiApp.OpenConnection("SYSTEM", True)
End If
If Not IsObject(Session) Then
Set Session = Connection.Children(0)
End If
Session.findById("wnd[0]/usr/txtRSYST-MANDT").Text = "CLIENT"
Session.findById("wnd[0]/usr/txtRSYST-BNAME").Text = "USER"
Session.findById("wnd[0]/usr/pwdRSYST-BCODE").Text = "PASSWORD"
Session.findById("wnd[0]/usr/txtRSYST-LANGU").Text = "EN"
Session.findById("wnd[0]/usr/txtRSYST-LANGU").SetFocus
Session.findById("wnd[0]/usr/txtRSYST-LANGU").caretPosition = 2
Session.findById("wnd[0]").sendVKey 0
'Here follows the recorded VBScript . . .
Regards,
Mark
Hi Mark, welcome to the forum.
I'd test it with session.findById("wnd [0]"). iconify.
And I would eliminate the command session.findById("wnd [0]").maximize.
Regards,
ScriptMan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Scriptman Thank you , problem resolved.
Regards,
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.