I am trying to use EPM Addin API from VBScript in UFT. Following is the code which I have written till now:
Dim addin, obj, objwb, vbproj, fpm
Set obj = CreateObject("Excel.Application")
Set objwb = obj.Workbooks.Open(FileName)
Set vbproj = objwb.VBProject
vbproj.References.AddFromFile("C:\Program Files (x86)\SAPBOBJ\PC\FPMXLClient.Shim.dll")
Set fpm = CreateObject("FPMXLClient.EPMAddInAutomation")
fpm.Connect "EPM_http://server_name:8002/sap/bpc/_Environment_Model",Username,Password
I'm opening the EPM report, and then load the reference library and finally try to create connection using the EPM API. At the last line, it throws the error "object reference not set to an instance of an object". I believe the issue is in creating the object instance.
Can someone shed some light on how to use the API from VBScript, since the documentation is only in VBA