Quantcast
Channel: SCN: Message List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 9165

Is it possible to create a view in HANA CDS which queries from a table in repository (not from the entity)?

$
0
0

Dear Experts,

 

I am trying to create a view in Hana CDS which will fetch data from "SCARR" table of "SFLIGHT" schema.

 

Code:

 

namespace dev.cds.model;

 

 

@Schema: 'CDS'

context sampleCDS {

 

 

    view sample as select from "SFLIGHT"."SCARR"

   {

    CARRID,

    CARRNAME,

    CURRCODE,

    URL

   };

 

 

};

 

When I try to activate this CDS document, it is throwing an error saying 'Cannot find artifact "SFLIGHT"' .

 

As per my understanding, it is trying to find the SFLIGHT entity in the same CDS document, but I want it to fetch data from a table in schema(which was imported, not created through any CDS document).

 

Is it possible to achieve my requirement through CDS ?, I have been referring multiple sources including reference docs, but couldn't find any guidance.

 

I am using HANA MDC Trial, 1.00.102.03.1449674847.


Viewing all articles
Browse latest Browse all 9165

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>