cancel
Showing results for 
Search instead for 
Did you mean: 

EPM Report Automation using Excel VBA

former_member596565
Discoverer
0 Kudos

Hi,

I am trying to automate an EPM report using Excel VBA. While I am able to refresh the report I am unable to add the member values to Column Axis. The values are calendar days and are in format mm/dd/yyyy. Would appreciate if you could help me with the VB code to add values to the column axis.

Regards,

Jitender

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member596565
Discoverer
0 Kudos

Column Axis already contains members

using the below code

epm.AddMemberToColumnAxis Asset, "000", "Calendar Day.Calendar Day", "20 / 1 / 2019"

I get Error 13 Type Mismatch

former_member186338
Active Contributor
0 Kudos

Sorry, but I am unable to help you!

You don't want to post screenshots and answer my questions!

former_member596565
Discoverer
0 Kudos

Tried the below codes however they don't seem to work -

Sub Example()
Dim epm As New FPMXLClient.EPMAddInAutomation
Dim client As Object
'Set client = Application.COMAddIns("FPMXLClient.Connect").Object
epm.AddMemberToColumnAxis Asset, "000", "CalendarDay", "20 / 1 / 2019"
End Sub

Sub Example()
Dim epm As New FPMXLClient.EPMAddInAutomation
Dim client As Object
'Set client = Application.COMAddIns("FPMXLClient.Connect").Object
epm.AddMemberToColumnAxis Asset, "000", "CalendarDay", RANGE("W3").VALUE
End Sub

former_member186338
Active Contributor
0 Kudos

Sorry, but what do you mean by variable Asset?

May be it's better to use: Thisworkbook.Worksheets("Asset") to reference sheet with the name "Asset"

former_member186338
Active Contributor
0 Kudos

P.S Test report screenshot is required to understand what you are doing wrong!

Also, if you have error messages - screenshot of error also to be attached!

former_member186338
Active Contributor
0 Kudos

Sorry, but looks like you want me to do your job (write code), even without providing a clear screenshot?

And what's wrong with AddMemberToColumnAxis??? I have used it number of times without issues! Before using this method column axis need to contain at least one member.

former_member186338
Active Contributor
0 Kudos

Sorry, but why not to read EPM help (API)???

https://help.sap.com/viewer/ec68e48b18a44a49abb12b8ee8ae306f/10.0.33/en-US/f9b52c6a6faf1014878bae8cb...

You can find an example!

former_member186338
Active Contributor
0 Kudos

P.S. Provide screenshot of your time dimension!

former_member596565
Discoverer
0 Kudos

Hi Vadim, apologies for the late response. I have tried using the example at the link you provided however I was unable to frame the code as per my requirement. Unfortunately I would not be able to provide a screenshot. Below is a brief of my requirement

The column axis is CalendarDay

I need to add the date value which is available in Row 3 of the excel tab "Asset" to the column Axis

so for instance Cell C3 has the value 01/01/2019, D3 = 01/02/2019, E3 = 01/03/2019 ... so on and so forth. I need to add these values to the column axis. Please advise.