cancel
Showing results for 
Search instead for 
Did you mean: 

EPM Add-In for SAP IBP VBA Event After refresh

aarulmozhi
Discoverer

Dears,

We implemented custom vba function in AFTER_REFRESH event. We format the reports as we want and implement certain nice to have features in the planning view. We are also determining the current time bucket and set the active cell as current time period. But if we add or remove planning level then SAP sets the active cell as the first cell. Also if a keyfigure is enabled for fixing, auto grouping of columns are also disabled.

Is there any setting to stop this behaviour?

Thanks & kind regards,

Arul

former_member186338
Active Contributor
0 Kudos

Sorry, but not clear without report and code sample. Also EPM version/SP not provided.

aarulmozhi
Discoverer
0 Kudos

Dear Kalin,

Thanks for your quick response...

We use EPM AddIn version 1811.2.0...

I am trying to select the current time period cell. Assume that EPMObj.GetDataTopLeftCell range is G6.

When our code runs it correctly selects the cell we want to select. However, if I add attributes to the planning level, then the view goes for refresh. During that refresh it always selects the range G6. In debug mode I found that our code works properly. But SAP overrides the selection after the event AFTER_REFRESH

The code is like below

Function AFTER_REFRESH()

AFTER_REFRESH =True

Activesheet.Range("AW6").Select

End Function

Thanks again,

With kind regards,

Arul

former_member186338
Active Contributor
0 Kudos

"We use EPM AddIn version 1811.2.0..." - what do you mean? What is the service pack level?

And the sequence of events is not clear...

P.S. And my name is not "Kalin"

aarulmozhi
Discoverer
0 Kudos

Dear Kalinin,

Sorry to mis spell your name...

IBP Add- In version 1811.2.0 EPM version: 10.0 SP 33 patch 1.Net 4, EPM build 10182...

We are using only AFTER_REFRESH event for IBP...

Do you need any other info?

Thanks & kind regards,

Arul

former_member186338
Active Contributor
0 Kudos

Sequence of events with screenshots

0 Kudos

vba.jpg

Dear Kalinin,

We use only one event and I attached the screen shot of my code

Thanks & kind regards,

Arul

former_member186338
Active Contributor

Sorry, but I am not answering questions with images attached using "Insert File" instead of correct "Insert Images"!

And my name is Vadim, Kalinin is my last name...

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member186338
Active Contributor

Due to the fact that you are using IBP ribbon, you have to use special IBP VBA HOOKS

Please read note: https://launchpad.support.sap.com/#/notes/2421657

abhishja
Explorer
0 Kudos

Hi.

I am trying to put in VBA "epm.OpenExcelWorkbook ("WEBEXCEL\TEMPLATELIBARAY\INPUT SCHEDULES\ZZZZ ZZZ.xltx")", however its not working. Please advise asap

former_member186338
Active Contributor
0 Kudos

Ask a new question and provide full info.

aarulmozhi
Discoverer
0 Kudos

Dear Vadim,

The report will be refreshed from IBP ribbon -- Edit view--Add Planning level -- Ok

Thanks & kind regards,

Arul

0 Kudos

Dear Vadim,

Please refer the attached image file...

Thanks & kind regards,

Arul

former_member186338
Active Contributor
0 Kudos

Sorry, but code is not the only thing I want to see.

Report screenshot?

How do you refresh report?