Hi guys,
I have a small issue with launching Analysis for Office. I manage to boot it up with: Application.COMAddIns("SBOP.AdvancedAnalysis.Addin.1").Connect = True
Then I use Application.Run("SAPLogon", "DS_1", "XXX", "XXXXXX", "XXXXXX") to log in.
After all this I try to set a parameter and refresh my query
Call Application.Run("SAPSetRefreshBehaviour", "off")
Call Application.Run("SAPExecuteCommand", "PauseVariableSubmit", "On")
Call Application.Run("SAPSetVariable", "ZFISCPR2", sPeriod, "INPUT_STRING", "DS_1")
Call Application.Run("SAPExecuteCommand", "PauseVariableSubmit", "Off")
Call Application.Run("SAPSetRefreshBehaviour", "On")
Now this will work ONLY if I activate analysis for office by refreshing the query up front. If I do not do it I get:
So the tool launches but it launches in this weird kind of stasis, where it does not display anything.
Is there a command I can do to force it to run properly? I have a idea to make a very small background query and refresh that but it is a bit fiddly and would require the query to be present in the file.
And yes I have considered to refresh it at the start but then I:
1. Refresh
2. Change the properties
3. Refresh again
Which for me is bad practice.
BR,
Adam