cancel
Showing results for 
Search instead for 
Did you mean: 

Script logic that worked in BPC 7.5 is not validating in BPC 10

Former Member
0 Kudos

I have found that TMVL statements will not validate in BPC 10 when used with a variable such as %TIME_SET%.  It produces a syntax error. If I hard code a value in place of the variable it will vallidate.

produces syntax error:

*XDIM_MEMBERSET TIMEDIM=TMVL(%TIMEVAR%,%TIME_SET%)

validates:

*XDIM_MEMBERSET TIMEDIM=TMVL(1,P01.2013)

I am experiancing a similar error with *SELECT.

produces Invalid "select" statement error:

*SELECT(%TIMEVAR%,[TIMEVAR],VERSION,"[ID]=%VERSION_SET%")

validates:

*SELECT(%NEWVER%,[NEWVER],VERSION,"[ID]=ACT")

What might be wrong?

Thanks,

--Brent

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Kudos

Hi Brent,

There is something wrong with your SELECT statement syntax or with TIMEVAR property. I have tested the following script and it works properly on BPC 7.5 and 10:

// The TIME was set to 2012.OCT in UJKT

*SELECT(%TIMEVAR%,"[MONTHNUM]",TIME,"[ID]='%TIME_SET%'")

*XDIM_MEMBERSET TIME=TMVL(%TIMEVAR%,%TIME_SET%)

*WHEN ACCOUNT

*IS *

*REC(EXPRESSION=%VALUE%)

*ENDWHEN

The value was written in 2013.AUG (10 - MONTHNUM of OCT, TMVL - OCT + 10 months)

Your correct script will be (pay attention to quotes and double quotes in SELECT):

*SELECT(%TIMEVAR%,"[TIMEVAR]",VERSION,"[ID]='%VERSION_SET%'")

*XDIM_MEMBERSET TIMEDIM=TMVL(%TIMEVAR%,%TIME_SET%)

B.R. Vadim

Former Member
0 Kudos

Hi Vadim,

I am new to BPC 10. You mentioned TIME was set to 2012.OCT in UJKT. How do I initialize the variables for the validation test?  In BPC 7.5, it wasn't necessary for validation but I am thinking that may be my issue in BPC 10.

Thanks,

--Brent

former_member186338
Active Contributor
0 Kudos

Hi Brent,

First of all, there is transaction UJKT for script testing:

http://scn.sap.com/docs/DOC-31043

Using this transaction you can test the script providing %XXXX_SET% and $XXXX$ variables. Remember that %XXXX_SET% variables will be correctly processed by UJKT only with at least EXECUTE(Simulate), not with VALIDATE.

Then, if you are using script in the DM package you will get the %TIME_SET% from the advanced script PROMPT instruction. You can't provide some values to the script during script validation. If the script is not validating (and works correctly in UJKT) you may save it without validation.

B.R. Vadim

Former Member
0 Kudos

Hi Vadim,

I did a small test basically using your example:

*SELECT(%TIMEVAR%,"[MONTHNUM]",TIME,"[ID]='%TIME_SET%'")

*XDIM_MEMBERSET TIME=TMVL(%TIMEVAR%,%TIME_SET%)

*WHEN PCMACCT

*IS *

*REC(EXPRESSION=%VALUE%)

*ENDWHEN

In 7.5 it validates. In 10, I get:

Invalid "select" statement

However, in both versions I am able to perform an EXECUTE(Simulate). I think in 7.5, the validation uses the last time dimension entry as a default whereas in 10, nothing is used so maybe that is the difference. In any case, thank you for the information on the UJKT transaction. I had forgot about that as I have normally just been validating in the Admin web tool. I will just ignore the error and save.

Thanks,

--Brent

Answers (1)

Answers (1)

former_member200327
Active Contributor
0 Kudos

Hi Brent,

SELECT will work only if %TIME_SET% has single value. If you want it to work for multiple values you have to implement OSS Note 1764086.

TMVL works with single or multiple values in TIME_SET.

In UJKT just put TIME = 2012.OCT in Data Region box.

Regards,

Gersh