cancel
Showing results for 
Search instead for 
Did you mean: 

customer exit variable question.

Former Member
0 Kudos

I need to evaluate one date characteristic against another date characteristic in the same multiprovider. This will be used within a restricted key figure. I need to select only amounts where the dates are equal like in a SQL statement where clause "where date1 = date2". Can a customer exit variable be used to fulfill that requirement.

Thanks

Bill

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Bill,

Yes, Customer exit variable can do that or alternatively if you ar in BI7 then you can try to create the variable 2 with replacement path by variable 1.

Regards,

Nikhil

Former Member
0 Kudos

See my other posted response which talked to both responses I have received.

Former Member
0 Kudos

Hi Bill,

Create one variable V1 on Date 1 with Single Value/Mandatory etc. Create another Variable V2 on Date 2 Replacement Path by Variable/ Select the V1. After that create 2 RKF's RKF1 and RKF2 and restrict RKF1 by V1 and RKF2 by V2.

Regards,

Nikhil

Former Member
0 Kudos

If I am not mistaken, this would require a date to be entered. What I was seeking to do was restrict a key figure comparing dates in the cube on the same "row". Example would be

Date 1 Date 2 Key Figure

3/1/2009 3/31/2009 8

3/3/2009 3/3/2009 15

3/14/2009 3/17/2009 32

I would want to restrict Key Figure by Date 1 == Date 2. In this case the RKF value would be 15 as only 1 row has that scenario.

If I were to do a Date 1 <> Date 2, I would expect it to be 40 as 2 rows have that scenario.

I was able to work a solution using exception aggregation. I think I was overthinking it. However, I would still like to know if the above scenario is possible in a query.

Thanks for your feedback.

Former Member
0 Kudos

It sounds like what you wan to do is have input variable1 and then populate a variable2 in the exit program to have the same value vale as variable1. If that's the case, it can certainly be done in the exit - we have several variables we do that with.

e.g. I have cubes that are partitioned on 0FISCPER and users run their queries for a given Fiscal Year. Users enter an input value for fiscal year and in the exit program, I convert that to the corresponding 0FISCPER range, so that the database can leverage the partitioning. I could have the user enter the 0FISCPER range values, but that seems like an unnecessary burden on them. I also have the reverse situation, where a user enters a 0FISCPER value and I use the exit pgm to populate a FISCYEAR variable. Seems to me there should be more SAP exits to do these kinds of things without having to code them ourselves.

Former Member
0 Kudos

Hi Bill,

Just create two replacement path formula variable for date 1 and date 2. Now make one formula1 in that use this two variable, Var date1 - Var Dat 2.

Now create on Condition in query defination, Display line where formula1 eq 0.

Surely this will solve your problem.

Regards,

shanthi_bhaskar
Active Contributor
0 Kudos

as per my understanding you need to select the amounts aginast two dates when these two are equal...Am i right..correct me if i am wrong..If this is the requirement then i hope there is no need of customer exit.

Create a RKF by restrcting amonut and two dates which you need to compare

Former Member
0 Kudos

You have the understanding correct and I have pulled both into the RKF. However, how do you make the comparison such as equal, not equal, etc. I tried to restrict either of the dates using a variable attempting to use a replacement path. When I go to choose the reference characteristic, I don't see the other characteristic listed in the drop down. My options are Date and the char for which I am building the variable. When I choose Date and select variable, I don't see anything related to the date I need.

With what I am trying to do, I would expect to go into restrictions and have all the date infoobjects listed for the queries infoprovider which I can then select the comparison date I need. The comparision would be then key value date 1 against key value date 2.