cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamically Populate Curr+2 years

0 Kudos

Hi All,

I have a requirement to dynamically populate current years+ 2 years of data without user input with 0CALYEAR.

Report result should show three years of data.

Please find attached screen shot of the same.

Please suggest best way to populate 3 years of data.

Thanks,

Vijay

Accepted Solutions (1)

Accepted Solutions (1)

cornelia_lezoch
Active Contributor
0 Kudos

Hi Vijay,

you need to filter the query for thos 3 years.

then go to the advanced properties of the calendar year and set it to show as master data.

regards

Cornelia

0 Kudos

Thanks for reply Cornelia.

Report should show 3 years of data any given point of time.

For example:

Current Case 1: Current Year (2015) + 2016 + 2017

Report should dynamically change, when report is executed next year.

I am thinking to write exit code  in order to populate 3 years, based on 0CYEAR (SAP exit variable) under 0CALYEAR which will fetch current year and writing code to fetch additional 2 years of data.

Please suggest.

Regards,

Vijay

cornelia_lezoch
Active Contributor
0 Kudos

you need a variabe to identify one year - can be current using the sap exit variable or a user selection.

then you define a filter range using offsets

0 Kudos

Good Point.

I tried using Offset with exit variable (0CYEAR) . But it is showing only 2 years not  3 years.

For example: current year + 2 (Offset)

Result is showing only current year(2015) and 2017. not showing 2016...any idea?

Regards,

Vijay

cornelia_lezoch
Active Contributor
0 Kudos

please show a screenshot of your filter definition

umashankar_poojar
Active Contributor
0 Kudos

Hi Vijay,

Using Offset option is sufficient to solve your problem, if you have used 0CYEAR+2, then it should show 2015, 2016 & 2017. Have you changed the operator as <= instead of =.

Try using range, between option keep from as 0CYEAR and TO as 0CYEAR+2 (using offset). update 

Thanks,

Umashankar

Loed
Active Contributor
0 Kudos

Hi,

You should have these variables as your filter:

0CYEAR

0CYEAR+1 (offset of +1)

0CYEAR+2 (offset of +2)

Regards,

Loed

umashankar_poojar
Active Contributor
0 Kudos

Hi Vijay,

I suspect the operator = (Equals), since you have used = 0CYEAR+2 it is not showing the correct results. Try range From and To as mentioned in my response OR even Loed approach would solve.

Thanks,

Umashankar

0 Kudos

Thank you Uma.

Your suggestion really helped.

Thank you again.

Assign full points.

Regards,

Vijay

Answers (0)