cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

VB Code changes with new AO Version

aditya_ponnala
Participant
0 Likes
425

We are in the process of migrating from EPM to AO version.

This below code which used to work in EPM is not working in AO version: Plug in 2.5 SP02

Dim EPM As New FPMXLClient.EPMAddInAutomation
Dim filename As String

EPM.RefreshActiveSheet

Upon contacting SAP they recommended note;2259931 and relevant notes and this notes says to re-write code as.

Sub MyMethod()

Dim cofCom As Object

Dim epmCom As Object

Dim result As String

Set cofCom = Application.COMAddIns("SapExcelAddIn").Object

cofCom.ActivatePlugin("com.sap.epm.FPMXLClient")

Set epmCom = cofCom.GetPlugin("com.sap.epm.FPMXLClient")

// ->Just call the API on epmCom

End Sub

I gave a small example of my code but there is lot of code like calling package from VB. Did anyone try to switch your code? Can you help port our code to new AO version

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member186338
Active Contributor
0 Likes

Path:

Hover mouse pointer over this line to see full path!

aditya_ponnala
Participant
0 Likes

Vladim,

I already changed it before from EPM path to AO version path. That change of path worked for AO version SP01. However as we had issues with that version of AO and based on SAP recommendation we installed AO version SP02 patch 1. After installing we are having issues with VB code like

Dim epmobj As New EPMAddInAutomation

x1 = Range(epmobj.GetDataTopLeftCell(Sheet1, "000")).Row

addSingleSelectionParameterToXML rngParameters(i, 1).Value, _
rngParameters(i, 4).Value, _

and several others.

former_member186338
Active Contributor
0 Likes

The location of library was changed not once, but number of times! Please check again that you have file in the path shown in References.

About the code - use simple code to test! Like:

Public epm As New FPMXLClient.EPMAddInAutomation

Public Sub Test()
    MsgBox epm.GetDataTopLeftCell(ThisWorkbook.Worksheets("Sheet1"), "000")
End Sub

Compare with your code!

aditya_ponnala
Participant
0 Likes

OSS note is 2259913

and Library references are:

former_member186338
Active Contributor
0 Likes

Check path in References for FPMXLClient - do you have the correct file?

former_member186338
Active Contributor
0 Likes

Are you sure: 2259931 - FAQ of Brazil's EC87 and NT003 solutions ???????

Please show screenshot of your VBA References.

aditya_ponnala
Participant
0 Likes

Hi Vadim, I provided my response on library references as above.

Thanks!

former_member186338
Active Contributor
0 Likes

Do you read my comment:

"Check path in References for FPMXLClient - do you have the correct file?"