Recently, I have experienced something while modeling HANA information view that I want to share with everyone.
Tested with HANA Revision – SPS 08 80/82
Dynamic Filter for projection with current Fiscal Year and Fiscal Period.
In order to filter it dynamically I decided to use input parameter. There are different parameter types that we can use to do this. I decided to use following “Derived from table” type as shown below:
When filtering column then it displays list of values from the same HANA information view and we can select the date. Now, as the requirement is current Fiscal Year and Period so how do we filter the column to dynamically select current date in “Filter Value” section?
Like everyone, I expected it to understand the expression. So I tried following and it worked. I used the expression
I was aware that I could use expression in the “Default Value” section (as explained in SAP HANA Developer Guide) but didn’t expect it to
work in “Filter Value”. I was able to filter the projection using this input parameter. To test the filtering, I removed the input parameter and the projection displayed all the years rather than just current year. Hopefully, when I get an explanation for this then I will share it here. For now, you can try different expressions.