Skip to Content

Dynamic Calculated Column Name in HANA

Oct 10, 2016 at 11:46 AM


avatar image
Former Member

Hello Experts,

I have a calculated column(CC) having data based on Current year & Current Fiscal Year.

If current date is - 10.10.2016 then fiscal year = 2016 and fiscal period = 10

Now I want CC name as dynamic based on current date. For above example, Name should be= 2016.010

for 1.11.2017 Name should be 2017.011 and so on.

How it can be achieved


10 |10000 characters needed characters left characters exceeded
Former Member

Hi Ankit,

Have you tried doing it in your reporting tools? I think it is better to explore your reporting tools for this capability.

* Please Login or Register to Answer, Follow or Comment.

2 Answers

Florian Pfeffer
Oct 10, 2016 at 06:36 PM

Hello Ankit,

at the moment there is not option to create the name of a column in a calculation view in a dynamic way.



10 |10000 characters needed characters left characters exceeded
Lars Breddemann
Oct 12, 2016 at 12:58 AM

There is a feature for providing dynamic labels (not column names): search your SAP HANA developer guide for "Description Mapping".

With that, you get a separate 'hidden' column that can be used by your UI tool to assign the output label.

If you think about it, it would be a rather bad idea to change the structure of the query (changing the column name is a structural change) means, that a) your client tool needs to figure the new column out and b) the database needs to recompile every single query, which leads to increased memory usage and runtime. That's not what you want, I guess.

10 |10000 characters needed characters left characters exceeded