cancel
Showing results for 
Search instead for 
Did you mean: 

Script Logic Not Working in Quality

former_member730217
Participant
0 Kudos

Hi Experts,

Our Development system is on BPC 11.1 Standard whereas the quality is on BPC 11.0 Standard.

Logic script which is working very fine in the Development system is not functioning in the quality system. Script is getting executed successfully in quality, but it doesn't generate any records.

We have narrowed down the issue within the script, and the same is not functioning in the quality system. Its actually the record statement within the when loop where we are using if condition.

We are not calling any Business Rule or BADI, its a straight forward calculation using script logic. Please find the sample code which has affected in BPC 11.0 but which is working fine in the BPC 11.1.

*XDIM_MEMBERSET ACCOUNT = 5000 ,STAT_ACT
*XDIM_MEMBERSET SCENARIO = ACT_CALC
*XDIM_MEMBERSET DATASRCE = ERP
*XDIM_MEMBERSET PRODUCT = BAS(ABC)
*XDIM_MEMBERSET TIME= %TIME_SET%,%PYRYEAR%.TOTAL

*FOR %TMV1%=%TIME_SET%
*WHEN TIME
*IS %PYRYEAR%.TOTAL
*WHEN ACCOUNT
*IS 5000
*REC(EXPRESSION=((%VALUE%)/[ACCOUNT].[STAT_ACT]>0)?(%VALUE%)/[ACCOUNT].[STAT_ACT]:0,TIME=%TMV1%,
DATASRCE = GM,SCENARIO=PLAN,ACCOUNT=STAT_MS)
*ENDWHEN
*ENDWHEN
*NEXT
former_member730217
Participant
0 Kudos

We have analyzed the issue that TOTAL member in the when statement is not functioning, that is in above code %PYRYEAR%.TOTAL is not working and if we replace it with BAS(PYRYEAR%.TOTAL), it is giving incorrect results.

former_member186338
Active Contributor

Sorry, but you are not providing code to assign %PYRYEAR%

Please show full code.

former_member730217
Participant
0 Kudos

Hi Vadim,

Please find the complete code :

Scenario is the category dimension, and PYRYEAR is the property in Scenario dimension which year, ex.2020 as the previous year. As I said earlier, this syntax is working fine in BPC 11.1 and not in BPC 11.0.


*SELECT (%PYRYEAR% ,"[PYRYEAR]",SCENARIO,"[IS_CURRENT]='Y' ")
*XDIM_MEMBERSET ACCOUNT = 5000 ,STAT_ACT
*XDIM_MEMBERSET SCENARIO = ACT_CALC
*XDIM_MEMBERSET DATASRCE = ERP
*XDIM_MEMBERSET PRODUCT = BAS(ABC)
*XDIM_MEMBERSET TIME= %TIME_SET%,%PYRYEAR%.TOTAL

*FOR %TMV1%=%TIME_SET%
*WHEN TIME
*IS %PYRYEAR%.TOTAL
*WHEN ACCOUNT
*IS 5000
*REC(EXPRESSION=((%VALUE%)/[ACCOUNT].[STAT_ACT]>0)?(%VALUE%)/[ACCOUNT].[STAT_ACT]:0,TIME=%TMV1%,
DATASRCE = GM,SCENARIO=PLAN,ACCOUNT=STAT_MS)
*ENDWHEN
*ENDWHEN
*NEXT

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member730217
Participant

After maintaining below environment level parameter, issue was resolved.

K2_SUPPORT_PARENT_MEMBER as X

former_member186338
Active Contributor
0 Kudos

Correct solution!

former_member186338
Active Contributor
0 Kudos

By the way, you code can be written in a better way - you don't need to scope members that you are not using in the loop!

Correct code:

*SELECT(%PYRYEAR%,[PYRYEAR],SCENARIO,IS_CURRENT=Y)
*XDIM_MEMBERSET ACCOUNT = 5000
*XDIM_MEMBERSET SCENARIO = ACT_CALC
*XDIM_MEMBERSET DATASRCE = ERP
*XDIM_MEMBERSET PRODUCT = BAS(ABC)
*XDIM_MEMBERSET TIME= %PYRYEAR%.TOTAL

*WHEN TIME
*IS *
*FOR %TMV1%=%TIME_SET%
*REC(EXPRESSION=%VALUE%/[ACCOUNT].[STAT_ACT]>0 ? %VALUE%/[ACCOUNT].[STAT_ACT] : 0,TIME=%TMV1%,DATASRCE=GM,SCENARIO=PLAN,ACCOUNT=STAT_MS)
*NEXT
*ENDWHEN