on 06-15-2015 4:27 PM
Hi All,
We are on SAP BPC 10.1 Classic.
Requirement: I need read the all base members of time dimension member (user selection) and move to the same year member (%YEAR%.99)
(user can select one time member or more time members while running the package)
*SELECT(%YEARS%,"[YEAR]",TIME,"[ID]='%TIME_SET%'")
*XDIM_MEMBERSET TIME = BAS(%YEARS%.TOTAL)
*XDIM MEMBERSER SCENARIO = ACTUAL
*WHEN SCENARIO
*IS ACTUAL
*REC(EXPRESSION=%VALUE%,TIME=%YEARS%.99)
*ENDWHEN
Above script logic was working fine if i select only one time dimension member from package.
Above script logic was not working fine if i select more than one time dimension member from package.
Error log:
Dymanic script:
PROMPT(SELECT,%SELECTION%,,,"%TIME_DIM%")
INFO(%EQU%,=)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SUSER,%USER%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPPSET,%APPSET%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPP,%APP%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SELECTION,%SELECTION%)
TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,LOGICFILENAME,TEST.LGF)
Can anybody help on this??
Thanks,
Naidu
As a result:
*XDIM_MEMBERSET TIME = BAS(%YEARS%.TOTAL)
*REC(EXPRESSION=%VALUE%,TIME=%YEARS%.99)
Will be
*XDIM_MEMBERSET TIME = BAS(2017,2017.TOTAL)
*REC(EXPRESSION=%VALUE%,TIME=2017,2017.99)
Errors in bold! Member "2017" - not exist
In future - test scripts in UJKT...
Vadim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
And finally - the correct code that will work even for multiple years selected:
Tested with %TIME_SET%=2015.01,2015.02,2015.03,2014.03,2014.08
*SELECT(%YY%,[YEAR],TIME,[ID]=%TIME_SET%)
*SELECT(%TT%,[ID],TIME,[YEAR]=%YY% AND [LEVEL]=YEAR) //%TT% will be 2014.TOTAL,2015.TOTAL
*SELECT(%T99T%,[ID],TIME,[YEAR]=%YY% AND [PERIOD]=DEC) //Use some property to select 99 member instead of [PERIOD]=DEC. %T99T% will be 2014.12,2015.12
*XDIM MEMBERSER SCENARIO = ACTUAL
*FOR %T%=%TT% AND %T99%=%T99T%
*XDIM_MEMBERSET TIME=BAS(%T%)
*WHEN SCENARIO
*IS *
*REC(EXPRESSION=%VALUE%,TIME=%T99%)
*ENDWHEN
*NEXT
For single year members - single loop iteration, multiple - multiple iterations...
Vadim
By the way, there is a better option:
Instead of user prompt for some time members it's better to ask user for year . Just use PROMPT COMBOBOX with a list of Years: 2015,2016,...,2025...
Then use this variable passed with REPLACEPARAM to something like $YR$
Then use $YR$ in your script.
It will work for single year only (multiple years selection is not recommended) but it's very simple and clear for the user.
Vadim
Hi Naidu,
The issue is clear:
*SELECT(%YEARS%,"[YEAR]",TIME,"[ID]='%TIME_SET%'")
For %TIME_SET%=2017.01,2017.02
will result in: 2017,2017 - duplicated year!!!
Vadim
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.