April 19, 2012

Different ways of table creation in SAP HANA


Hello Everyone,

In this document, I would like to explain about different ways of table creation in SAP HANA.

In SAP HANA, we can create tables in two ways.

1) Using SQL editor.

2) Using Information Modeler.

1) Using SQL Editor:

Step1: We can open SQL editor from i) Quick Launch ii) Right click on your schema --> SQL Editor iii) Right click on your system --> SQL Editor.

SQL syntax to create table in SAP HANA.

"create <table type> table <table name>(<field name1> <data type>, <field name2> <data type>, .....);"

we can create 3 types of tables in SAP HANA.

i) Column : Which stores the data on column level. This is mostly suitable for HANA data models. If we replicate tables from source, by default those will be replicated as column tables.

As we all know we get huge compression with columnar tables.

ii) Row: This tables are to store the system statistics or parameters. Sometimes Row store tables will give better performance on master data tables. however SAP HANA models gives very good performance on Columnar tables.

iii) Table Type: This tables are used to pass the parameters. These are used when we create Calculation views using SQL scripts in SAP HANA.

In this example, I am going to create table for customer information(CUST_INFO).

Step2: Open SQL editor and type the statement as given below.


Step3: Now click on arrow with green or F8 to execute this SQL statement.

Once it is successfully executed, we will get message like below


Step4: Now we can check the newly created table under our schema --> Tables like below.

Double click on the table name to display the Table Definition.


2) Using Information Modeler:

If we are not familiar with SQL, we can still create tables in SAP HANA by using graphical modeler.

Step1: Right click on your Schema in System and select 'New Table'


Step2: Now in the below screen give the Table Name, Schema and Table Type.

As we discussed already,we have 3 types of Table Types.

In this I am going to create the same table using graphical modeler.

Enter the required fileds and properties like data type, key and not null.


Use the 'Plus symbol' to add the new fields to the table.

Step4: Click on arrow or F8 to execute to deploy this table. After successful execution you will get the same message and given in first method.

Hope this document will be useful for beginners in SAP HANA. 

1 comment:

  1. This post has a lot of importance to the people…I hope you can continue to inspire and post more of this…Thanks

    ReplyDelete