on 12-21-2015 11:46 AM
Hello,
we had a working script logic. It does not work anymore (probably due to BPC/NW update or dimension changes?).
We deleted all the code lines from the script code and I found that the problem is TMVL.
If we write:
*XDIM_MEMBERSET VERSION = BDG00
*SELECT(%TIMELIST%, "[TIMEID]", TIME, "[TIMEID] >= 2015.01.01")
*WHEN VERSION
*REC(FACTOR = 1,VERSION = BDG01, TIME = TMVL(365, %TIMELIST%))
*ENDWHEN
*COMMIT
We get this error: No members found in dimension "TIME" for condition "CALC" = "N"
While if we manually write TMVL(365, 2015.01.01) it works.
Please note:
- Our TIME dimension has child members and these are days (e.g. 2015.01.01)
- Version BPC: CPMBPC 801 SP 4
- Version BW: SAP BW 740 SP 4
- Note 2003100 is implemented (related to a very similar problem).
- We already tried solutions as described in:
- We already tried to re-process dimensions
How can we fix this problem?
Thank you
Please show screenshot of your TIME dimension administration! Including TIMEID column.
The script itself is strange - you select list of time members with TIMEID >=2015.01.01
And apply TMVL to this list???? What for?
From help: "The first period of the TIME_SET is used as the base period for a negative offset and the last period of the TIME_SET is used as the base period for a positive offset."
TMVL Parameter - SAP Business Planning and Consolidation, version for SAP NetWeaver - SAP Library
Vadim
P.S. The last period in the list with condition TIMEID >=2015.01.01 will be the last member in your time dimension. And then you try to add 365 days to it???
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vadim,
thank for you answer. That logic was just an example to describe the problem. In the example above I should have written 20150101 instead of 2015.01.01, sorry. However we can duplicate the problem also with this script logic:
*XDIM_MEMBERSET VERSION = BDG00
*WHEN VERSION
*REC(FACTOR = 1,VERSION = BDG01, TIME = TMVL(365, %TIME_SET%))
*ENDWHEN
*COMMIT
(same logic validation issue: No members found in dimension "TIME" for condition "CALC" = "N").
It looks like all logic with TMVL fail to validate.
Our time dimension contains ID = 2015.01.01 and TIMEID = 20150101 as leafs. There are also months (2015.01) as parents of days and years (2015). Additionally there are also weeks (2015.01.W01) and there are two hierarchies PARENTH1 and PARENTH2.
See attachment.
Thank you
Quite a strange result:
UJKT Data Region: TIME=2015.01.01
UJKT Input:
*XDIM_MEMBERSET VERSION = BDG00
*WHEN VERSION
*REC(FACTOR = 1,VERSION = BDG01, TIME = TMVL(365,%TIME_SET%))
*ENDWHEN
*COMMIT
When I press "validate": No members found in dimension "TIME" for condition "CALC" = "N"
When I press "Execute":
LGX:
*XDIM_MEMBERSET VERSION = BDG00
*WHEN VERSION
*REC(FACTOR = 1,VERSION = BDG01, TIME = 2016.01.01 )
*ENDWHEN
*COMMIT
If I write on the input "TMVL(365,2016.01.01)" it also validates.
Look on the note: http://service.sap.com/sap/support/notes/2036619
And other... just search notes for TMVL
Yes, Vadim, it was just a bad example to show the problem with TMVL, it does not work as is.
The idea is to shift all members in %TIMELIST% of +365 day (same day of the next year).
However we should also consider bissextile year (leap year) and in that situation we need to shift some days of +366 days.
This is quite complex: maybe there is an easier way to do this...
You can't shift multiple periods at once!
You have to use FOR/NEXT loop:
%TIMELIST% : 2015.01.01,2015.01.02...
*FOR %T%=%TIMELIST% //%T% willl have single time member for each iteration
*XDIM_MEMBERSET TIME=%T%
*WHEN TIME
*IS *
*REC(EXPRESSION=%VALUE%,TIME=TMVL(365,%T%)) //shift each member by 365 days
*ENDWHEN
Vadim
P.S. You may create property if you want to always shift 365...
Thanks Vadim,
we just get at the same conclusion using the loop FOR!
However there is the same validation problem on TMVL (hope the note will fix it).
Still we need to find a way to manage bissextile years!
I do not understand your "P.S." suggestion. We have a property called "IS_BISSEXTILE" with "Y" on every element (also days) in a year that is bissextile
Maybe something like this should be easier:
*FOR %T% = %TIMELIST%
%YEAR% = get_year_from %T%
%MONTH% = get_month_from %T%
%DAY% = get_day_from %T%
%NEXT_YEAR% = %YEAR% + 1
%NEW_TIME% = %NEXT_YEAR% . %MONTH% . %DAY%
*REC ( ...., TIME = %NEW_TIME%)
*NEXT
This would also remove TMVL however I do not know how to write this in script logic (if it is possible)
User | Count |
---|---|
15 | |
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.