cancel
Showing results for 
Search instead for 
Did you mean: 

Current year and previous year data in same Bex report

UmaArjunan
Active Participant
0 Kudos

Accepted Solutions (1)

Accepted Solutions (1)

former_member185132
Active Contributor
0 Kudos

Hi,

You need three variables.

V1: This will be a manual entry variable, and the user will enter the date into this

V2: This will be a Customer Exit variable. In the customer exit code, derive the beginning and end of the year by taking the value entered in V1.

V3: Same as V2, the only difference is that V3 will decrement the year by 1

In the bex query, create one column for current year price and restrict it by V2. Create another column for previous year price and restrict it by V3.

Regards,

Suhas

UmaArjunan
Active Participant
0 Kudos

Hi Suhas,

Thanks for your reply.

I have created three variables as said by you. Before that i would like to mention that i m using Infoset. ( which is based on Info Cube and Master dataInfo object which has price as time dependent attribute reason being to get the recent value of Price )

So now my varaible v1 is manual entry which is based on time interval.

I hv created v2 and v3 based on V1 i hv populated the time intervals of V2 and V3.

I have created 2 RKF based on price Key figure restricted by V2 and V3 respectively and used this RKF in the columns.

I have data for 2011 and 2012 in the Infoset.

When i execute the query using todays system date 2012. i get the values populated for Current year price, but the previous year column is empty.  (2011)

Again if i execute the query by changing the input value as (2011) then the current year price is filled again the previous year price is not filled. am i missing something ? could you get any clue  ?

Thanks,

ABAP Dev

former_member185132
Active Contributor
0 Kudos

Hi,

It's probably a mistake in the cust exit code for variable V3.

Regards,

Suhas

UmaArjunan
Active Participant
0 Kudos

This is solved with the help of my team mate. Issue is i have used the  manual entry variable for date in the global filter - Characteristic Restriction of the Query. Hence it filters the value initially before it goes into the query.

Now I have used the Variable 1 restricted (Manula input for date ) locally in the column for the Price key figure as i did for V2 and V3. Now i can able to get output YYYY and YYYY - 1 in the same report

Answers (0)