cancel
Showing results for 
Search instead for 
Did you mean: 

Querying Parameterized Views on SAP HANA in Nodejs using cds.ql

0 Kudos
1,105

Hi Team,

I was trying to Query Parameterized Views on SAP HANA CAPM in node.js service level using the cds.ql with reference to capier SAP CAPM api references for JAVA services as below link

https://cap.cloud.sap/docs/java/query-execution#queries

The below is the code that I have been trying to achieve the same as that of the capier but i get error as

My code:

data-model.cds

 entity claimApproverView (input1:String) as
   	select from EMPLOYEE_MASTER as appEmp
   	 {
             appEmp.USERID
	 } where USERID=:input1;

benefit-service.cds:

benefit-service.js:

Kindly help in understanding how to call the parameterized view from inside the service.js for Node.js service .

Thanks and Regards

Sahasranaman

pankaj9596
Newcomer
0 Kudos
Hello, Do we have any update on this? Is it supported now?

Accepted Solutions (1)

Accepted Solutions (1)

mariya_yordanova
Explorer

Hi sahasranaman_ksn,

unfortunately we don't support this in cds.ql. In your custom handler you would need to use plain SQL.

If you expose a view in the OData service, you can call it directly via URL without writing a custom handler.

See https://cap.cloud.sap/docs/cds/cdl#exposed-entities.

Best Regards

Maria

0 Kudos

Hi mariya.yordanova,

Thanks for your reply.Sure I will try with SQL approach.

Answers (0)