cancel
Showing results for 
Search instead for 
Did you mean: 

Variable Prompt for planning functions

Former Member
0 Kudos

Hello experts,

I wonder how to call the prompt for planning function's variables.

For instance, I have a Distribution by Key planning function with distribution keys as mandatory variables.

If I call the planning function in WebApllicationDesigner a prompt for variable inputs is displayed.

How to achieve the same behavior in Analysis?

Kind regards,

Denis

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

In case somebody else had the same issue.

I solved this issue by writing a userform in vba. The userform writes the input values in excel and the planning function refers to these cells.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Denis,

which is your current version?

Usually any input variables should appear in the variable prompt?!

Is there a way to use VBA? You could try this function: http://scn.sap.com/docs/DOC-51321

Regards, Martin


Former Member
0 Kudos

Hi Martin,

I am using 1.4 and running the planning function via VBA.

Unfortunately "ShowPrompts" wont work in PF API. I receive a run-time error. "Invalid number of arguments"

Dim lResult As Long

lResult = Application.Run("SAPExecutePlanningFunction", "ShowPrompts", "PF_1")

Regards,

Denis

Former Member
0 Kudos


Hi Denis,
If it may work, I think it should be:

Application.Run("SAPExecuteCommand", "ShowPrompts", "PF_1")

... Afterwards you execute the planning function.

For query prompts you also need an initial refresh, otherwise "ShowPrompts" is not working:

Application.Run("SAPExecuteCommand", "Refresh", "DS_1")

Regards, Martin

Edit: which Version is x: 1.4.x ? It makes a difference 🙂

Former Member
0 Kudos

Hi Martin, the version is 1.4.5.2826.

Unfortunately it does not work. If I run

Dim lResult As Long

lResult = Application.Run("SAPExecuteCommand", "ShowPrompts", "PF_3")

or

lResult = Application.Run("SAPExecuteCommand", "ShowPrompts", "SAPExecutePlanningFunction", "PF_3")

nothing happens. I get the error that I have to fill the variables.

The user guide says "You can call the workbook or data source prompts dialaog." Looks like you can not call the planning function prompts dialog at the moment.

Former Member
0 Kudos

Hi Denis,

I checked the idea place ... and it was requested to have the Variable prompt also for planning functions: API to trigger Prompts for Workbook : View Idea ... the idea's Status is "delivered".


Maybe Thorsten can give us some more insights?! Otherwise I would recommend you open a new idea for planning functions to get feedback from SAP or other users...

Regards, Martin