Skip to Content
avatar image
Former Member

BPC Script logic select Time_set parameter empty

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               <<<       <<<
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    Jul 06, 2017 at 11:13 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 05, 2017 at 04:55 PM

    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 ...

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 05, 2017 at 06:22 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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.

  • Jul 05, 2017 at 05:21 PM

    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)

    Add comment
    10|10000 characters needed characters exceeded