Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

SAP HANA - SQL - HIERARCHY Function (Hierarchy Generator)

LuisBenavidesA
Participant
0 Kudos

Dear Expert,

I am try to list the hierarchy information thought SQL - HIERARCHY Function into SQL editor. But I have gotten empty outcome.

The SQL statement is

SELECT * FROM HIERARCHY ( SOURCE ( SELECT "NODEID" AS "NODE_ID", "PARENTID" AS "PARENT_ID", 0 AS "TYPE" FROM "SAPABAP1"."/B28/H*****" WHERE HIEID = '*****') );

The Log of Visualize Plan attached.

visualizeplan.png

Hana system version: 2.00.034

Thanks advanced for your support

  • SAP Managed Tags:
3 REPLIES 3

0 Kudos

Hi, even I too faced the same problem. Is there any solution yet. Thanks advanced for your support

  • SAP Managed Tags:

0 Kudos

Hi,

Even I too face the same problem. Is there any solution?

  • SAP Managed Tags:

0 Kudos

Hi,

This issue occurs because ROOT node must have 'null' in PARENT_ID.

You should add the following expression:

case when "PARENTID" = 0 then null else "PARENTID" end AS "PARENT_ID"

  • SAP Managed Tags: