Extending / Modify HANA Live Views

From: https://blogs.sap.com/2014/06/24/extending-hana-live-views/

Hi Everyone,

In this blog I will describe how we can extend HANA Live Views

I hope many of you are familiar with HANA Live.

If you are not familiar with HANA Live, then you can refer the below blog:

SAP HANA Live – Real-Time operational reporting | SAP HANA

To extend HANA Live Views we generally make a copy of it and then make changes to it as per our needs.

You can check the document given in the blog mentioned above on how to extend HANA Live Views.

Now SAP has created a new tool called SAP HANA Live Extension Assistant.

Using this tool we can easily extend Reuse Views and Query Views.

Lets start with the Installation of Extension Tool:

First download HANA Content Tools from Service Marketplace and then import Delivery Unit HCOHBATEXTN.tgz

/wp-content/uploads/2014/06/001_482232.jpg

Once this Delivery Unit is installed, we can see the extn folder as shown in the below screenshot.

/wp-content/uploads/2014/06/002_482233.jpg

It also generates a role sap.hba.tools.extn.roles::ExtensibilityDeveloper and we will need to assign this role to the User to work with this tool.

Now to complete the installation, Go to Help -> Install New Software and click on Add button and enter the details as shown below:

The path would be http://hostname:80[instancenumber]/sap/hba/tools/extn

/wp-content/uploads/2014/06/003_482240.jpg

On clicking OK, we will see the Extension tool and then we need to install it

/wp-content/uploads/2014/06/004_482241.jpg

Once this tool is installed, and we R-Click on any View, we can see the option Extend View.

This option is enabled only for HANA Live Reuse and Query Views and disabled for Private Views as shown below.

/wp-content/uploads/2014/06/006_482242.jpg

We can easily identify Query Views from HANA Studio as they end with Query but we can’t distinguish between Reuse and Private Views.

So to know which View is a Reuse View and which View is a Private View, logon to HANA Live Browser and check there as shown below.

/wp-content/uploads/2014/06/005_482243.jpg

Lets say that we want to make changes in the GLAccountInChartOfAccounts Reuse View, so we will R-Click on that view and select Extend View and then we will be greeted with the below screen

/wp-content/uploads/2014/06/021_482244.jpg

/wp-content/uploads/2014/06/009_482245.jpg

It will create a new View with the same name as the Reuse View

Here we will select the package where we want Extended View to be created.

All the fields that are present in the Reuse View are marked as Grey and we cannot change them

On the left side, we get list of all the tables that are used in the View.

These tables only show those fields that are not used in the View

So we can select any field from the table and add it, lets say we want to select SAKAN field from the table, so we will click on SAKAN field and then Click on the   button on right side of the screen, this will add it to our view

/wp-content/uploads/2014/06/010_482252.jpg

Then we will select Next… by default the Join type is Left Outer Join and we cannot change it but we can change the Cardinality of the View

/wp-content/uploads/2014/06/011_482253.jpg

On the right side, it shows fields for Join. As the table SKA1 is already used in this View, so it proposes fields for Join, we can either use these fields or add our own fields by selecting   button as shown below

/wp-content/uploads/2014/06/012_482254.jpg

Then we will Validate and Activate the View

The Extended View copies the semantic properties of the Reuse View – if Semantic Node in Reuse View is Projection then in Extended View also the Semantic Node will be Projection

Below is the newly created view.

014.JPG

We can also observe one more thing that after installing Extension tool, the Join Node and other Nodes are shown in a more elegant and colorful way

Now lets extend GLAccountInChartOfAccountsQuery  Query View

R-Click on the View and select Extend View, then we will see the below screen

/wp-content/uploads/2014/06/015_482256.jpg

By default it takes the package in which we extended Reuse View earlier

It shows us those columns which are present in Query View but are not selected in Output

We can also select our extended Reuse View and then its additional fields are also available to be added to the output as shown below

/wp-content/uploads/2014/06/017_482257.jpg

Lets select both the fields and Validate and Activate the View

Both the Views are available inside ExtTest Package as shown below

/wp-content/uploads/2014/06/019_482264.jpg

Now Lets check out the Extended Query View  and now we can see that both our selected fields are present in the View

/wp-content/uploads/2014/06/020_482265.jpg

The tool has both its benefits and limitations:

Benefits:

It is a simple tool.

It is easier to extend an existing Query or Reuse View if we just want to add additional Columns from the underlying Tables the View is already using

If we update HANA Live Views later on then out Extended View also get updated

Limitations:

It has many limitations at present

We cannot extend Query Views with Unions and we can also not directly extend Query Views in which Aggregation Node is present at levels other than Top Node(Node before Semantic Node).

At present we can not add fields from other Tables(Tables that are not used in a View) to an existing Reuse View, but hopefully this option will be available in next version

We cannot create Calculated Columns or change Filter options

Hopefully, this tool will get better with time

Regards,

Vivek

本文作者: GavinDong

版权属于: GavinDong博客

文章链接: https://gavindong.com/2423.html

如果使用过程中遇到问题,可 **点击此处** 交流沟通。

版权所有,转载时必须以链接形式注明作者和原始出处及本声明。

(0)

相关文章

发表回复

登录后才能评论