Quantcast
Channel: SCN : Discussion List - SAP Planning and Consolidation, version for SAP NetWeaver
Viewing all articles
Browse latest Browse all 5414

TMVL in default logik when run for several periods

$
0
0

Hi,

 

I want to get a value from the prior year end period into the current period via the default logik. I have come up with this script:

 

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

 

*XDIM_MEMBERSET TIME = %TIME_SET%,TMVL(-12,%YR%.12)

*XDIM_MEMBERSET CATEGORY = %CATEGORY_SET%

*XDIM_MEMBERSET INPUTCURRENCY = <ALL>

*XDIM_MEMBERSET RATEENTIY = Global

*XDIM_MEMBERSET RATE = END

 

*WHEN TIME

*IS %TIME_SET%

*ELSE

*REC(EXPRESSION=%VALUE%,RATE=END_PY,TIME=%TIME_SET%

*ENDWHEN

This works fine for one period (I have tested this with all twelve months in 2015). However, when I use an input schedule that shows all 12 months of a year and I enter data in more than 1 month I get an error message.

Error running default logic ()

Member 2015 does not exist

My schedule shows all base level members for the context element and I have selected 2015.TOTAL, so I have all twelve months 2015.01 to 2015.12. I have checked the time dimension and the YEAR property is correctly populated for all periods in 2014 and 2015. I also have twelve periods for both years.

 

I then tried to add a *FOR / *NEXT loop to the script

 

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

 

*XDIM_MEMBERSET TIME = %TIME_SET%,TMVL(-12,%YR%.12)

*XDIM_MEMBERSET CATEGORY = %CATEGORY_SET%

*XDIM_MEMBERSET INPUTCURRENCY = <ALL>

*XDIM_MEMBERSET RATEENTIY = Global

*XDIM_MEMBERSET RATE = END

 

*FOR %TIMES% = %TIME_SET%

*WHEN TIME

*IS %TIMES%

*ELSE

*REC(EXPRESSION=%VALUE%,RATE=END_PY,TIME=%TIMES%

*ENDWHEN

*NEXT

However that gives me the same error message.

 

How can I write the script in a way that it works when data is entered for several months at once?

 

Thanks,

Arnold


Viewing all articles
Browse latest Browse all 5414

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>