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

View Entire Topic
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.