<?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: Odata Services with Complex Types in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/odata-services-with-complex-types/qaa-p/9427797#M3355879</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gaurav,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; this can be&amp;nbsp; overcome by $expand parameter ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reference ...&lt;/P&gt;&lt;P&gt;1. &lt;A href="http://www.odata.org/documentation/odata-v2-documentation/uri-conventions/#46_Expand_System_Query_Option_expand"&gt;http://www.odata.org/documentation/odata-v2-documentation/uri-conventions/#46_Expand_System_Query_Option_expand&lt;/A&gt;&lt;/P&gt;&lt;P&gt;2. &lt;A _jive_internal="true" class="active_link" href="https://answers.sap.com/thread/3238025"&gt;http://scn.sap.com/thread/3238025&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jibin Joy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 May 2013 03:03:55 GMT</pubDate>
    <dc:creator>jibin_joy</dc:creator>
    <dc:date>2013-05-17T03:03:55Z</dc:date>
    <item>
      <title>Odata Services with Complex Types</title>
      <link>https://community.sap.com/t5/technology-q-a/odata-services-with-complex-types/qaq-p/9427791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have a requirement to create an OData Services with complex type . Structure of this type is as follows&lt;/P&gt;&lt;P&gt;Zparent (Structure name)&lt;/P&gt;&lt;P&gt;| name- String&lt;/P&gt;&lt;P&gt;|--------|&amp;nbsp; Table of ZChild (Structure name)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |-------- name- string&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |---------value- String&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anyone tried it and if yes what are the basic fundamental steps to accomplish it&lt;/P&gt;&lt;P&gt;I am a newbie therefore need some guidance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Points will be rewarded&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;Gaurav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 May 2013 19:28:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/odata-services-with-complex-types/qaq-p/9427791</guid>
      <dc:creator>former_member220853</dc:creator>
      <dc:date>2013-05-14T19:28:41Z</dc:date>
    </item>
    <item>
      <title>Re: Odata Services with Complex Types</title>
      <link>https://community.sap.com/t5/technology-q-a/odata-services-with-complex-types/qaa-p/9427792#M3355874</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gaurav ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are two ways to making an complex Entity &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;1. Direct Way -&amp;nbsp; Adding Complex Type in the Entity &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Problem with this way is that it is a 1:1 relationship . Its behavior like "append" and "include" in DDIC But based on scenario,&amp;nbsp; nested structure (ZChild) is a&amp;nbsp; table&amp;nbsp; so this technique is not possible .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. In-direct Way -&amp;nbsp; Making relationship between two entity using association&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Based on my experience ur requirement can be done by creating two entity zparent as well as&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; zchild .&amp;nbsp; Cardinality can be handled&amp;nbsp; in the association corresponding to this entity. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jibin Joy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 May 2013 05:53:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/odata-services-with-complex-types/qaa-p/9427792#M3355874</guid>
      <dc:creator>jibin_joy</dc:creator>
      <dc:date>2013-05-15T05:53:54Z</dc:date>
    </item>
    <item>
      <title>Re: Odata Services with Complex Types</title>
      <link>https://community.sap.com/t5/technology-q-a/odata-services-with-complex-types/qaa-p/9427793#M3355875</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gaurav,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Complex Type is not the right technique to represent a parent child relationship of cardinality 1:N. A complex type inside an Entity works a group of individual properties. This is useful when you want to reuse same group in many Entities(or in Action). For example, consider a service with entity Customer and Invoice. Entity &lt;STRONG&gt;Customer&lt;/STRONG&gt; has properties a) &lt;STRONG&gt;HomeAddress&lt;/STRONG&gt; b)&lt;STRONG&gt;OfficeAddres&lt;/STRONG&gt;s&amp;nbsp; , entity &lt;STRONG&gt;Invoice&lt;/STRONG&gt; has property &lt;STRONG&gt;ShippingAdress&lt;/STRONG&gt;. So technically all three properties are of &lt;STRONG&gt;complex type Address&lt;/STRONG&gt; . Moreover complex type is nothing but a structure, so it can not hold multiple values.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; Now to address your requirement, you have to create Parent and Child entities separately. Then you have to create association between them where you can put your desired cardinality(here may be 1:N). Next you have to create a navigation property for the parent using this association. Hope this is helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards, &lt;/P&gt;&lt;P&gt;Atanu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 May 2013 18:15:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/odata-services-with-complex-types/qaa-p/9427793#M3355875</guid>
      <dc:creator>former_member184867</dc:creator>
      <dc:date>2013-05-15T18:15:19Z</dc:date>
    </item>
    <item>
      <title>Re: Odata Services with Complex Types</title>
      <link>https://community.sap.com/t5/technology-q-a/odata-services-with-complex-types/qaa-p/9427794#M3355876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have few more questions , even though I am able to define the association and create a cardinality of 1 for parent and 1..n for child .&lt;/P&gt;&lt;P&gt;Do I necessarily need to create Entity Sets as well?&lt;/P&gt;&lt;P&gt;If yes , then how do I use the association defined earlier&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do we need to define any referential integrity constraints etc&amp;nbsp; as well?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 May 2013 23:20:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/odata-services-with-complex-types/qaa-p/9427794#M3355876</guid>
      <dc:creator>former_member220853</dc:creator>
      <dc:date>2013-05-15T23:20:00Z</dc:date>
    </item>
    <item>
      <title>Re: Odata Services with Complex Types</title>
      <link>https://community.sap.com/t5/technology-q-a/odata-services-with-complex-types/qaa-p/9427795#M3355877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gaurav ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; These are the step for simple service ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Create Two Entity ( &lt;STRONG&gt;Parent&lt;/STRONG&gt; and &lt;STRONG&gt;Child&lt;/STRONG&gt; ).&lt;/P&gt;&lt;P&gt;2. Create EntitySet (&lt;STRONG&gt;ParentCollection &lt;/STRONG&gt;and &lt;STRONG&gt;ChildCollection&lt;/STRONG&gt;) For about Entities &lt;/P&gt;&lt;P&gt;3. Create Association &lt;STRONG&gt;ParentAssnChild&lt;/STRONG&gt; For Entity &lt;STRONG&gt;Parent&lt;/STRONG&gt; and &lt;STRONG&gt;Child&lt;/STRONG&gt; (based on ur scenario it will&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1..n as u a mentioned above)&lt;/P&gt;&lt;P&gt;4. Create Association set &lt;STRONG&gt;ParentAssnSetChild &lt;/STRONG&gt;for association&amp;nbsp; &lt;STRONG&gt;ParentAssnChild &lt;/STRONG&gt;with entityset&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;ParentCollection &lt;/STRONG&gt;and &lt;STRONG&gt;ChildCollection.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;5. Goto Entity &lt;STRONG&gt;Parent &lt;/STRONG&gt;create an navigation properties Provide Link name : &lt;STRONG&gt;ChildLink &lt;/STRONG&gt;and&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Association&amp;nbsp; &lt;STRONG&gt;ParentAssnChild &lt;/STRONG&gt;which is created above &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jibin Joy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 May 2013 05:00:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/odata-services-with-complex-types/qaa-p/9427795#M3355877</guid>
      <dc:creator>jibin_joy</dc:creator>
      <dc:date>2013-05-16T05:00:54Z</dc:date>
    </item>
    <item>
      <title>Re: Odata Services with Complex Types</title>
      <link>https://community.sap.com/t5/technology-q-a/odata-services-with-complex-types/qaa-p/9427796#M3355878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot Jibin&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if understood correctly we can have atomic structures and defined their relationship or cardinallity by associations in Odata service .However if we have hierarchical structures then&amp;nbsp; it may not work very well because get_entity_set method generally will return data only on one structure so even if we have hierarchical structure we cannot copy it to et_entity_set because entity set expects an atomic structure and not a hierarchical structure&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;Gaurav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 May 2013 21:37:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/odata-services-with-complex-types/qaa-p/9427796#M3355878</guid>
      <dc:creator>former_member220853</dc:creator>
      <dc:date>2013-05-16T21:37:14Z</dc:date>
    </item>
    <item>
      <title>Re: Odata Services with Complex Types</title>
      <link>https://community.sap.com/t5/technology-q-a/odata-services-with-complex-types/qaa-p/9427797#M3355879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gaurav,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; this can be&amp;nbsp; overcome by $expand parameter ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reference ...&lt;/P&gt;&lt;P&gt;1. &lt;A href="http://www.odata.org/documentation/odata-v2-documentation/uri-conventions/#46_Expand_System_Query_Option_expand"&gt;http://www.odata.org/documentation/odata-v2-documentation/uri-conventions/#46_Expand_System_Query_Option_expand&lt;/A&gt;&lt;/P&gt;&lt;P&gt;2. &lt;A _jive_internal="true" class="active_link" href="https://answers.sap.com/thread/3238025"&gt;http://scn.sap.com/thread/3238025&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jibin Joy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 May 2013 03:03:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/odata-services-with-complex-types/qaa-p/9427797#M3355879</guid>
      <dc:creator>jibin_joy</dc:creator>
      <dc:date>2013-05-17T03:03:55Z</dc:date>
    </item>
    <item>
      <title>Re: Odata Services with Complex Types</title>
      <link>https://community.sap.com/t5/technology-q-a/odata-services-with-complex-types/qaa-p/9427798#M3355880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am i right that with this approache i will able to have access to ChildSet during design time in DPC ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've create Parent which have ChildSet 1:n&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was wondering that at runtime i will have struct like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ParentVal1&lt;/P&gt;&lt;P&gt;ParentVal2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ChildSet (like table)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please answer or refer me to corect sources/tutorial&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Lucas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 21 Sep 2014 22:10:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/odata-services-with-complex-types/qaa-p/9427798#M3355880</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-09-21T22:10:00Z</dc:date>
    </item>
  </channel>
</rss>

