Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Script logic issue??

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

replied

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

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question