cancel
Showing results for 
Search instead for 
Did you mean: 

Calculation View

siba_pkd21
Participant
0 Kudos

Hi All

Please let me know How a user access a Calculation View from Fiori / Odata ?

Accepted Solutions (1)

Accepted Solutions (1)

pfefferf
Active Contributor

You can expose a Calc. View as an OData service which can be consumed in a UI5/Fiori app.

If your calc. view has no key, you can use the OData Key Specification to define one. Support for Calc. Views with parameters is there too (OData Parameter Entity Sets).

siba_pkd21
Participant
0 Kudos

Thank you very much Florian .

Answers (1)

Answers (1)

former_member651643
Participant
0 Kudos

Hi Siba,

Are you creating your calculation view on XS CLASSIC or XS ADVANCED?

If you are creating it on xs Classic you simply go to Repository create any package or use any existing one

Create new xs application there which by default provide you 2 files .xsapp and .xsaccess and in the same package create xyz.xsodata file in that file use code to create an entity and save it and run it, you will odata.

Once your odata is done create a destination for the odata and use it in any fiori/ui5 application you want.

siba_pkd21
Participant
0 Kudos

Thanks a lot Ahmed!

Can you please let me know how to create the destination for the odata? Is it through XS HTTP Destination Configuration ?

also under application development, there are 2 options

- UI5 Application site

- UI5 Catalog

Do we need to consume the respective odata in one of the above ?

kk.png

former_member651643
Participant
0 Kudos

Hi Siba,

I can help you more if you please let me know if you are using XS CLASSIC or XS ADVANCED.

For destination creation , please follow steps in this blog https://developers.sap.com/tutorials/cp-cf-create-destination.html

siba_pkd21
Participant

Hi Ahmed

I am using XS CLASSIC.

former_member651643
Participant
0 Kudos

Ok, what i understood is that you want to create xsodata on xs Classic and than you want to use that odata to create a UI5/FIORI APPLICATION.

The simple step is first create xsodata and get the url of your xsodata just by simply running it.

Secondly open your sap cloud platform and there add destination there, there in url give your xsodata url, use basic authentication and provide your hana credentials for database.check url i gave in previous comment.

Once destination is setup you simply open webide and create an application there from template when you are on Service selection screen, In Service Catalog you will see your xsodata entity.

P.S xshttpdest is something when you want some data from an existing API, like you have one API which give stocks updates each day and you want to store that data into tables.

Hope you got your answer😊

former_member651643
Participant
0 Kudos

And to create XSODATA from calculation view, You can use my this blog

http://ahmedkhan29789.blogspot.com/2016/08/how-to-create-fiori-analytical-tiles-on.html?m=1

former_member651643
Participant
0 Kudos

Hi Siba, if you my answer worked for you kindly mark the answer as accepted 😊