Showing results for 
Search instead for 
Did you mean: 

Tricky Query - Ideas asked for.

Former Member
0 Kudos

Hello there!

I've a cube with data something like this:

<u>Char</u> | <u>Date</u>

123 | Jan. 1

123 | Jan. 10

123 | Jan. 20

Now, in the query i've valid-from and -to input varaibles to fetch the right data. In case i fill Jan. 12-18, it won't show up any records which is correct behavior. My requirement is i should check if the user input valid-fr and -to overlaps with min and max date for a char, it should come up.

Any ideas how to achieve this?

Many thanks in anticipation.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos


The solution is to write a user exit for a variable for the char. In I_step = 2 (maby 3) you can validate the userinput in the variable.

You can find guides to write such a user exit here on SDN.


Former Member
0 Kudos

I don't think that this is the requirement. If I understand you correctly you mean that if you have data as shown above the query should evaluate it as valid from Jan 1st to Jan 20th and show it to the user.

To solve this I would do a two step solution. Step 1 would be to move the variable for the date selection into a hidden column so that it doesn't interfere with the output. Step 2 would be to define a virtual characteristic like IOVALID. In the implementation of BAdI RSR_OLAP_BADI you should read the values for the variable, read the values from the cube (or easier an ODS), and check if the entered range overlaps with the value range from the cube. If yes fill the characteristic with X, if not fill it with ' '.

Finally restrict your query to IOVALID = 'X'.

The implementation is a bit tricky but not too tricky. Feel free to ask for help.

BEst regards