cancel
Showing results for 
Search instead for 
Did you mean: 

BPC 10.1 Embedded - Issue with API Execute Planning function

Former Member
0 Kudos

Hi,

We are on EPM add in SP 18 (Unified model) and were trying to use the ExecutePlanningFunction API in our workbooks.

Wanted some help on the following issues -

  Issue with Planning function execution - API

  Planning functions without variables - 

We created a simple macro to run a planning function using the new API – ExecutePlanningFunction as per the example in help documentation.
It works fine. Then the workbook is saved on the server.

When we try to reopen the layout from server, and execute the macro, the function doesn’t execute, doesn’t give any result. The
connection with which the layout was created shows greyed out with the planning function/aliases in the “Planning Objects” tab. And another “blue” active connection shows up. The help documentation says that the alias is “user-specific”.

I wanted to understand why this is so restrictive? Ideally, if user logs onto a workbook saved on the server, then he should be able to execute all embedded functions rather than create aliases from the “Planning Objects” tab everytime.

 

I am not sure how/whether this is by design, or if there some setting we are missing which could let the user execute the planning
functions via macros (on saved workbooks)?

    

Planning functions with variables –  How to execute the planning functions with variables via a macro (API)?
We created a revaluation function with variables. We can execute it successfully through the “Planning Objects” tab.

 

How can the same function be executed by macro/API? As the ExecutePlanningFunction API doesn’t give any popup where the variable values
can be entered.

Thanks in advance,

Apeksha

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

hi Apeksha:

I m facing the same issue, I hope you can share the solution to pass variables.

regards

mah

Former Member
0 Kudos

Hi,

Did you find a solution?

I can execute the planning function without variable using this macro:

       Sub test()

          Dim api As Object

          Set api = Application.COMAddIns("FPMXLClient.Connect").Object

          api.ExecutePlanningFunction "PF_1"

      End Sub

but I get an error if I try to set the planning function variable using the following instruction:

     api.SetPlanningFunctionVariable "PF_1", "0TARGET_YEAR", "2013"

If you resolved the issue, could you please share?

Many Thanks,

Regards

Nilla