cancel
Showing results for 
Search instead for 
Did you mean: 

Script Logic validation issue: No members found in dimension "TIME" for condition "CALC" = "N"

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Kudos

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???

Former Member
0 Kudos

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

former_member186338
Active Contributor
0 Kudos

First, please use UJKT to test scripts! And provide UJKT logs...

Read

Second:

What do you have for:

*XDIM_MEMBERSET VERSION = BDG00 

*WHEN VERSION 

*REC(FACTOR = 1,VERSION = BDG01, TIME = TMVL(365, 2015.01.01)) 

*ENDWHEN

Do you have correct members for 2016...

Vadim

jrg_finster3
Active Participant
0 Kudos

Hi Alberto,

in your *SELECT you get a list of TIMEID's

In a TMVL function you normally use the ID of the time member and not the Timeid property.

Regards

Jörg

Former Member
0 Kudos

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.

former_member186338
Active Contributor
0 Kudos

No surprise - Validate don't process scope. For validate %TIME_SET% is empty.

To test you have to press at least Execute simulate.

And please, don't use COMMIT - ABSOLUTELY useless with WHEN/ENDWHEN.

Vadim

former_member186338
Active Contributor
0 Kudos

P.S. By the way, can you explain, what do you want to achieve?

Former Member
0 Kudos

Sorry, I don't get your point:

- if I press validate, validation fails with that error. Validation should not fail both from bpc admin and ujkt

- if I press execute, it works.

- We want to get all logic with TMVL to work again. At the moment they are all broken!

former_member186338
Active Contributor
0 Kudos

"Validation should not fail both from bpc admin and ujkt" - incorrect!

Former Member
0 Kudos

Hi Vadim, thanks for your help.

So if you write:

*XDIM_MEMBERSET VERSION = BDG00

*WHEN VERSION

*REC(FACTOR = 1,VERSION = BDG01, TIME = %TIME_SET% )

*ENDWHEN

in ujk, insert a range and press validate, it does not validate? What do you get?

And in bpc admin?

Thank you

former_member186338
Active Contributor
0 Kudos

It's the effect of TMVL!

former_member186338
Active Contributor
0 Kudos

In you very old version of BPC - CPMBPC 801 SP 4 - it's a bug...

In my version when I press validate I get some member as a result of TMVL (not related to the setting of TIME)


Vadim

former_member186338
Active Contributor
0 Kudos

Look on the note: http://service.sap.com/sap/support/notes/2036619

And other... just search notes for TMVL

Former Member
0 Kudos

Thank you! We will try to apply this note.

By the way we get the error also with %TIMELIST% as described in my original first post. Could it be the same problem as %TIME_SET%?

former_member186338
Active Contributor
0 Kudos

With SP04 I can't predict how many errors you may have...

Anyway your original code is completely incorrect - in %TIMELIST% you put TIMEID's not the ID's of TIME dimension. %TIMELIST% can't be used with TMVL

What is the idea of this code?

Vadim

Former Member
0 Kudos

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...

former_member186338
Active Contributor
0 Kudos

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...

Former Member
0 Kudos

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

Former Member
0 Kudos

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)

former_member186338
Active Contributor
0 Kudos

Impossible! But you can store target member in property.

former_member186338
Active Contributor
0 Kudos

I mean you can create property - target day in time dimension and for each day fill it by the corresponding day member of the next year. Then you will have very simple script

Another option - is to write custom logic badi...

Vadim

Former Member
0 Kudos

Hi Vadim,

the note fixed the problem with TMVL, thank you so much!

About that specific script logic, I re-wrote it using ABAP in a badi. We could also add a property containing the same day of the next year but it needs to be maintained.

former_member186338
Active Contributor
0 Kudos

Inside ABAP code you can define rule for matching leap year/normal year days...

Yes, property will require maintenance, but the script will be without FOR/NEXT - fast!

Vadim

Former Member
0 Kudos

Yes it is so easy in abap!

Answers (0)