on 08-10-2016 4:51 PM
Hi Friends,
I am trying to create a HANA CDS View in HANA Studio. I am not sure about the syntax to create input parameters.
Can anyone provide an example code for HANA CDS view with input parameters ?
I see there are lot of examples for ABAP CDS but not much documentations and blog about HANA CDS, just want to know if SAP is moving towards ABAP CDS ?
If anyone can provide any links to blogs or documents other than SAP HANA CDS Reference is appreciated.
Thanks,
Gokul
Hi,
Like mentioned, this is not (yet?) supported.
You could create a graphical or script based calculation view with a parameter and expose it as an XS OData service.
For this a great example exists on SCN:
Even tho I think the titel was not well chosen...
You could use this calculation view + it's parameter and expose it via an XS OData service like the example below.
// Get last five activity codes (one parameter called 'User' for example), included in file called model.xsodata
"__.global.models.timeSheet::LastWorkPckgWorkItems" as "GetLastWorkPckgWorkItems"
key ("TIME_STAMP")
parameters via key and entity;
Url to consume example:
<host:port/path to xsodata>/model.xsodata/GetLastWorkPckgWorkItemsParameters(User='ABC')/Results
Another option is to define an ABAP CDS and expose it as an OData service.
I hope this helps.
Jonathan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Gokul,
CDS has the same base but ABAP and HANA views are different. HANA views are simpler. ABAP views have way more annotations, etc.
here is the HAN CDS reference FYI
http://help.sap.com/hana/SAP_HANA_Core_Data_Services_CDS_Reference_en.pdf
and the XSA reference
CDS Views - Introduction to Application Development and Deployment (XS Advanced Model) - SAP Library
Create a View in CDS - SAP HANA Developer Guide for SAP HANA Studio - SAP Library
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Gokul,
parameters for HANA CDS Views are not supported up to now.
Best Regards,
Florian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.