cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP HANA SQL scripting

Former Member
0 Likes
661

Hi,

I have few doubts on HANA SQL Scripting.

What is the main use of HANA SQL scripting ,stored procedure in HANA.

If want to do any data calculation, we can do them while data loading it self  using data services tool ( when source is NON- SAP) or in HANA modeling level using Calculation attribute view. when the Source system is SAP we can do them by writing ABAP code and configuring the include name at system table level, that ABAP code can get executed during execution.

Can you please clarify what is the main purpose of SQL scripting i.e data extraction, insertion , calculation, Procedure statement etc....

In what cases we can find the importance of usage.

Santhosh


View Entire Topic
rindia
Active Contributor
0 Likes

Dear Santhosh,

SQLScript is a set of SQL extensions for SAP HANA database which allow developers to push data intensive logic into the database.

 

It should be used in cases where other modeling constructs of HANA such as Attribute views or Analytic views are not sufficient.

It is not good idea to do data calculation before data loading using BODS / SLT / DXC based on the current business need as in future one does not know how the business need changes.

That's why better to load the data in HANA and based on the requirements we can do modeling.

SQLScript is highly famous for its CE plan operators and using this data logic can be processed with great speeds.

CE plan operator does the data transformation functionality internally and used in definition of functions. It is an alternate to using SQL statements.

One example is:

with_tax = CE_PROJECTION(:product, [“CID”, “CNAME”, “OID”, “SALES”,

                  CE_CALC('”SALES” * :vat_rate', decimal(10,2)) AS “SALES_VAT”],

                   ''”CNAME” = ':cname''');

Is equivalent to

with_tax2 = SELECT cid, cname, oid, sales, sales * :vat_rate AS sales_vat

                       FROM :product

                       WHERE cname = ':cname';

Still want to know more then please refer to http://help.sap.com/hana/hana_dev_sqlscript_en.pdf

Regards

Raj