When we use Hana Studio to view an complex VDM, we often meet following challenges:

  • We are very interested in the calculated columns, but we don’t know which nodes have the calculated columns. We need open one by one to check
  • We want to know how one column coming from: whether rename from a to b then to c, or be calculated from several other columns. In Hana Studo, we need open the node one by one, then manually check the columns part, then remember the relationship.
  • Some calculated column is very complex, the if/then/else nested for so many level, it is very hard to understand the complex expression
  • One VDM call other VDM, we need open the related VDM one by one. We can’t jump from one VDM to other VDM easily
  • Lack the overall information. For example, we want to know how several column mapping from the related VDM or tables
  • Sometime the Hana Studio is so slow. We need connect to HANA Server to see the VDM

In order to solve those challenges, recently I developed a Web Based Hana VDM Explore using SAPUI5. ( As currently the HANA Web-Based Development Workbench don’t support display the VDM in graphic, detail see What´s New? SAP HANA SPS 07 Web-based Development Workbench )

How to use:

Just open this url in IE9 or Chrome: (user name/password: anzeiger/display ) (Only work inside SAP, if use interested outside sap, i can provide outside access later) https://ldciuxd.wdf.sap.corp:44329/sap/bc/ui5_ui5/sap/VdmExplore/index.html?sap-client=902

how to run it locally:

Download the attachment from end of this blog and extract it to you computer ( as now it can’t directly upload the zip file, so after you extract it, please change the name from VdmExplore.zip.txt to VdmExplore.zip and extract it again), double click ‘index-local.html‘ to run it.

It include 3 VDMs just for show case. You can press the ‘Load Files…’ button to load your VDM file ( one time can load multiple files), and press ‘Add Package’ or ‘Del’ to manage the package.

How to save VDM into your local computer:

There are 3 solutions:

  1. In hana studio, click the ‘Repository’ tab, select the package, then right click mouse to ‘check out’, then it will save to local computer
  2. In hana studio open the VDM, choose the ‘Display Repository XML’ in the right top, then save it as local file ( like following snapshot)
  3. Use the Hana Web-Based IDE, click the VDM file, it will display the xml content, select all, then save to computer.

SaveXml.png

Main Screen:

/wp-content/uploads/2014/05/main_445694.png

There are three main parts in the main screen ( the layout similar as the Hana Studio main screen):

Hana Package Part:

User can add package by press ‘Add Package‘ button, and load the VDMs from file by press ‘Load Files…‘  Just click one VDM to show detail information in the left part.

VDM Node Part:

This part shows the VDM as an tree. Click one node to show the detail information in the ‘Node Detail Part’

Node Detail Information Part:

This part shows the detail information about one node. For the topmost Semantic node, it will show the depended Tables and VDMs and the Input parameter/Variables. For the other node, show the calculated column and normal columns.

VDM Semantic Overall information

Just choose the topmost semantic node, the overall VDM information will show like following picture: the depended VDM (just click to open), tables and input parameters.

VdmOverall.png

Input Parameter Information:

Click the ‘Show Details’, it will show all the input parameter / variables information, include the name, description, type, mapping
InputParam.png

How to track the column path ?

TrackPath.png

We often want to know how a column coming from other nodes.  Just select that column and press ‘Track Path‘,  then it will high light the nodes which have relationship with this column. Just like the above picture, it will mark the node use red block and show the detail in text: rename from A to B, or …  Press ‘Clear Track‘ to clear the tracking mark.

Show the calculated column in formatted style

In Hana Studio, we need click one calculated column to show the detail information. With this tool all the calculated column display in a table in the formatted style.  Further more, user can easily know which node have the calculated column / filter by just check the node icon.  With the C in left top corner means have the calculated column, with the F in the left bottom corner means have the filter expression

CalculatedColumn.png

Display complex expression in friendly way

In hana Studio, it is very difficult to understand some complex nested if expression. Just like following real example for the net due data, it nearly 2000 char, it is a nightmare to understand the logic

HanaStudioComplexIf.png

With this tool, the life became easy. It format it like following. So no matter how many levels it nested, it is very easy to understand. ( So we can easily know that this complex expression is not optimized well….)

ComplexIf.png

View the VDM in an overall and compact way

Sometimes we want to know how several columns coming from (from other VDM, Table, or nodes) in an overall view. In Hana Studio we need click the node one by one and remember them. With this tool, we can: just select the columns you interested in, and click ‘Advance Analyze‘, then it will open a new windows to show the relationship in a tree table.

CompactView.png

Unit Test support (coming soon)

When we do unit test use the SAP hana unit test framework, we have so  many tiring work: replace the depended vdm/table with private vdm/tables, provide some sample data, comparing the result. As we have all the information for the VDM, so we can provide GUI interface to help user easily do the unit test.

Conclusion:

This tool only support ‘explore’ the VDM in read-only mode, so it can display some information in a user friendly way. It target at help to understand the complex VDM.

I build it use SAPUI5 recently, nearly 5000 line of source code. If found any bug, please drop a mail to me.

To report this post you need to login first.

4 Comments

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

  1. Albrecht Gass

    Hi Lucky,

    this looks like very useful functionality.

    I surely would like to take a look at it myself. Will you be able/willing to share the source code (does SAPLink work with UI5)?

    Thanks

    Albrecht

    (0) 
    1. Lucky Li Post author

      Hello Albrecht:

           I just upload the source code as attachment, detail see ‘how to run it locally’.

      Lucky

      (0) 
  2. Vivek Singh Bhoj

    Hi Lucky,

    Great Blog.

    Rightly said. working with VDMs takes a lot of time and they are complex

    Will definitely give this a try.

    On a sidenote: I have a question to you.

    As Odata supports only Input Parameters and does not support Variables – Did you use xsjs to show both input parameters and variables?

    Regards,

    Vivek

    (0) 
  3. Ian Ling

    Hi Lucky,

    Great work. It actually showcase different defects in HANA studio – I believe it would be better communicate to the HANA studio dev to improve HANA studio in the end. 🙂

    (0) 

Leave a Reply