avatar image
Former Member

SAP HANA CDS - Assign Alias

Hi all

I just started using CDS to create the database structure.

How can I assign my created tables an alias?

Because they are created in the format of "file_location::context_name.table_name". If I use my tables like that in XSJS for example, it's still kind of 'hardcoded'. If there is a possibility to assign aliases to the tables in CDS, this would save the problem. I would just assign a (hopefully) unique alias for each table and would not have to use the full file path name.

Has anyone had this problem / thought before?



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Nov 23, 2016 at 02:28 PM

    You can create database synonym for them. But synonym doesn't have a design time construct until HDI in SPS 11. Of course with HDI as of SPS 11, the namespace part of all design time objects is optional. You could just choose not to have the "file_location" part of the name.

    I'm not really getting what you feel is hard coded about this situation however. The package path ensures a globally unique name.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 28, 2016 at 01:04 PM

    Hi Thomas

    I found your post about HDI - really interesting topic. I will try using HCI to solve the "problem".

    It's not actually a problem but it would be "nicer" if I could assign alias when copying a project on the same server. In which case the file location changes for the design time objects and needs to be adjusted in all XSJS files and SQL queries.

    Thanks for your answer!

    Add comment
    10|10000 characters needed characters exceeded

Skip to Content