cancel
Showing results for 
Search instead for 
Did you mean: 

SAP BPC - script logic using variables

Former Member
0 Kudos

Hi,

1) I'm new to BPC but have extensive experience in BI IP. Apperantly (custom made) planning functions have to be programmed in scripts. I was wondering how one can use the principle of variables when defining scripts. For example when I check scripts postd on SDN I always see hardcoded values in the scripts ... Is it possible that the user has to fill in somewhere the value or values for a variable and use this in a script logic. For example a simple periodic distribution from year to period: how can the user indicate for which planyear the system has to do this? I presume you do not code this in the script itself ...

I know you can use //prompt when creating scripts, but what if the logic is not triggered manually, but during sending by adding it to the default logic.

-> In IP the user can key in values in variables upfront which can be used in all planfunctions ...

2) is it also possible to select the values set in the current view section in the action pane and use it in a script?

3) can you change data belonging to another application and application set when executing a script?

regards

D

Accepted Solutions (0)

Answers (1)

Answers (1)

pravin_datar
Employee
Employee
0 Kudos

Hi Dries,

In BPC, the current view simulates (to some extent) the use of variables for the end user. The end user can select particular dimension values that he/she wants to process. In addition to that, there are two main types of variables that you can define in the script logic. Please note that these variables are only internally utilized within the script logic at the run time. The two types are substitution variables (with prefix and suffix as %) to substitute tha value from say property of a member etc. and memory variables (with # prefix) to store intermediate results for further calculation in the same script. If you are executing scripts not as a default logic but from data manager, then you can define the values for entity, category and time in the prompts that you get for them. You can add more prompts if you do UI scripting using dynamic script editor. You can also set your variants for reuse. Although this is not the same as the variables in IP, it is similar concept. About your last point, you can access data from other applications in the same appset but not from a different appset (at least not that I know)

Regards

Pravin

Former Member
0 Kudos

So If I understand you correctly:

- the values entered in the current view are available in the scripts -> for example the user selects a certain value for entity in the action pane which I can use to determine for which entity a certain function should run ... Even if I execute the function via the default logic?

- How can the user key in the values for these substitution and memory variables? is there a space provided for example in the control panel. To give you an example If I define a top-down distribution function but want the user to select the correct version (category) to be used as reference data, where can the user selects the value for this? In IP we can let the user enter the value for this variable and execute the function manually or automatically by assigning it to the save button.

grtz

D

pravin_datar
Employee
Employee
0 Kudos

When you are writing the data through an iput schedule for example, the data will be written for the dimension member combination that you select in the current view and th default logic will be run for that data (unless you are restricting it in the scoping of th logic). User will not key in the values for the substitution or memory variables. This is different than the user entry variables or the VARV/VARI-VARC constructs in BPS. In your example, if you want a particular year to be used as a reference for distribution, that year can be a property of a dimension member and that property can be used by the substitution variable. The substitution and memory variables are valid within the script only and defined/used internally.

Regards

Pravin

Former Member
0 Kudos

But the properties have to be maintained in the ADMIN console, where my enduser normally is going to make changes during his planning exercise. This is not a user friendly solution I would say (even more because this change will be valid for all users ...) I would like to see it integrated in the inputschedule ... Is there noway to let the user key it in, somewhere in the excell grid of his input schedule or a pop-up which is called when executing the function?

D