Skip to Content
0

VB Code changes with new AO Version

Nov 15, 2017 at 04:21 PM

83

avatar image

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

10 |10000 characters needed characters left characters exceeded

Sorry, the tag:

SAP Business Planning and Consolidation, version for SAP NetWeaver

has no relation to the question!

0
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Sivaram Bandaru Nov 15, 2017 at 07:26 PM
0

OSS note is 2259913

and Library references are:


Show 1 Share
10 |10000 characters needed characters left characters exceeded

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

0
Vadim Kalinin Nov 15, 2017 at 04:29 PM
0

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

Please show screenshot of your VBA References.

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

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

Thanks!

0

Do you read my comment:

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

0
Vadim Kalinin Nov 16, 2017 at 02:22 PM
0

Path:

Hover mouse pointer over this line to see full path!


path.png (35.0 kB)
Show 2 Share
10 |10000 characters needed characters left characters exceeded

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.

0

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!

0