Skip to Content
0

Dynamic Calculated Column Name in HANA

Oct 10, 2016 at 11:46 AM

167

avatar image

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

Thanks,

10 |10000 characters needed characters left characters exceeded

Hi Ankit,

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

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

2 Answers

Florian Pfeffer
Oct 10, 2016 at 06:36 PM
1

Hello Ankit,

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

Regards,

Florian

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

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.

Share
10 |10000 characters needed characters left characters exceeded