SAP HANA User Handbook

While working with SAP HANA, there is a lot that you need to remember, various operations, functions, commands, and their syntax and whatnot. Wouldn’t you agree that it would be better if you could find all of that in one place that you can refer to anytime? We, at intellipaat, understand that our learners may need a quick handy reference that they can trust and use and that is exactly why we have come up with this SAP HANA cheat sheet.
This cheat sheet is designed for those who are familiar with SAP HANA and need a reference to get started with SAP HANA.
Download the printable PDF of this cheat sheet
SAP HANA Cheat Sheet

Architecture:

It is an application that is a main-memory centric that supports pure SQL for traditional apps as well as an interaction model specialized for the needs of SAP apps.

  • Index server: Holds all the data tables and temporary results. Thereby, occupying most of the used space.
  • Preprocessor server: This is used in Text Analysis and extracts data from a text when the search function is used.
  • Name Server: This Server contains all information about the system landscape. In a distributed system it contains info about the running component and the location of its data.
  • Statistics Server: Responsible for data collection related to the status, resource allocation and consumption of the system.
  • XS Server: Contains the XS Engine. Enables the external apps and devs to access the DB via the XS Engine.

Go through this SAP HANA Course in Sydney to get a clear understanding of SAP HANA!

ARCHITECTURE

Components: 

  • SAP HANA DB: It is an in-memory, column-oriented, relational database management system. Primarily used to store and retrieve data for requesting apps.
  • SAP HANA STUDIO: It is an eclipse based IDE that acts both as a development tool and as the central admin tool.
  • SAP CLOUD APPLICATION: It is a PaaS system that provides an environment for development and runtime for cloud apps. It is open-source hence allows ISV and startups to create and test HANA cloud apps.

Come to Intellipaat’s SAP HANA Community if you have more queries on SAP HANA!

SAP HANA SQL:

  • To enable SQL commands in HANA DB
    • hdbsql -i 42 -u myuser -p mypassword “select * from sys.users
  • To display all schemas from the DB
    • Select * from schemas
  • To display all tables
    • Select * from tables
  • To display all users
    • Select * from sys.users
  • To find out the log mode
    • SELECT value FROM “SYS”.”M_INIFILE_CONTENTS” WHERE KEY=’log_mode’
  • To create a table
    • create table table1(varchar(20))

Data Types:

TypeSub-TypeSQLColumn Store
date/timedateDATECS_DAYDATE
timeTIMECS_SECONDTIME
2nd dateSECONDDATECS_LONGDATE
NumerictinyintTINYINTCS_INT
Small intSMALLINTCS_INT
integerINTCS_INT
Big intBIGINTCS_FIXED(18,0)
decimalDECIMAL(p,s)CS_FIXED(p-s,s)
floatFLOAT(n)CS_DOUBLE
booleanbooleanBOOLEANCS_INT
charactersVariable lengthNVARCHAR(n)CS_STRING
Alpha- numericALPHANUM(n)CS_ALPHANUM
Binary typesBinary textVARBINARY(n)CS_RAW

Operators:

  • Arithmetic operators:

    • Addition(+)
    • Subtraction(-)
    • Multiplication(*)
    • Division (/)
  • String operator:

    • Concatenation ( ||)
  • Comparison operator:

    • Equal to (=)
    • Greater than(>)
    • Lesser than(<)
    • Less than or equal to (<=)
    • Not equal (!=)
  • Logical Operators:

    • AND – only if both conditions are true, will return true
    • OR- If Condition1 OR Condition2 is true, then combine condition is true or false if both Conditions are false.
    • NOT- condition is true If Condition is false.
  • SET operators:

    • UNION – Combines two or many select statements or queries without duplicate.
    • UNION ALL – Combines two or many select statements or queries, including all duplicate rows.
    • INTERSECT – Combines two or many select statements or query, and return all common rows.
    • EXCEPT – Takes the output from the first query and removes row selected by the second query.

Want to get certified in SAP HANA. Learn from our SAP HANA expert and do excel in your career with intellipaat’s SAP HANA Admin certification!

SQL Functions:

  • Data type conversion function: CAST, TO_BIGINT
  • Date functions: ADD_DAYS, ADD_MONTHS
  • Full-text functions: used for text search: SCORE
  • Number functions: ABS, ROUND, POWER
  • String functions: ASCII, CHAR, CONCAT
  • Window functions: RANK(), DENSE_RANK().
  • Others: CONVERT_CURRENCY, CURRENT_SCHEMA

SQL Expression:

  • Case Expressions: IF, THEN, ELSE
  • Function Expressions: SQL functions (built-in) are used
  • Aggregate Expressions: COUNT, MIN, MAX, SUM, AVG, VAR.

Stored Procedure:

It is a piece of code that does a particular task.
General Syntax:

  • CREATE PROCEDURE <proc_name> [(<parameter_clause>)] [LANGUAGE <lang>]
    [SQL SECURITY <mode>] [DEFAULT SCHEMA <default_schema_name>]
    [READS SQL DATA [WITH RESULT VIEW <view_name>]] AS
    {BEGIN [SEQUENTIAL EXECUTION]
    <procedure_body>
    END

Sequence and Trigger:

Sequence creation:

      • CREATE SEQUENCE <sequence_name> [<sequence_parameter_list>] [RESET BY <subquery>]

Trigger creation:

      • CREATE TRIGGER <trigger_name> <trigger_action_time>  <trigger_event_list>

ON <subject_table_name> [REFERENCING <transition_list>]
[<for_each_row>]
BEGIN
[<trigger_decl_list>]
[<proc_handler_list>]
<trigger_stmt_list>
END

HANA SLT:   

  • It is an ETL tool that enables you to load and replicate data in real time from a source and non source system into the HANA DB.
  • It uses a trigger-based replication to pass data to and fro into the system.
  • A database user with the same authorization as SYSTEM can initiate a connection to the SLT.

ADMIN CONSOLE:

System Monitor:

    • Landscape: It is the layout of the servers and the architecture of the server systems.
      • Three different types:
  • DEV- would have multiple clients like 190-Sandbox, etc.
  • QAS- may have multiple clients like 300- integration test, 700-710 training
  • PRD- will have 200 production

Admin View:

      • System status: A status the system sets internally that tells the user that a transaction was done.
      • Available memory: it denotes how much of the total allocated memory is still available to the user.
      • CPU usage: it can display CPU usage for the past 24 hrs. It can display daily average CPU utilization for a single server and across systems for the past 30 days. This information is an input for load balance analysis.

Get ready for the SAP HANA jobs with these Top SAP HANA Interview Questions and Answers!

Activities:

    • start/stop/backup/recovery instance
    • To monitor the system
    • Configure the engine instance
    • Problem analysis

Catalog Node:

  • A database schema enables you to logically group together objects such as tables, views, and stored procedures. A catalog cannot be written without first defining the schema.
  • Physical Table: A Sap table consists of one or more fields each which are defined with a data type and length. Typically a large amount of data is split up between various fields.

Interested in learning SAP HANA? Enroll in our SAP HANA Training now!

Perspective: 

They are a collection of screen elements that are designed specifically for a user such that all screens required for his/her daily actions are stored such as modeler or admin.

Content Folder:

Views:

  • Attribute view: provides a description of the characteristics of the data stored. Considered as master data that defines the relationship and the hierarchy of data stored.
  • Analytic views: They construct a central master fact table with key figures. We use the operator’s functions and expressions to analyze the said data.
  • Calculation view: built on top of one or more analytic or attribute view. It provides a way to do flexible, complex logic in the DB.

Download a Printable PDF of this Cheat Sheet

This cheat sheet has covered all the basics of SAP HANA that you need to know. Check out the SAP HANA Certification provided by Intellipaat where you will learn all about SAP in more detail. This training course will help you master SAP HANA and in-memory database management systems. You will also learn about SAP HANA Studio, SAP HANA Modeling, SAP HANA Security features and various other aspects of SAP HANA. And if you get stuck anywhere, all you must do is reach out to us and we will help you with any query you might have. You will have 24*7 technical support from us.

 

Recommended Videos

Leave a Reply

Your email address will not be published. Required fields are marked *

Solve : *
25 + 9 =