Quantcast
Channel: SCN : Discussion List - Scripting Languages
Viewing all articles
Browse latest Browse all 325

Accept script message in SAP just once

$
0
0

Experts please I need help with this.

 

I have developed a code vba (Excel) that interacts directly with SAP, and it works perefectly, however its a code that takes a lot of time it works with several transaction in diferent subs, and its only problem is that the user must press a Yes button every time excel must interact with SAP (every time it calls a sub)  to obtain data, and I was wondering if there is a way that I can declare the the opening code to interact with sap GLOBALY:

 

 

If Not IsObject(App1) Then

   Set SapGuiAuto = GetObject("SAPGUI")

   Set App1 = SapGuiAuto.GetScriptingEngine

End If

If Not IsObject(Connection) Then

   Set Connection = App1.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

 

I mean for every sub that i have in vba.

 

Thanks in advance.


Viewing all articles
Browse latest Browse all 325

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>