In my previous document I explained how to create Schema, Tables and Sequences in SP HANA, if someone has missed please refer: HANA Artifacts
Part2

Now we will see how we can create procedures in SAP HANA. We will do all our development under project ‘Krishna_Project’ (which we created earlier : HANA Artifacts Part1).

We will create one folder ‘Model’ under our project ‘Krishna_Project’ and develop all our procedures under this.

/wp-content/uploads/2013/11/1_321015.png

How can we access SAP HANA?
We access SAP HANA using SAPScript, it acts as an interface for accessing HANA.

How can we create procedures in SAP HANA? We create procedures in HANA using SAPScript or CE Functions. We can implement imperative logic inside procedures and can declare Table Types (here tt_product) inside procedures which represent tabular formats.

/wp-content/uploads/2013/11/1_321015.png

/wp-content/uploads/2013/11/1_321015.png

Objective1:– Create a procedure to get records from table ‘KC_PRODUCT’ based on input
field (i.e. PRODUCTID).

Structure of table

/wp-content/uploads/2013/11/1_321015.png

/wp-content/uploads/2013/11/1_321015.png

/wp-content/uploads/2013/11/1_321015.png

/wp-content/uploads/2013/11/1_321015.png

How to debug:

If you are using SP7 please ref. HANA Artifacts Part3.1 (SQLScript Debugger SP7)

We should have required privileges to our USER for debugging. From Security > Users

/wp-content/uploads/2013/11/1_321015.png

/wp-content/uploads/2013/11/1_321015.png

For the first time we have to do the debug configuration.

/wp-content/uploads/2013/11/1_321015.png

Click ‘Debug’ to start debugging……

/wp-content/uploads/2013/11/1_321015.png

/wp-content/uploads/2013/11/1_321015.png

In my next document we will see how to create different Views in SAP HANA http://scn.sap.com/community/developer-center/hana/blog/2013/11/12/hana-artifacts-part4.

Till then happy learning …..

Many thanks to Thomas Jung, Rui Nogueira, Craig Haworth, Dr.-Ing. Jürgen Müller, Prof. Hasso Plattner for their wonderful efforts……

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply