Key date variable and aggregates

Question: Hello,

We're trying to create an aggregate that includes time-dependent components. According to the documentation, if the query that should use the aggregate contains a variable for the key date of time-dependent attributes, then this variable should also be included in the aggregate. Our query had initially a variable defined with processing type 'user input' and it did not show in the list of variables for the aggregate, so we created a new one with processing type 'customer exit'. If we don't put any code in the userexit for variables, we cannot fill the aggregate - error message saying the value for the variable could not be determined. So we put code to fill the variable with current date and fill the aggregate. Under properties we can see the current date for the key date, which is ok. The problem is that the user wants to be able to change this date and when he does, the aggregate is no longer hit. Are we missing something here? We're on BW 3.0B.

Any input would be appreciated.

Thanks,
DN

Answer:
I believe you miss something in the concept, not technically.

You have a time dependent attribute, meaning the value of the field is changing in the time. Today, this value is A, but last week it was B.

If you fill the aggregate with key date today, the value A will be included.
If you run a query with key date today, it should retrieve A, so it will use the aggregate.

If you run a query with key date last week, it should retrieve B, so it will NOT use the aggregate (that would return a wrong value).

If you want the aggregate to be used for both situation, you need to create a second aggregate, with key date last week.

But then, you will reach the following problem : if you load this time dependent attribute each day, you potentially have each day another value, so you should then create one aggregate PER DAY !!!

I may be wrong with this explanation, so any comment is welcome, as I am facing this problem of having to create "one aggregate per day", what is obviously not possible.

Ch

Answer:
Thanks for clarifying, Ch - it was what what I had suspected, too. The question still remains: is there any workaround to be able to use aggregates in this case - since creating '1 aggregate per day' is out-of-the-question?

Has anybody out there found a solution to this? I cannot imagine we're the only ones facing this kind of problem.

Thanks in advance,
DN
Copyright ?2007 - 2008 www.jt77.com