How to Setup User Options in EPM Add-in
SAP has introduced a way to set the User Option in EPM add-in for SAP BPC 10. Here is a little write up about how you can set up the “user options” while developing EPM Add-in reports using SAP BPC 10.
Business Case
While deploying a report, sometimes you want to force a Refresh when the context is changed. Earlier, the users could activate this option manually. In other words, this option is enabled or disabled by the user, the implementation team had little control* over this.
The process of setting up the options manually by the users.
User Options >> Automatic Refresh on Context Changes
Solution
The solution of this is to create a simple API based VBA code to set this option. This document will guide you to set-up this option as part of the work book open event. This will make sure that every time the user opens the work book this AutoRefresh is set.
Step 1: Open the Visual Basic Development Window (shortcut ALT + F11)
Step 2: Add reference to the FPMXLClient
Step 3: Add a new module (this works as a place holder of your methods, functions and variables)
Step 4: Add the following code.
Function AFTER_WORKBOOK_OPEN()
Dim EPMObj As New FPMXLClient.EPMAddInAutomation
EPMObj.SetUserOption “AutomaticRefresh”, True
End Function
Step 5: Save the work book as the macro enabled work book or template. The macro will not be saved if this step is not followed.
The AFTER_WORKBOOK_OPEN() event is a SAP BPC EPM Add-in related event. This event allows you to trigger a code every time when the work book is opened. The SetUserOption function allows you to set the user options. You can use this function for manipulating any option in the user option section.
Link
http://help.sap.com/businessobject/product_guides/boeo10/en/EPMofc_10_user_en.pdf Please refer to the latest EPM Add-in documentation.
Prerequisite
- Some knowledge of VBA
- SAP BPC EPM Add-in
- Access to SAP BPC server and client
Thanks Badri, this helps in ensuring that the sheet gets refreshed always and it is not user dependent.
Cheers
Arun
Instead of using
Dim EPMObj As New FPMXLClient.EPMAddInAutomation
it's recommended using
Dim client As Object
Set client = Application.COMAddIns("FPMXLClient.Connect").Object
In this way, the step2 is not necessary.
Best regarfds,
Charlie
But the only problem by declaring as object opposed to taking as reference from Tools is intellisense does not work.