cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BPC Script Logic: *Rec statement syntax

Former Member
0 Likes
1,622


All,

I am a novice with BPC script logic so this is likely a very basic syntax question.  As a brief background I have read numerous documents regarding BPC script logic and I have a background coding in VBA.

While trying to write some very basic code I have found that no matter how simple I make it I can never get the code to validate in the BPC Admin Console once I introduce the *Rec line.  I've tried various attempts at both Expression and Factor statements and it always comes back with an "Invalid When/Endwhen" error.  If I comment out the *Rec line everything else validates fine which has led me to believe there is something I am just not doing right with the *Rec statement.

Below is an example of a very basic test script I have written  The model I am working in has 8 dimensions all of which I have declared.  Any advice or insight at all to what I am missing here would be greatly appreciated.  I would love to begin looking for oppotunities within our processes to incorporate script but step one is learning to crawl.

*XDIM_MEMBERSET ACCOUNT = VOLUME
*XDIM_MEMBERSET CALDAY = 20150101
*XDIM_MEMBERSET PERIOD = 2015.01
*XDIM_MEMBERSET CUSTOMER = 9999999
*XDIM_MEMBERSET PM_PACKAGE = C005
*XDIM_MEMBERSET ENTITY = NA
*XDIM_MEMBERSET DATASRC = NA_BASE_INPUT
*XDIM_MEMBERSET CATEGORY = FORECAST

*WHEN PM_PACKAGE
*IS C005
*REC (EXPRESSION = 1)
*ENDWHEN
*COMMIT

View Entire Topic
former_member186338
Active Contributor
0 Likes

Hi Aaron!

Extra space after REC is an issue! Compare :

Your:

*REC (EXPRESSION = 1)

And correct:

*REC(EXPRESSION = 1)

Vadim

P.S. *REC(EXPRESSION = 1) will validate but will create nothing if there is no some record already!

Read

But better not to use the code like this

Former Member
0 Likes

Thank you so much Vadim!  I felt it was something very simple but it was getting a bit discouraging.  Hopefully I can now try to do some legit testing although I'm sure I'll have more questions down the road.  I've read many of your responses to other threads in the past so technically this is not the first time you have helped me out.  Thanks again, I'm incredibly excited to begin testing with script!

former_member186338
Active Contributor
0 Likes

Then close this discussion