Application Development and Automation 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: 
Read only

SAP HANA - SQL - HIERARCHY Function (Hierarchy Generator)

LuisBenavidesA
Participant
0 Likes
2,186
  • SAP Managed Tags

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

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

3 REPLIES 3
Read only

0 Likes
1,887
  • SAP Managed Tags

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

Read only

0 Likes
1,887
  • SAP Managed Tags

Hi,

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

Read only

0 Likes
1,887
  • SAP Managed Tags

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"