cancel
Showing results for 
Search instead for 
Did you mean: 

Procedure and views

venkatesh_veera2
Participant
0 Kudos

Hi All,

I'm totally new to SAP HANA.

Searched for the difference between procedures and views but unfortunately not able to find the one.

Can someone please explain me the difference between them.

Thanks in advance.

P.S. I totally agree that this sort of question come under basic stuff. but to my bad luck I didn't find anything in the web to clear-out by doubt.

Kind Regard's,

Venkatesh

Accepted Solutions (0)

Answers (3)

Answers (3)

SergioG_TX
Active Contributor
0 Kudos

Venkatesh,

first of all, welcome to the world of SAP HANA

as Andreas mentioned...and just to add a few things

View will give you the ability to read from tables or views themselves. they will be read only and they can expose your data for reporting purposes or even transactional purposes. Moreover, views can be exposed via XSOdata (as an odata web service). Views return outputs in the form of tables.

procedures are reusable pieces of code that can perform more than just read operations. They can also perform insert/update/delete operations against a transactional table in your HANA DB. procedures themselves can be consumed from the XS engine. Procedures can be invoked by XSJobs in case you need to run them on a schedule. Procedures may take simple inputs (INTEGER, VARCHAR, etc) and may return outputs (simple and complex) such as a structure .. Procedures may return more than 1 output parameter.

hope this helps! happy coding.

venkatesh_veera2
Participant
0 Kudos

thanks for the response Andreas

Kind Regards,

Venkatesh

former_member183045
Contributor
0 Kudos

A procedure is a "piece of code". It can select table, views, process this order, make errorhandling, ...

and can return from a boolean to tables everything

https://help.sap.com/saphelp_hanaplatform/helpdata/en/20/d467407519101484f190f545d54b24/content.htm

A view is a perspective on one or more tables. The basic type in HANA is simular to other databases. Hana has additionally some "view types"

Create an SQL View - SAP HANA Developer Guide for SAP HANA Studio - SAP Library

Well there would be a lot more to say but with the two starting points above I hope you can dive into HANA 🙂

Regards, Andreas