cancel
Showing results for 
Search instead for 
Did you mean: 

User exit Maximum date from the cube

Former Member
0 Kudos

Hi,

I would like to get maximum load date from the cube and use that as an variable for my bex query.

Should I be reading from the cube in the user exit code or is there any other better way.

Sample code would be really great.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks for your help guys.

Former Member
0 Kudos

Is load date a char in the cube? Or you are looking to find the date the latest request was loaded into the cube (this info would be in request tables not in cube).

I don't see an option other than exit in either case.

Former Member
0 Kudos

It is char in the cube

Former Member
0 Kudos

If you have the load date in the cube then you can use the FM RSDRI_INFOPROV_READ to read the data from the cube using count function. If that doesn't work, then explore more in request table RSMONICDP if that has anything that will help you.

thanks.

Wond

Former Member
0 Kudos

One option is to try

- Create a query which has a formula (replacement path) on this date field (and nothing else), specify max as aggregation property for this. The o/p of this query should be the max date.

- Create a variable in your query which is based on this prev query (if you are on BI7) and gets the date value from there. If you are on 3.x, you can achieve the same using precalc value set.

It is likely that it will not work - as the formula o/p will not match with the infoobject type of your date field and so won't be allowed as input.

the other option then would be to code in the user-exit - read the dimension and corresponding SID table to get all the values and then get the max of it, or, write an MDX to get the same.

Sorry, can't help you with the code.