Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to refactor the CDS view

friendlycoder
Participant

Hi all

I have CDS views, that are depending from each other as follows:

As you can see on the image, the CDS1 selects fields from DB and CDS1_1, CDS1_2 and CDS1_3 are using the fields from CDS1.

Now, I've renamed the field in the database and also apply to all the views. The compiler does not recognize the renamed fields, although I've activated all at once. How to solve the problem?

Thanks

1 REPLY 1

former_member1716
Active Contributor

bifunctor

Renaming a artifact that belong to a CDS view means that you are deleting the old artifact and creating a new one.

In case if you are trying to rename a database table on which CDS views are already created, system will not allow you to rename it. It will thrown an error with all the views that are using the field which is being renamed. You have to first delete those fields from CDS and then try activating the table, only then your activation will be successful. post activation you can add the renamed field in CDS.

Regards!