cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

CDS Hierarchy - DEFINITION

David40
Newcomer
0 Likes
162

In ABAP Platform 2022 I'm reading in the keyword documentation about a CDS Hierarchy. In the chapter about the statement DEFINE HIERARCHY the option DIRECTORY is explained with an example. This is the CDS Hierarchy DEMO_CDS_PARENT_CHILD_DIR. The source is the CDS View Entity  DEMO_CDS_PARENT_CHILD_SRC_DIR. Here the following hierarchy association is defined:
 association [1..*] to DEMO_CDS_PARENT_CHILD_SRC_DIR as _pcr on
      $projection.parent = _pcr.id and
      $projection.dir_entry =  _pcr.id

My question is about the second part of the ON condition: $projection.dir_entry =  _pcr.id. 

What is it doing?
It is not showing up in the hierarchy attribute NODE_ID.
When I delete it, the result is the same. When I remove the DIRECTORY option in the definition I get another result where the condition seems to be taken into account.

 

Accepted Solutions (0)

Answers (0)