Book Image

SAP HANA Cookbook

Book Image

SAP HANA Cookbook

Overview of this book

SAP HANA is a real-time applications platform that provides a multi-purpose, in-memory appliance. Decision makers in the organization can gain instant insight into business operations. Thus all the data available can be analysed and you can react to the changing business conditions rapidly to make decisions. The real-time platform not only empowers business users and top management to make decisions but also provides the capability to make decisions in real-time.A practical and comprehensive guide that helps you understand the power of SAP HANA’s real-time and in-memory capabilities. It also provides step-by-step instructions to exploit all the possible features of the SAP HANA database, enabling users to harness the full potential of this technology and its features.You will gain an understanding of real-time replications, effective data loading from various sources, how to load data, and how to create re-usable objects such as models and reports.Use this practical guide to enable or transform your business landscape by implementing SAP HANA to meet your business requirements. The book shows you how to load data from different types of systems, create models in SAP HANA, and consume data for decision-making. The book covers various tools at different stages creating models using SAP HANA Studio, and consuming data using reporting tools such as SAP BusinessObjects, SAP Lumira, and so on . This book also explains the in-depth architecture of SAP HANA to help you understand SAP HANA as an appliance, that is, a combination of hardware and software.The book covers the best practices to leverage SAP HANA’s in-memory technology to transform data into insightful information. It also covers technology landscaping, solution architecture, connectivity, data loading, and setting up the environment for modeling purpose (including setup of SAP HANA Studio).If you have an intention to start your career as SAP HANA Modeler, this book is the perfect start.  
Table of Contents (16 chapters)
SAP HANA Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Creating procedures using SQLScript


Procedures are a set of statements that are reusable. We use SQLScript to create stored procedures. It is required that you know the basics of the SQLScript language before creating procedures.

Getting ready

To create SQLScript procedures, we should have a basic knowledge of SAP HANA SQLScript.

How to do it…

Open SQL Console for the specific schema where the procedure has to be created or create the procedure from Quick Launch. A sample procedure is shown in the following code snippet:

CREATE PROCEDURE SAP_HANA_COOKBOOK LANGUAGE SQLSCRIPT AS BEGIN
INSERT INTO CUSTOMER_INFO values (1,'CUSTOMER1', 1,'INDIA');
INSERT INTO CUSTOMER_INFO values (2,'CUSTOMER2', 1,'INDIA');
END;

How it works…

In the preceding section, we saw a code snippet that will create a procedure. The syntax to create a procedure is shown in the following code:

CREATE PROCEDURE <schema>.<procedure_name>
{({IN|OUT|INOUT}
param_name data_type {,...})}
{LANGUAGE <LANG>} {SQL SECURITY...