Skip to Content
0

VBA that can be utilized when using the AO 2.3.2 Analysis standalone and the EPM Standalone

Mar 27, 2017 at 03:24 PM

99

avatar image
Former Member

BPC Gurus,

When AO came out the whole design was to get away from the EPM standalone version as it was embedded via AO. That has not tested well for us just to complete the full install so we have gone a different route.

We are utilizing the EPM Standalone and the Analysis Standalone (From AO 2.3.2).

As discussed in many threads and documentation the VBA is different.

Some of our user base will have EPM only and some will have both.

Struggling between a nested If statement or separate templates based on what's installed to call the VBA.

Any suggestions?

Dim api As Object
Dim cofCom As Object

On Error Resume Next

Set cofCom = Application.COMAddIns("SapExcelAddIn").Object
On Error GoTo 0


If cofCom Is Nothing Then
Set api = Application.COMAddIns("FPMXLClient.Connect").Object
Else
Set api = cofCom.GetPlugin("com.sap.epm.FPMXLClient")
End If

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Vadim Kalinin Mar 27, 2017 at 03:31 PM
2

Use AO 2.4, VBA code from standalone EPM will work with AO 2.4 without issues!

Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Thanks Vadim I will test that out in my Virtual Machine however based on our timeline we already packaged the previous version. So to fit the timeline we need something in the interim.

0

It's better to do right things from the very beginning! It's better to use latest AO due to many other things! But what is the reason to use AO at all? Why not to use recommended latest standalone EPM for standard model...

0
Jörg Finster Mar 28, 2017 at 09:15 AM
0
Option Explicit
Global myFPM As Object 
Function AFTER_WORKBOOK_OPEN() 'BPC Event
     Set myFPM = GetAPI()
End Function
Public Function GetAPI() As Object
    Dim myFPM As Object
    Dim cofCom As Object
    On Error Resume Next
    Set cofCom = Application.COMAddIns("SapExcelAddIn").Object
    
    If Err.Number > 0 Then
        Set myFPM = CreateObject("FPMXLClient.EPMAddInAutomation")
    Else
        Set myFPM = cofCom.GetPlugin("com.sap.epm.FPMXLClient")
    End If
    Set GetAPI = myFPM
End Function
Show 1 Share
10 |10000 characters needed characters left characters exceeded

Sorry, here is the text. I am to stupid to understand the formatting in this new SCN.

This Code helped us, we also had a mixture of installations (and we also cant just install a new Version when ever we want)

Regards Jörg

1