In this blog I will use Xtract QV to extract a BW hierarchy from an SAP BW system and load it into QlikView.

SAP BW hierarchies are modeled as parent-child hierarchies. I will show how to convert it to a naturalized Hierarchy to use in QlikView.

I will extract a sample hierarchy of the dimension country.

Now open Xtract QV and create the BW hierarchy extraction using the BW/BI Hierarchy component.

Select the created extraction, click on Run -> Generate QlikView Script -> Copy to Clipboard.

QlikView provides the hierarchy statement to transform a parent-child hierarchy into a natural hierarchy. The syntax is

Hierarchy (NodeID, ParentID, NodeName, [ParentName], [PathSource], [PathName], [PathDelimiter], [Depth]) (loadstatement | selectstatement)

Now open QlikView, go to the script editor and paste the script. Be sure to write the statement Hierarchy (NodeID, ParentID, NodeName) prior to the load statement.

Now you can use the hierarchy in QlikView.

Written by Khoder Elzein

Khoder is responsible for presales and always has an attentive ear for our customers, prospectives and partners. When travelling in Germany or abroad, he provides customer support at PoCs, workshops and on training courses. He also looks after the further development of our software solutions. Khoder has been working in IT since the turn of the millennium; he has been a member of team Theobald since 2009. When it comes to private interests, family, nature and reading feature at the top of his list – along with innovative fusion cuisine, as you may infer from his favourite dish of Swabian cheese noodles with tabouleh.