<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ABAP CDS Recursive Hierarchy in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-cds-recursive-hierarchy/m-p/374954#M8700</link>
    <description>&lt;P&gt;HI , I am kind of facing the same problem. My CDS view returns only the immediate parent. Did you get a solution for this ?&lt;/P&gt;
  &lt;P&gt;Thanks and Regards,&lt;/P&gt;
  &lt;P&gt;Vasu&lt;/P&gt;</description>
    <pubDate>Fri, 20 Oct 2017 15:52:05 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2017-10-20T15:52:05Z</dc:date>
    <item>
      <title>ABAP CDS Recursive Hierarchy</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-cds-recursive-hierarchy/m-p/374953#M8699</link>
      <description>&lt;P&gt;Dear Members, &lt;/P&gt;&lt;P&gt;I'm trying to &lt;A target="_blank" href="https://help.sap.com/saphelp_nw75/helpdata/en/23/473e6a8b1c4da2b0ba5be4f319a16c/content.htm?frameset=/en/23/473e6a8b1c4da2b0ba5be4f319a16c/frameset.htm¤t_toc=/en/d9/bc687d35fa42ccbb0b9256ce786d51/plain.htm&amp;amp;node_id=112"&gt;create a recursive CDS view hierarchy with annotations&lt;/A&gt;, and expose it as OData service.
Here is what I'm doing to prototype in eclipse connected to an ABAP backend: &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;@AbapCatalog.sqlViewName: 'zv_hier_demo' @AbapCatalog.compiler.compareFilter: true @AccessControl.authorizationCheck: #NOT_REQUIRED @EndUserText.label: 'Hierarchy Demo' @Analytics : { dataCategory : #DIMENSION } @Hierarchy.parentChild : [ { 
name : 'Cateories', 
recurseBy : '_ParentCategory', 
multipleParents : false } ] 
@OData.publish: true 
define view Zdemo_I_Hierarchy as select from zdemo_hierarchy 
association [0..*] to zdemo_i_hierarchy as _ParentCategory 
on $projection.ParentId = _ParentCategory.Id 
{ 
key zdemo_hierarchy.id as Id, 
zdemo_hierarchy.short_text as ShortText, 
zdemo_hierarchy.parent_id as ParentId, 
cast( zdemo_hierarchy.active as Boolean ) as Active, _
ParentCategory 
} &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The DB table behind has the below fields: &lt;/P&gt;&lt;P&gt;CLIENT MANDT &lt;/P&gt;&lt;P&gt;ID INT4 &lt;/P&gt;&lt;P&gt;PARENT_ID INT4 &lt;/P&gt;&lt;P&gt;ACTIVE BOOLE_D &lt;/P&gt;&lt;P&gt;SHORT_TEXT CHAR40 &lt;/P&gt;&lt;P&gt;After activating the View I'm trying to import annotations in WebIDE, but nothing found. Should I have something available or not at all ? Maybe I need to manually define the tree the parent-child relationshio fields in my UI5 View?
&lt;BR /&gt;Thank you
Attila&lt;/P&gt;</description>
      <pubDate>Thu, 29 Dec 2016 19:46:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-cds-recursive-hierarchy/m-p/374953#M8699</guid>
      <dc:creator>Attila</dc:creator>
      <dc:date>2016-12-29T19:46:05Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP CDS Recursive Hierarchy</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-cds-recursive-hierarchy/m-p/374954#M8700</link>
      <description>&lt;P&gt;HI , I am kind of facing the same problem. My CDS view returns only the immediate parent. Did you get a solution for this ?&lt;/P&gt;
  &lt;P&gt;Thanks and Regards,&lt;/P&gt;
  &lt;P&gt;Vasu&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2017 15:52:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-cds-recursive-hierarchy/m-p/374954#M8700</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-10-20T15:52:05Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP CDS Recursive Hierarchy</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-cds-recursive-hierarchy/m-p/374955#M8701</link>
      <description>&lt;P&gt;Hi Vasu,&lt;/P&gt;
  &lt;P&gt;I stopped spending more time on this. It was not well documented, and the probablity for success fumbling in the darkness was very low. Since it was required for a prototype, and we faced problems at the very beginning, I made the hierarchy without CDS manually coding in the GW DPC and MPC classes. &lt;/P&gt;
  &lt;P&gt;Attila&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2017 08:15:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-cds-recursive-hierarchy/m-p/374955#M8701</guid>
      <dc:creator>Attila</dc:creator>
      <dc:date>2017-11-21T08:15:50Z</dc:date>
    </item>
  </channel>
</rss>

