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

/wp-content/uploads/2014/07/1_490516.png

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

/wp-content/uploads/2014/07/2_490517.png

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

/wp-content/uploads/2014/07/3_490518.png

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
To report this post you need to login first.

3 Comments

You must be Logged on to comment or reply to a post.

    1. Charlie Lin

      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

      (0) 

Leave a Reply