Skip to Content
avatar image
Former Member

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

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Mar 27, 2017 at 03:31 PM

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

    Add comment
    10|10000 characters needed characters exceeded

    • 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...

  • Mar 28, 2017 at 09:15 AM
    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
    
    Add comment
    10|10000 characters needed 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