SAP Runtime error when showing Multiple parents of an entity using CDS hierarchy in the SAPUI5 Tree table

I'm using CDS parent child hierarchy to get multiple parents of an entity.

There is no problem with the data that has a single parent.

But when I try to display the data that has multiple parents, it's dumping. There is no dump when I get the multiple parent data from the CDS hierarchy using SE38 report.

I have already specified Multiple parents allowed in the CDS hierarchy

I'm getting the following error text

Hierarchy error: The hierarchy source data contains node 00012345 having multiple parents but the hierarchy is specified to reject such nodes.: line 1 col 821 (at pos 820)

enter image description here


  • I found the solution.

    We need to redefine the CDS hierarchy class method (defined in @ObjectModel.query.implementedBy) IS_READ_ONLY_MULTI_PARENT_HIER to set the indicator as 'X' to support the Multiple parent scenario.

    It is not supported by default.