Skip to Content
Author's profile photo Naga Prakash

SAP HANA – How to create an Attribute View

Today we are going to create one of the artifacts of HANA called Attribute View.

SAP HANA has three types of views

1.Attribute View

2.Analytic View and

3.Calculation View

What is an Attribute View ?

Attribute views are like Dimension( like SAP Business Warehouse).These are view on one more tables built using joins.(like we create Database views in ABAP).

These are reusable artifacts and can be used in other views like Analytic view.


In this section we use the EPM data model shipped with SAP HANA system to create an attribute view.We use business partner data spread across different tables.The business partner information is needed wide across the system and hence we will be creating a reusable attribute view.

  1. All the artifacts are created under Content folder under a custom package.H1.png
  2. Enter the attribute view name and description and click on Finish.

H1.png

3. You will see the Graphical designer like below.

    H1.png

4. Drag the table to the Data Foundation for which you want to create attribute view.I have selected SNWD_BPA and SNWD_AD.After you have add the tables screen will look like this.Join the tables with a common field in my case ADDRESS_GUID.

   H1.png

5.Select the fields to be displayed(out put) from both the tables. You can see the output fields selected under Out put–>Columns. You can also create a calculated column in attribute view.

    H1.png

6.You can also define the join type and cardinality under properties by clicking on the join link.

    H1.png

  7. For Attribute View you must have at least one Key Attribute. Click on Semantics go to Column tab to set the key attribute.

      H1.png

  8. Now your Attribute ready.Check and activate.After activating you can see the attribute view under package right click–>Data Preview to see the data.

     H1.png

Output

    

     To preview data you need SELECT privilege on the attribute view.if you are using HANA Cloud Platform please run the this stored procedure to gain SELECT privilege – CALL “HCP”.”HCP_GRANT_SELECT_ON_ACTIVATED_OBJECTS”.

  

  H1.png

Assigned Tags

      17 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Hi Prakash,

      The above tutorial is really helpful, with all the pictorial specific reference it's superb.... 🙂

      Thanks,

      Kumar Santharam

      Author's profile photo Naga Prakash
      Naga Prakash
      Blog Post Author

      Thank you santharam.. !

      Author's profile photo Former Member
      Former Member

      HI prakash,

      THis Tutoriol is very much helpful , Great work .

      Best Regards,

      Neelima Reddy

      Author's profile photo Naga Prakash
      Naga Prakash
      Blog Post Author

      Thank you Neelima,

      Author's profile photo Tatjana Schumakowa
      Tatjana Schumakowa

      Hi Prakash,

       

      where can i download this demo db, with this schemas/data from your screenshots ? I downloaded SHINE HANA demo db, but there are another tables/data.

      Thank you

       

      Author's profile photo Priyanka Joshi
      Priyanka Joshi

      very nice blog and screenshots 🙂

      Regards,

      Priyanka Joshi

      Author's profile photo Naga Prakash
      Naga Prakash
      Blog Post Author

      Thank you Priyanka

      Author's profile photo Narendra Reddy
      Narendra Reddy

      Hi Prakash,

      Very nice blog 🙂

      Thanks,

      Narendra

      Author's profile photo Former Member
      Former Member

      Hi Prakash,

      Can you please elaborate little more on Point 7 .. 

      What is the significance of the Key attribute?

      Why do we define it?

      What is the benefit?

      What should I keep it in my mind while defining a Key Attribute?

      Like Shreepad Patil, even I am searching for the Correct Answer (pfb thread).

      https://scn.sap.com/thread/3419464

      Thanks,

      Shirish.

      Author's profile photo Arun Das
      Arun Das

      Hi Naga,

      Great Job.Its really helpful.

      Expecting more on various functionalities in SAP HANA.

      Thanks & Regards,

      Daz

      Author's profile photo Naga Prakash
      Naga Prakash
      Blog Post Author

      Thank you Daz.. !

      Author's profile photo Former Member
      Former Member

      Naga,

      Iam getting SAP DBTech JDBC: [258]: insufficient privilege: Not authorized

      when I try to see the Raw Data of attribute view

      Please help where am I missing

      Thanks

      Viv

      Author's profile photo deba nayak
      deba nayak

      Did you try the last step?

      Author's profile photo Mateusz Nowak
      Mateusz Nowak

      Hello, in order if you have such problem, please go to the Console in HCP and then RUN (F8) this code:

      call "HCP"."HCP_GRANT_SELECT_ON_ACTIVATED_OBJECTS"

      Author's profile photo Nagaraju M
      Nagaraju M

      Hi Naga Prakash, I Had seen your blogs simply very good and it can be understood very quickly and easily. So here i need some clarifications and with differences on below technologies. 1.SAP HANA and SAP S/4 HANA. 2.SAP Fiori And UI5. 3.OData And XS OData. How it will be useful to end user. As an ABAP Consultant what are concepts we can learn for futuristic requirements for clients. It will be useful if you can revert with more briefly. Many Thanks in Adv. Regards, Nagaraju

      Author's profile photo Former Member
      Former Member

      HI ,

       

      Can I create Attribute and analytical view using SAP Cloud based DB system.

      if we can create can any one share the link how add the Cloud DB into HANA studio.

       

      Thanks ,

      Mahesh

      Author's profile photo Former Member
      Former Member

      Thanks Naga prakash.

       

      Regard,

      Pappu.