<?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>Question Re: CDL declare service as aspect/interface/aspect in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/cdl-declare-service-as-aspect-interface-aspect/qaa-p/12633233#M4738941</link>
    <description>&lt;P&gt;That's not possible and won't be possible in the future. Include's don't work on context or service level, only on (structured) type level. Structured types can't contain main artifact definitions but only elements.&lt;/P&gt;</description>
    <pubDate>Fri, 10 Jun 2022 07:34:37 GMT</pubDate>
    <dc:creator>hjb</dc:creator>
    <dc:date>2022-06-10T07:34:37Z</dc:date>
    <item>
      <title>CDL declare service as aspect/interface/aspect</title>
      <link>https://community.sap.com/t5/technology-q-a/cdl-declare-service-as-aspect-interface-aspect/qaq-p/12633232</link>
      <description>&lt;P&gt;I have a service &lt;STRONG&gt;A&lt;/STRONG&gt; that depends on another service &lt;STRONG&gt;B&lt;/STRONG&gt;. I would like to inverse the dependency, such that in the .cds definition of service &lt;STRONG&gt;A&lt;/STRONG&gt; the required service &lt;EM&gt;IB&lt;/EM&gt; is declared as an interface/aspect/abstract service. Therefore, service &lt;STRONG&gt;B&lt;/STRONG&gt; would implement the interface &lt;EM&gt;IB&lt;/EM&gt; defined by service &lt;STRONG&gt;A&lt;/STRONG&gt;. I don't think there's currently a way to achieve this, is there?&lt;/P&gt;
  &lt;P&gt;Example:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;// A.cds
service A {
  ...


  // declaration of a service as an aspect/interface/abstract etc. that A depends upon
  aspect service IB {
    function bar() returns String;
  }
}&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;PRE&gt;&lt;CODE&gt;// B.cds
using {A.IB} from "./A"

service B : IB {
  // implements function
  function bar() returns String;
}&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Jun 2022 12:09:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/cdl-declare-service-as-aspect-interface-aspect/qaq-p/12633232</guid>
      <dc:creator>kosmopilot</dc:creator>
      <dc:date>2022-06-09T12:09:12Z</dc:date>
    </item>
    <item>
      <title>Re: CDL declare service as aspect/interface/aspect</title>
      <link>https://community.sap.com/t5/technology-q-a/cdl-declare-service-as-aspect-interface-aspect/qaa-p/12633233#M4738941</link>
      <description>&lt;P&gt;That's not possible and won't be possible in the future. Include's don't work on context or service level, only on (structured) type level. Structured types can't contain main artifact definitions but only elements.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jun 2022 07:34:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/cdl-declare-service-as-aspect-interface-aspect/qaa-p/12633233#M4738941</guid>
      <dc:creator>hjb</dc:creator>
      <dc:date>2022-06-10T07:34:37Z</dc:date>
    </item>
  </channel>
</rss>

