on 05-19-2017 3:09 PM
I need to create an Excel to-do/ task tracking spreadsheet. As part of this, I want them to be able to click a link or run a macro to open the SAP R/3 workflow monitor whether they are already logged in or not. I have virtually no experience in VBA. I already added excel.exe to the SAP GUI configuration and have SAP controls in Excel. Can you help me with a script or suggestions on how to do this?
Interesting request. It depends a little on your security requirements, but I would go about this completely from the other end - partly due to lack of know-how on VBA-SAP integration 🙂
If at least some of the data is not critically sensitive, expose it as a web service or callable as an RFC. More coding in SAP and less in VBA, but at least you would be creating a standard interface that can be reused in different scenarios. In other words, you write the equivalent of a BAPI function that gives you all the monitor data. From Excel/VBA you can query it either via RFC call or by HTTP/S and display it as you like in Excel.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Many thanks to all of you for your input, instructions and insights!
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.
Thank you, Pavan. Unfortunately, the script found in the link did not work, either. I am beginning to suspect that our corporate security is preventing me from creating the script I need. I tried to run RZ11 to see if scripting was enable and was denied access to that transaction. I also tried copying the script into Excel as a VBA project and got a Compile error: Syntax error. This is the script that I copied:
PrivateSub CommandButton1_Click()
Dim SapGui AsObject
Dim saplogon AsObject
Dim connection 'As Object
Set SapGui = GetObject("SAPGUI")
Dim Wshshell AsObject
Set Wshshell = CreateObject("Wscript.Shell")
Wshshell.Run Chr(34)&("C:\Program Files\SAPPC\FrontEnd\SAPgui \saplogon.exe")& Chr(34)&" "&"/INI_FILE"&"="& Chr(34)&"\\longpathtoini\appl\Sap\saplogon\int\saplogon.ini"& Chr(34)
DoUntil Wshshell.AppActivate("SAP Logon")
Application.Wait Now + TimeValue("0:00:01")
Loop
Set Wshell =Nothing
Set saplogon = SapGui.GetScriptingEngine
connection = SapGui.OpenConnection("SID",True)
Set SapGui =Nothing
Set saplogon =Nothing
Set connection =Nothing
EndSub
Hi JK,
on the requirement, what do you mean by 'to open the SAP R/3 workflow monitor' ?
Could you elaborate please.
Aditya V
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Aditya,
I need to create an Excel (VBA) link, script, macro, command - whatever - within the Excel spreadsheet that will automatically open with workflow monitor so the Developer can enter the material code and see the current workflow status. I am not sure anything will work, at this point. Our security may be set too tight.
I tried to run the RZ11 transaction in SAP to see if scripting was enabled, in case I could create this with VBS, but was denied access to the transaction. Any help or suggestions would be greatly appreciated.
Thank you!
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.