cancel
Showing results for 
Search instead for 
Did you mean: 

BPC Script logic select Time_set parameter empty

0 Kudos

Hi all,

I am working on a logic script for conversion purpose, i run the package with PERIODE=2018.DEC. PERIODE is "TIME" dimension.

I use the following code to get the previous year, i should get %P0DEC%= 2017.DEC as a résult.

*SELECT (%YEAR%, "[YEAR]-1", "PERIODE", "ID='%PERIODE_SET%'")
*SELECT (%P0DEC%, "[ID]", "PERIODE", "[YEAR]='%YEAR%' AND [PERIOD]='DEC'")

1. When i use %PERIODE_SET% in the script, %P0DEC% variable is empty.

2. When i replace %PERIODE_SET% with 2018.DEC, It works (%P0DEC%="2017.DEC')

Can you please let me know if i have missed something (syntax, package parameters, or ..) ?

I'am using SAP BPC MS 10.1 SP06

See the logic script below :

*SELECT (%YEAR%, "[YEAR]-1", "PERIODE", "ID='%PERIODE_SET%'")
*SELECT (%P0DEC%, "[ID]", "PERIODE", "[YEAR]='%YEAR%' AND [PERIOD]='DEC'")

// ---------------- converting to MAD where entite LC = EUR

*XDIM_MEMBERSET ENTITE=%ENTITE_SET%,HOLDING
*RUNALLOCATION*FACTOR=USING
*DIM COMPTE 	WHAT=<All>; 		WHERE=<<<; 	USING=P0001;
*DIM ENTITE 	WHAT=[CURRENCY]='EUR'; 	WHERE=<<<; 	USING=HOLDING;
*DIM PERIODE 	WHAT=%P0DEC%; 		WHERE=%P0DEC%; 	USING=%P0DEC%;
*DIM FLUX 	WHAT=[CONVERT]='Y'; 	WHERE=<<<; 	USING=<<<;
*DIM DEVISE 	WHAT=LC; 		WHERE=MAD; 	USING=LC;
*DIM ANALYSE 	WHAT=A_NA; 		WHERE=<<<; 	USING=<<<;
*DIM BRANCHE 	WHAT=BR_NA; 		WHERE=<<<; 	USING=<<<;
*DIM PHASE 	WHAT=REEL; 		WHERE=<<<; 	USING=<<<;
*ENDALLOCATION
*COMMIT

See the Logs : PERIODE dimension is empty.

COMPTE  -->  <ALL>              <<<       P0001
ENTITE  -->  [CURRENCY]='EUR'   <<<       HOLDING
PERIODE -->
FLUX    -->  [CONVERT]='Y'      <<<       <<<
DEVISE  -->  LC                 MAD       LC
ANALYSE -->  A_NA               <<<       <<<
BRANCHE -->  BR_NA              <<<       <<<
PHASE   -->  REEL               <<<       <<<
JohnL
Product and Topic Expert
Product and Topic Expert
0 Kudos

Thanks Hjiaj for the update.

You are corect in that the LGX (compiled / eXecuted version of the script logic) would not work here.

Referencing the LGF should always be used when you have %DIMENSIONNAME_SET% variables in your script logic.

See this article for more information

https://launchpad.support.sap.com/#/notes/11650623 - BPC Script Logic using %DIMENSIONNAME_SET% Variables

Here is the preview: https://apps.support.sap.com/sap/support/knowledge/preview/en/1650623

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

I can confirm that the following code is not getting the '%PERIODE_SET%' value used as a launch parameter in the package : *SELECT(%YEAR%,"[YEAR]-1", "PERIODE", "ID='%PERIODE_SET%'").

The reason is that the package was created with the advanced parameter :

TASK(Execute formulas,LOGICFILE,%ModelPath%\..\AdminApp\%Model%\conversion.lgx)

The solution is to change the package parameter to :

TASK(Execute formulas,LOGICFILE,%ModelPath%\..\AdminApp\%Model%\conversion.lgf)

The package was using the Script logic as compiled and not getting the dynamic parameter %PERIODE_SET% in the *SELECT part of the code.

The package is now getting the %PERIODE_SET% dynamic value in the *SELECT Part of the logic script, using the dynamic parameters choosen when launching the package.

JohnL
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Karim,

Yes you are correct with that assumption.

I wrote an article regarding this behavior a while back:

See 1650623 - BPC Script Logic using %DIMENSIONNAME_SET% Variables https://launchpad.support.sap.com/#/notes/1650623

Answers (3)

Answers (3)

0 Kudos

HI Vadim,

Thank you for your answer, it seems to me that this will not work for BPC MS version.

I will investigate now on the package parameters side.

former_member186338
Active Contributor
0 Kudos

Yes 🙂 TMVL is a feature of BPC NW.

For MS in the help we can see BASE to get previous year December. ..

0 Kudos

I have tried to get the %PERIODE_SET% Parameter for the PERIODE dimension in the logic script as below, and it is getting the value. It means that the parameter %PERIODE_SET is Readby the script logic.

It seems like the following code is not getting the '%PERIODE_SET%' value used as a launch parameter in the package : *SELECT(%YEAR%,"[YEAR]-1", "PERIODE", "ID='%PERIODE_SET%'")

*XDIM_MEMBERSET ENTITE=%ENTITE_SET%,HOLDING
*RUNALLOCATION*FACTOR=USING
*DIM COMPTE 	WHAT=<All>; 		WHERE=<<<; 	USING=P0001;
*DIM ENTITE 	WHAT=[CURRENCY]='EUR'; 	WHERE=<<<; 	USING=HOLDING;
*DIM PERIODE 	WHAT=%PERIODE_SET%; 	WHERE=<<<; 	USING=<<<;
*DIM FLUX 	WHAT=[CONVERT]='Y'; 	WHERE=<<<; 	USING=<<<;
*DIM DEVISE 	WHAT=LC; 		WHERE=MAD; 	USING=LC;
*DIM ANALYSE 	WHAT=A_NA; 		WHERE=<<<; 	USING=<<<;
*DIM BRANCHE 	WHAT=BR_NA; 		WHERE=<<<; 	USING=<<<;
*DIM PHASE 	WHAT=REEL; 		WHERE=<<<; 	USING=<<<;
*ENDALLOCATION
*COMMIT

The log is as follwing :

COMPTE  -->  <ALL>              <<<        P0001
ENTITE  -->  [CURRENCY]='CDF'   <<<        HOLDING
PERIODE -->  2018.DEC           2018.DEC   2018.DEC
FLUX    -->  [CONVERT]='Y'      <<<        <<<
DEVISE  -->  LC                 XAF        LC
ANALYSE -->  A_NA               <<<        <<<
BRANCHE -->  BR_NA              <<<        <<<
PHASE   -->  REEL               <<<        <<<

I believe that le *SELECT is not getting the %PERIODE_SET% value, for some reason.

former_member186338
Active Contributor
0 Kudos

I am not an expert in BPC MS script logic (it's different compared to BPC NW).

But what do you want to achieve? Previous year December?

You can easily get current year January member and then use TMVL(-1,%CURJAN%).

*SELECT(%CURYEAR%, [YEAR],PERIODE,ID=%PERIODE_SET%)

*SELECT(%CURJAN%, [ID],PERIODE,YEAR=%CURYEAR% AND PERIOD=JAN)

0 Kudos

Additionnal information :

When i use the %PERIODE_SET% variable in the script and then i test it on Logic debugger, It is working fine.

COMPTE  -->  <ALL>              <<<        P0001
ENTITE  -->  [CURRENCY]='CDF'   <<<        BGFIHOLDING
PERIODE -->  2017.DEC           2017.DEC   2017.DEC
FLUX    -->  [CONVERT]='Y'      <<<        <<<
DEVISE  -->  LC                 XAF        LC
ANALYSE -->  A_NA               <<<        <<<
BRANCHE -->  BR_NA              <<<        <<<
PHASE   -->  REEL               <<<        <<<

There should be some issue with the package ...