Skip to Content
avatar image
Former Member

Dynamic Calculated Column Name in HANA

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,

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • 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.

    Regards,

    Florian

    Add comment
    10|10000 characters needed characters exceeded

  • 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.

    Add comment
    10|10000 characters needed characters exceeded