cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Fiori Elements - Table with dynamic Columns

Former Member
0 Kudos

Hey together,

Are dynamic columns possible in a Fiori Elements List report?

In my requirement there should be a filter that takes one year and ten columns with the last 9 years of the year specified as filter.

Examples:

Filterinput 2020

Columns: 2020 2019 2018 2017 2016 2015 2014 2013 2012 2011

Filterinput 2013

Columns: 2013 2012 2011 2010 2009 2008 2007 2006 2005 2004

At the database level, of course, I have all the years. But in the app, the last 9 years are enough for the customer after the filter.

Maybe someone has an idea how to implement something like this. I would definitely stay with Fiori Elements and not develop a freestyle application.

regards,

Tim

Accepted Solutions (0)

Answers (1)

Answers (1)

AlexNecula
Active Contributor
0 Kudos

Hi,

You can have a look on the Cash Flow Analyzer app and copy the behavior from there.

Basically, you have the same structure that is coming from backend with the columns having a generic ID like Date1, Date2 etc. Based on the input given, you calculate the correct values in the backend so the Date1 field will have the result for 2020 (if the input is 2020) and so on.

Then, in the front-end you implement custom logic in the controller to rename the generic columns (Date1 column text become "2020") and hide the columns that you do not need. You do this on every request so the column texts are updated.

Cash Flow Analyzer is a pretty complicated app because it makes a separate request for layout calculation but once you ignore the parts you don't care about (like how they calculate the correct column name for each column), it will be clearer.

Good luck!

Alex