Skip to Content

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

Prior December Period for Allocation

Hello Experts,

I am on BPC 10.1 Classic Environment NW Version.I have a requirement to allocate the data based on Prior Year December period.

User can select multiple time periods in the DM for the same year.I tested the below code in UJKT.It works fine when I pass single period say 2017.12 in the data region of UJKT

But if I pass multiple periods of the same year say TIME=2017.01,2017.12 in the data region, I get an exception message that 2017 member not defined.Please suggest for any changes to make it work for multiple Time periods.

*XDIM_ADDMEMBERSET ACCOUNT=OTHEXP.REDIST,ICREC,ICPAY

*XDIM_MEMBERSET CATEGORY=BUDGET

*XDIM_ADDMEMBERSET CATEGORY=%CATEGORY_SET%

*XDIM_MEMBERSET RPTCURRENCY=LC

*XDIM_MEMBERSET AUDITTRAIL=BAS(ALLAUDITTRAIL)

*XDIM_MEMBERSET CHANNEL=BAS(CHANNEL)

*XDIM_MEMBERSET DEPARTMENT=BAS(ALLDEPARTMENTS)

*XDIM_MEMBERSET DESTINATION=BAS(DESTINATION)

*XDIM_MEMBERSET INTERCO=BAS(ALLINTERCOMPANY)

*XDIM_MEMBERSET MARKET=BAS(MARKET)

*XDIM_MEMBERSET PRODUCTLINE=BAS(PRODUCTLINE)

*XDIM_MEMBERSET PRODUCTTYPE=BAS(PRODUCTTYPE)

*XDIM_MEMBERSET ENTITY=BAS(CP2154)

*XDIM_MEMBERSET TIME=%TIME_SET%

*SELECT(%YR1%,"[YEAR]",TIME,"[ID] = '%TIME_SET%'")

*XDIM_MEMBERSET TIME AS %PRIORDECEMBER% = TMVL(-12,%YR1%.12)

*XDIM_MEMBERSET TIME=%TIME_SET%,%PRIORDECEMBER%

*XDIM_MEMBERSET ACCOUNT=OTHEXP.REDIST,ICREC,ICPAY

*RUNALLOCATION

*FACTOR =USING/TOTAL

*DIM ACCOUNT WHAT=>>>; WHERE=OTHEXP.REDIST; USING=ICREC,ICPAY; TOTAL=ICREC,ICPAY

*DIM ENTITY WHAT=BAS(CP2154); WHERE=>>>; USING=BAS(CP2154); TOTAL=<<<

*DIM AUDITTRAIL WHAT=BAS(ALLAUDITTRAIL); WHERE=ALLOCIN; USING=BAS(ALLAUDITTRAIL); TOTAL=<<<

*DIM CATEGORY WHAT=%CATEGORY_SET%; WHERE=%CATEGORY_SET%;USING=BUDGET;TOTAL=BUDGET

*DIM TIME WHAT=%TIME_SET%; WHERE=%TIME_SET%;USING=%PRIORDECEMBER%;TOTAL=<<<

*ENDALLOCATION

Thanks

Former Member
replied

Better to use COMBOBOX (you can provide long enough list of years):

PROMPT(COMBOBOX,%CURYEAR%,"Enter Current Year",0,,{2012,2013,2014,2015,2016,2017,2018,2019,2020})

...

TASK(/CPMB/ICDATA_LOGIC,REPLACEPARAM,CURYEAR%EQU%%CURYEAR%)

$CURYEAR$ is better for additional member restriction in my prev post.

Vadim

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