Skip to Content

     “In Memory Computing ” is heard all the time with regards to SAP HANA. SAP HANA is a dynamic, flexible and efficient tool that allows to hold and analyze massive volumes of data in near real time. HANA is not just Hardware but its a combination of software and hardware to optimize the massive amount to data in row-bases, column based and object-oriented data base. Still, the heart of SAP HANA is its DATABASE.Compression is one of the key features of SAP HANA. Another key feature is SAP HANA storage techniques and its ability to process data. A 360 Degree view for the customer to understand the clear and complete picture is where HANA pitches in. This opens the world of new possibilities and efficient decision making power for the business.

SAP HANA Studio Overview and Terminology:

     SAP HANA studio is the one stop tool for the developers in HANA landscape for defining the tables, setting up data provisioning and making data models in HANA. Below we will see the different modeling capabilities if SAP HANA Studio, taking a hands-on approach to modeling using real-life examples. The basic modeling in Studio includes attribute view, analytical views and calculated views. Studio is a one stop solution for both modeling and administration process. Studio also serves a tool in which you start and stop the data feeds from external system using the SAP Landscape Transformation tool(SLT), HANA studio is organized into perspective. A perspective gives us all the information functions and tools need to accomplish the tasks. Developers have their own preference in working with screens and hence perspective can be customized.

The following standards perspective are offered by SAP.

  • Administration Console
  • Modeler
  • Debug
  • RCP Perspective
  • resource
  • SVN repository Exploring
  • Team Synchronizing.

At its most basic level, data in SAP HANA is organized and stored in tables. Each field in table is classified either as an attribute or a measure.

  • An attribute is an entity that qualifies in data. Example. Airline Code , Material and Customer.
  • A measure is an entity that qualifies something. Example : Amount and Quantity.

To use HANA Studio, you model information views. There are three types of information views.
     1) Attribute Views : In the language of SAP Netweaver Business Warehouse , attribute views are like Dimension, but with difference is that attribute views are fully reusable throughout the system and not stuck up to a single model. Simplifying, these are views on one or more table that can be reused for different purpose.

Example : An attribute view “FLIGHT” can  show together Airline Code, Airline Connection Number and flight Date into one Object. This attribute view can be used in analytical and calculation views where entities are relevant. Generally attribute views represent master data.But, however technically there is no restriction and its possible to make attribute views on transaction data.

    2) Analytical Views :  Again, in the language on SAP BW analytical views can be roughly compared with Info Cubes or Info Sets in SAP ERP. As same it joins together one central fact table with contains transaction data  to report on, with number of tables or attribute views. You can create variables in an analytical view.

     3) Calculation views : Calculation views can be referred as combination of tables, attributes views and analytical views to deliver a complex business requirement. They offer to combine different analytical views into one source of data for reporting.

Roughly, we can now compare the three different types of information views to SAP Netweaver BW objects.

HANA Information View

      SAP BW Object   

Attribute View Dimension
Analytical View Info Cube
Calculation View Multiprovider

                              Table 1.1

Please note this is just a rough comparison and you should not be confused by exact resemblance SAP HANA information views has much to offer in terms of reusability and performance.

     We will be now focusing of creation of attributes views. Before going into detail, we will first try to understand how attributes view behave and how we can improve the performance still retaining the reusability factor. To understand in detail we will be using FLIGHT DATA Model of SAP , using tables, SCARR, SPFLI and SFLIGHT. The diagram below shows mapping of the tables and how master data is linked to each other to achieve a reusable attribute view.

   
t15.jpg

                                                Fig 1.1

Important points to keep in mind while creating attributes view :

  • Attribute views should be smaller for better performance.
  • Each attribute view should be at best possible level of detail.
  • The fewer the joins the faster the performance is.

Getting Started with HANA Information Modeler

Here, I will be showing you step by step process of how to create attribute view with help of screen shot.

1) Log on to SAP HANA System:

     The initial log on looks similar to the the below screenshot. The left hand side is the NAVIGATOR Pane. The options and the properties of Navigator changes according to which perspective you are in, but in general you will find the system added to SAP HANA.

t1.jpg

                                                                 Fig 2

At the bottom of the modeler is the PROPERTIES pane. Properties pane display specific property that will be of the selected object in the center pane.

The right hand side is a pane that contains access to cheat sheet , system help documentation and other.

2) Adding System :

       2.1 Right click on the empty space on the navigator pane and Choose Add System or you can also use the Cheat sheet on the right hand side of the modeler as a task to understand how to add a System.

       2.2   A popup window will appear in which ewe need to give details of the system that we want to connect. Fill the details and press next.

       2.3 Fill the required user id and password .

       2.4 The system gets added , which can be seen in the navigation tab of modeler

T2.jpg

                                                                 Fig.3

3) Opening Perspective:

     In the administrative perspective the catalog objects are displayed. The catalog contains list of available schemas in the data base. A schema is a group of physical tables on the data base. One can expand the schema and see the tables present underlying. To see and edit those objects , we need to switch from Administration Perspective to Modeler Perspective

To open perspective , Go to menu “WINDOWS♠Open Perspective♠Other and choose Modeler option in the popup window. After switching on to the Modeler Perspective , a second node just below the system in the navigation pane with Caption as “CONTENT”  comes in picture.  The Content node contains all the modeled object such as all the information views. In the Modeler perspective one can see the central pane changes to “QUICK LAUNCH” button.

t4.jpg

                                                                 Fig.4

        3.1 Using Quick Launch Menu : As shown in the screenshot below there are various option which quick launch provide so that one can create objects in SAP HANA modeler directly without going to the Content.

Create Package :

It is important to first create package.  Information views are organized inside packages, which are grouping of the information objects. This is logical grouping of related objects and is differnt from schema. There are two kinds of packages. – Structural and Non Structural packages.  A non – Structural package can contain information views like attribute views, analytical views and so on. A structural package contain other packages. Packages don’t limit the ability to use and reuse the objects throughout the system.

To create a package ,

  • Go to the Modeler perspective.
  • Go to Content and Right Click and click Package.
  • Or from QUICK LAUNCH menu, Click Package.
  • Give the desired technical name, its description. and press OK.

t8.jpg

                                                                 Fig.6

Note: Each package is empty in beginning, you can create attribute view, analytical view or calculation view inside your Package.

Create Attribute view :

In this section , we will see step by step guide of how to create attribute view. We will get familiar with the basics mechanics of working with views in HANA studio.In this information model we will be needing information about the business partner, Flight Partner Number,Customer name or travel insurance name and so on.

The business partner information is needed wide across the system and hence we will be creating a reusable attribute view.

Option 1 : From Package: To Create attribute view, right click on the package and choose New and then attribute view.

screen1.jpg

                                                                 Fig.7

Option 2: From Quick Launch, choose Attribute view, and then click Create button( choose the correct Package)

2.jpg

                                                                 Fig.8

Choose the correct type of Attribute view required.

  • STANDARD : Give you empty attribute view
  • COPY FROM : One can easily copy from an existing attribute view, if you know that the required fields are present in the
    existing attribute view. This is a quickest way to create attribute view and also using the reusability factor.
  • TIME will create both view and data for time attributes – data month etc.
  • DERIVED :will create  new attribute view with the existing one , but with same definition and an new name

1) Click on create Attribute view with Standard option.

  • Give technical name of the attribute view.
  • Give description of the attribute view

3.jpg

                                                                 Fig.9

2) You will get attribute view created. But still there is no data

4.jpg

                                                                      Fig.10

3) Drag and Drop the fields in the DATA FOUNDATION in the Scenario TAB. As soon as you drop the table you will see the tables in the details tab. There is no number of limits of how many tables can be added. You can add any table in the system from any number of Schemas. It is important to have data model in advance to understand and add only the desired tables , and not make the attribute view bulky.

5.jpg

                                                                           Fig.11

4) Creating table joins : Table joins links the different tables of the attribute view to achieve the desired output. You can arrange the table’s according
to your model. And then create the joins.

There are two different types of joins :

  1. The join between tables with attributes is a standard joins.
  2. The join with text tables are of special types are called text joins.

To create a join simply drag and drop the field on one table and join in the other table. . The properties in the PROPERTIES pain displays the properties of selected objects. Generally one dont have to change the properties. 6.jpg

                                                                 Fig.12

Differnet types of joins and where they can be used are described in table below.

Join Type

Result

Use

Inner

Rows where there is atleast one match between both tables.

Attributes views and analytical views.

Referential

An inner join where referential integrity  is assumed.

Attributes views and analytical views.

Left Outer

All rows from the table. Even if there
  is no match in right table.

Analytical views

Right Outer

All rows form the right table, even if  there is no match on left table.

Analytical and attribute views.

Full

All rows from both tables, regardless  of whether they match.

Attribute views

Text

Retrieves description for codes.

TO join text tables.

                                                                                     Table.2

   To modify join type and cardinality , simply click in the VALUE field in the Properties pane and select desired value from the drop down.

Note: For text joins, the cardinality is 1:1. If the text is language –dependent, your should specify the “LANGUAGE Column” property.

Putting Filter:

You can also add filter to the fields if you want.

  •   Right Click on filed and Click “APPLY FILTER” .
  •   Select the desired value.

7.jpg

                                                                      Fig.13

Click on value and you can see all the set of possible values to put filter on. The values comes up just like search help in SAP from the Data base tables.

8.jpg

                                                                 Fig.14

The final joins looks like the below screen shot.

9.jpg

                                                                 Fig.15

Creating Output Of attribute view:

After creating the view now you can define the output of the attribute view. Not all fields are needed to for the output. Here you have option to choose which fields you want to display which not. Another important point while creating the view  should be kept in mind. The system doesnt automatically creates the key of the output table. Hence to reuse the attribute view later and join it other view, there must be key defined for the end result.

First drag and drop the fields on the Output Pane  or Right Click on the field and Click “ADD TO OUTPUT”

10.jpg

                                                            Fig.16

As soon as you add the field they start appearing on the Right hand side OUTPUT PANE.

  1. Another important point that needs to be kept in mind. Don’t forge to add a attribute as key. Other wise you wont be able to reuse the attribute again . in This case I will be adding MANDT and BUSPARTNUM as key.  Right Click the field in the Output pane.   Choose the option Convert to Key Attribute.

12.jpg

                                                                 Fig.17

Saving and Activating View:

ON the extreme right corner just above the Output pane you will find the “SAVE AND VALIDATE “ button.

  • Click on the SAVE AND VALIDATE button. The bottom of the window shows the job log and status.
  • Click on “SAVE and ACTIVATE “button net to the previous button to activate the Attribute view .

13.jpg

                                                                 Fig.18

Display Output:

To display the output:click on button “DATA Preview” just  next to the “SAVE and ACTIVATE”button. The data preview takes you to the below screen. Here you just need to put the proper field in the proper rows or columns. It is quite similar to the Bex Analyzer where you put in rows or column. But here you have LABEL and VALUES. In the values only count will come.

A window similar to the below screen shot will open. Now you can drag and drop the fields according to the rows and column and corresponding data will appear in the next Window pane.

14.jpg

                                                            Fig.19

HANA provides the option to display data in chart, Table, Grid or HTML. As you change the Label and the Value parameter you can see the Chart changing at the run time. The below screen shot is a snap shot of 2 fields added in the output label.

15.jpg

                                                                 Fig.20

Now we know step by step process of how to make Attributes view.

Related Content :

1) SAP BW on HANA Cookbook

2) Learn

https://www.google.co.in/url?sa=t&rct=j&q=&esrc=s&frm=1&source=web&cd=7&cad=rja&sqi=2&ved=0CEMQFjAG&url=https%3A%2F%2Fcookbook.experiencesaphana.com%2Fbw%2Fmodeling-data%2Fmodeling-concepts%2Fviews%2F&ei=ClUTUs3AHI7GrAe12ICABQ&usg=AFQjCNF0qSll1R0bwzjjHIkr2tz4N968sQ&bvm=bv.50952593,d.bmk

To report this post you need to login first.

3 Comments

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

    1. vivek singh Post author

      Hi Ranjith,

      Thanks for the info , but this is quite a old blog, and i am not sure why all of a sudden the images are not appearing. I am preety sure they were appearing before. Might be some flash issue.

      Regards,

      Vivek

      (0) 
      1. kishore babu

        HI Vivek,

        In Attribute view i have the following questions:

        1. Can we write our own sql ( adding extra field that doesn’t exist in base tables).

        2. In attribute join condition can we use not in condition or not exists operator.

        3. Can we do datatype conversion in attribute view from sap hana datatype to oracle datatype.

        Please let me know your thoughts.

        Regards

        Kishore.

        (0) 

Leave a Reply