on 07-05-2017 4:44 PM
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 <<< <<<
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 ...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
16 | |
4 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.