2
votes

Is it possible to automate the login to SAP Business Objects Web Services using the Analysis for Microsoft Excel COM add-in in Excel? When I run my code, I am presented with the below "Logon to SAP BusinessObjects BI Platform" window requiring a user to manually enter their web services credentials (note: these are not the same as their SAP credentials). Ideally, I would be able to set all fields (user, password, web service URL, System, and Authentication) without any user interaction.

Web Service Logon Window

I am attempting to automate the refresh of Excel workbooks connected to SAP Business Objects using VBA code. From reviewing the developer documentation available on SAP (see here), I am able to automate most commands. There is also a command "SAPLogon", but this is only able to provide the SAP logon credentials, not the web service ones.

A sample of my code is below:

'Refresh dashboard
LResult = Application.Run("SAPExecuteCommand", "PauseVariableSubmit", "Off")
LResult = Application.Run("SAPSetRefreshBehaviour", "On")
LResult = Application.Run("SAPExecuteCommand", "Refresh")
If LResult = 0 Then
    'Refresh failed. Exit with error.
    StrMsg = "Unable to retrieve variables or refresh any data; script will now exit.  Please close Excel, open a new instance of Analysis for Microsoft Excel, and try again."
    LogMsg StrMsg
    MsgBox StrMsg
    GoTo Exit_UpdateDashboard
End If

Prior to executing this block of code, I am hoping to automate the user login. I have extensively researched this and cannot find any examples of someone automating the web service login through VBA. Some of the links I've tried so far are:

1
From what I could find, the SAPLogon function only allows you to connect to SAP systems, not to BIP. There is no option to provide the URL or authentication type. - ƘɌỈSƬƠƑ

1 Answers

1
votes

I don't think it's possible since the provided libraries to connect the web services are only for .Net and Java. I've tried to build the SOAP envelops from the WSDL, but never managed to make it work. However it's relatively easy to use the libraries from the SDK. I once built an addin for Excel in CShap to manage and refresh the reports directly from Excel: https://code.google.com/archive/p/bo-utils/