<?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: SAP Developer Challenge - APIs - Task 2 - Calculate Northbreeze product stock in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-2-calculate-northbreeze-product-stock/m-p/277455#M2603</link>
    <description>&lt;P&gt;Great stuff. As I mentioned in another reply in this thread, I do love `reduce`. It's the mother of all (or at least many) functions, in a way.&lt;/P&gt;</description>
    <pubDate>Mon, 07 Aug 2023 11:59:11 GMT</pubDate>
    <dc:creator>qmacro</dc:creator>
    <dc:date>2023-08-07T11:59:11Z</dc:date>
    <item>
      <title>SAP Developer Challenge - APIs - Task 2 - Calculate Northbreeze product stock</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-2-calculate-northbreeze-product-stock/m-p/277325#M2555</link>
      <description>&lt;P&gt;(Check out the &lt;A href="https://blogs.sap.com/2023/08/01/sap-developer-challenge-apis/" target="_blank" rel="noopener"&gt;SAP Developer Challenge - APIs&lt;/A&gt; blog post for everything you need to know about the challenge to which this task relates!)&lt;/P&gt;&lt;P&gt;In this task you'll move from the public Northwind service to a simple version powered by CAP, and explore data with an OData operation and some system query options.&lt;/P&gt;&lt;H2&gt;Background&lt;/H2&gt;&lt;P&gt;The OASIS curated Northwind service is great, but it's also sometimes useful to have one's own version. There's an extremely simplified version of the classic Northwind service, called Northbreeze (get it?) at &lt;A class="" href="https://developer-challenge.cfapps.eu10.hana.ondemand.com/odata/v4/northbreeze" target="_blank" rel="noopener"&gt;https://developer-challenge.cfapps.eu10.hana.ondemand.com/odata/v4/northbreeze&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;This Northbreeze service is powered by the SAP Cloud Application Programming Model (CAP) and offers four entity sets:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Products&lt;/LI&gt;&lt;LI&gt;Suppliers&lt;/LI&gt;&lt;LI&gt;Categories&lt;/LI&gt;&lt;LI&gt;Summary of sales by years&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;(Well there's technically a fifth, TotalProducts, but that's just a calculation projection on the count of products).&lt;/P&gt;&lt;P&gt;The reason for running our own version of Northwind is that we can modify and extend it as we see fit, plus being based on CAP, we can learn about and experiment with CAP's rich support for &lt;A href="https://cap.cloud.sap/docs/advanced/odata" target="_blank" rel="noopener"&gt;serving OData APIs&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;In this task you'll start to become familiar with the data offered.&lt;/P&gt;&lt;P&gt;Specifically for this task, you'll need to become familiar with the Products data. To do that, have a look at the Northbreeze service's metadata document at &lt;A class="" href="https://developer-challenge.cfapps.eu10.hana.ondemand.com/odata/v4/northbreeze/$metadata" target="_blank" rel="noopener"&gt;https://developer-challenge.cfapps.eu10.hana.ondemand.com/odata/v4/northbreeze/$metadata&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Identify the EntityContainer element that describes the entity sets available, in the form of EntitySet elements, and find the element describing the entity set with the name Products, which should look like this:&lt;/P&gt;&lt;DIV class=""&gt;&lt;PRE&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;&amp;lt;EntitySet&lt;/SPAN&gt;&lt;SPAN class=""&gt; Name=&lt;/SPAN&gt;&lt;SPAN class=""&gt;"Products"&lt;/SPAN&gt;&lt;SPAN class=""&gt; EntityType=&lt;/SPAN&gt;&lt;SPAN class=""&gt;"Northbreeze.Products"&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;&amp;lt;NavigationPropertyBinding&lt;/SPAN&gt;&lt;SPAN class=""&gt; Path=&lt;/SPAN&gt;&lt;SPAN class=""&gt;"Category"&lt;/SPAN&gt;&lt;SPAN class=""&gt; Target=&lt;/SPAN&gt;&lt;SPAN class=""&gt;"Categories"&lt;/SPAN&gt;&lt;SPAN class=""&gt;/&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;&amp;lt;NavigationPropertyBinding&lt;/SPAN&gt;&lt;SPAN class=""&gt; Path=&lt;/SPAN&gt;&lt;SPAN class=""&gt;"Supplier"&lt;/SPAN&gt;&lt;SPAN class=""&gt; Target=&lt;/SPAN&gt;&lt;SPAN class=""&gt;"Suppliers"&lt;/SPAN&gt;&lt;SPAN class=""&gt;/&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt;&lt;SPAN class=""&gt;&amp;lt;/EntitySet&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;You can see that this entity set is a collection of Northbreeze.Products entity types. The 'Northbreeze' part is essentially the namespace, generated based on the service name. Follow the trail to the Products entity type, which will be an element outside the EntityContainer element, but still within the Northbreeze-namespaced Schema element.&lt;/P&gt;&lt;P&gt;The Products entity type should look like this:&lt;/P&gt;&lt;DIV class=""&gt;&lt;PRE&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;&amp;lt;EntityType&lt;/SPAN&gt;&lt;SPAN class=""&gt; Name=&lt;/SPAN&gt;&lt;SPAN class=""&gt;"Products"&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;&amp;lt;Key&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;&amp;lt;PropertyRef&lt;/SPAN&gt;&lt;SPAN class=""&gt; Name=&lt;/SPAN&gt;&lt;SPAN class=""&gt;"ProductID"&lt;/SPAN&gt;&lt;SPAN class=""&gt;/&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;&amp;lt;/Key&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;&amp;lt;Property&lt;/SPAN&gt;&lt;SPAN class=""&gt; Name=&lt;/SPAN&gt;&lt;SPAN class=""&gt;"ProductID"&lt;/SPAN&gt;&lt;SPAN class=""&gt; Type=&lt;/SPAN&gt;&lt;SPAN class=""&gt;"Edm.Int32"&lt;/SPAN&gt;&lt;SPAN class=""&gt; Nullable=&lt;/SPAN&gt;&lt;SPAN class=""&gt;"false"&lt;/SPAN&gt;&lt;SPAN class=""&gt;/&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;&amp;lt;Property&lt;/SPAN&gt;&lt;SPAN class=""&gt; Name=&lt;/SPAN&gt;&lt;SPAN class=""&gt;"ProductName"&lt;/SPAN&gt;&lt;SPAN class=""&gt; Type=&lt;/SPAN&gt;&lt;SPAN class=""&gt;"Edm.String"&lt;/SPAN&gt;&lt;SPAN class=""&gt;/&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;&amp;lt;Property&lt;/SPAN&gt;&lt;SPAN class=""&gt; Name=&lt;/SPAN&gt;&lt;SPAN class=""&gt;"QuantityPerUnit"&lt;/SPAN&gt;&lt;SPAN class=""&gt; Type=&lt;/SPAN&gt;&lt;SPAN class=""&gt;"Edm.String"&lt;/SPAN&gt;&lt;SPAN class=""&gt;/&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;&amp;lt;Property&lt;/SPAN&gt;&lt;SPAN class=""&gt; Name=&lt;/SPAN&gt;&lt;SPAN class=""&gt;"UnitPrice"&lt;/SPAN&gt;&lt;SPAN class=""&gt; Type=&lt;/SPAN&gt;&lt;SPAN class=""&gt;"Edm.Decimal"&lt;/SPAN&gt;&lt;SPAN class=""&gt; Scale=&lt;/SPAN&gt;&lt;SPAN class=""&gt;"variable"&lt;/SPAN&gt;&lt;SPAN class=""&gt;/&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;&amp;lt;NavigationProperty&lt;/SPAN&gt;&lt;SPAN class=""&gt; Name=&lt;/SPAN&gt;&lt;SPAN class=""&gt;"Category"&lt;/SPAN&gt;&lt;SPAN class=""&gt; Type=&lt;/SPAN&gt;&lt;SPAN class=""&gt;"Northbreeze.Categories"&lt;/SPAN&gt;&lt;SPAN class=""&gt; Partner=&lt;/SPAN&gt;&lt;SPAN class=""&gt;"Products"&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;&amp;lt;ReferentialConstraint&lt;/SPAN&gt;&lt;SPAN class=""&gt; Property=&lt;/SPAN&gt;&lt;SPAN class=""&gt;"Category_CategoryID"&lt;/SPAN&gt;&lt;SPAN class=""&gt; ReferencedProperty=&lt;/SPAN&gt;&lt;SPAN class=""&gt;"CategoryID"&lt;/SPAN&gt;&lt;SPAN class=""&gt;/&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;&amp;lt;/NavigationProperty&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;&amp;lt;Property&lt;/SPAN&gt;&lt;SPAN class=""&gt; Name=&lt;/SPAN&gt;&lt;SPAN class=""&gt;"Category_CategoryID"&lt;/SPAN&gt;&lt;SPAN class=""&gt; Type=&lt;/SPAN&gt;&lt;SPAN class=""&gt;"Edm.Int32"&lt;/SPAN&gt;&lt;SPAN class=""&gt;/&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;&amp;lt;NavigationProperty&lt;/SPAN&gt;&lt;SPAN class=""&gt; Name=&lt;/SPAN&gt;&lt;SPAN class=""&gt;"Supplier"&lt;/SPAN&gt;&lt;SPAN class=""&gt; Type=&lt;/SPAN&gt;&lt;SPAN class=""&gt;"Northbreeze.Suppliers"&lt;/SPAN&gt;&lt;SPAN class=""&gt; Partner=&lt;/SPAN&gt;&lt;SPAN class=""&gt;"Products"&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;&amp;lt;ReferentialConstraint&lt;/SPAN&gt;&lt;SPAN class=""&gt; Property=&lt;/SPAN&gt;&lt;SPAN class=""&gt;"Supplier_SupplierID"&lt;/SPAN&gt;&lt;SPAN class=""&gt; ReferencedProperty=&lt;/SPAN&gt;&lt;SPAN class=""&gt;"SupplierID"&lt;/SPAN&gt;&lt;SPAN class=""&gt;/&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;&amp;lt;/NavigationProperty&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;&amp;lt;Property&lt;/SPAN&gt;&lt;SPAN class=""&gt; Name=&lt;/SPAN&gt;&lt;SPAN class=""&gt;"Supplier_SupplierID"&lt;/SPAN&gt;&lt;SPAN class=""&gt; Type=&lt;/SPAN&gt;&lt;SPAN class=""&gt;"Edm.Int32"&lt;/SPAN&gt;&lt;SPAN class=""&gt;/&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;&amp;lt;Property&lt;/SPAN&gt;&lt;SPAN class=""&gt; Name=&lt;/SPAN&gt;&lt;SPAN class=""&gt;"UnitsInStock"&lt;/SPAN&gt;&lt;SPAN class=""&gt; Type=&lt;/SPAN&gt;&lt;SPAN class=""&gt;"Edm.Int32"&lt;/SPAN&gt;&lt;SPAN class=""&gt;/&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;&amp;lt;Property&lt;/SPAN&gt;&lt;SPAN class=""&gt; Name=&lt;/SPAN&gt;&lt;SPAN class=""&gt;"UnitsOnOrder"&lt;/SPAN&gt;&lt;SPAN class=""&gt; Type=&lt;/SPAN&gt;&lt;SPAN class=""&gt;"Edm.Int32"&lt;/SPAN&gt;&lt;SPAN class=""&gt;/&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;&amp;lt;Property&lt;/SPAN&gt;&lt;SPAN class=""&gt; Name=&lt;/SPAN&gt;&lt;SPAN class=""&gt;"ReorderLevel"&lt;/SPAN&gt;&lt;SPAN class=""&gt; Type=&lt;/SPAN&gt;&lt;SPAN class=""&gt;"Edm.Int32"&lt;/SPAN&gt;&lt;SPAN class=""&gt;/&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;&amp;lt;Property&lt;/SPAN&gt;&lt;SPAN class=""&gt; Name=&lt;/SPAN&gt;&lt;SPAN class=""&gt;"Discontinued"&lt;/SPAN&gt;&lt;SPAN class=""&gt; Type=&lt;/SPAN&gt;&lt;SPAN class=""&gt;"Edm.Boolean"&lt;/SPAN&gt;&lt;SPAN class=""&gt;/&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt;&lt;SPAN class=""&gt;&amp;lt;/EntityType&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;Amongst other things, you can see that a product has an ID (ProductID), a name (ProductName), a count of the number of units currently in stock (UnitsInStock) and a boolean that is used to indicate whether or not a product is discontinued (Discontinued).&lt;/P&gt;&lt;P&gt;Request the first few products to see data for these and the other properties, via&amp;nbsp;&lt;A href="https://developer-challenge.cfapps.eu10.hana.ondemand.com/odata/v4/northbreeze/Products?$top=5" target="_blank" rel="noopener"&gt;https://developer-challenge.cfapps.eu10.hana.ondemand.com/odata/v4/northbreeze/Products?$top=5&lt;/A&gt;.&amp;nbsp;You should see something like this:&lt;/P&gt;&lt;DIV class=""&gt;&lt;PRE&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;{&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;"@odata.context"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;"$metadata#Products"&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;"value"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;[&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;{&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;"ProductID"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;1&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;"ProductName"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;"Chai"&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;"QuantityPerUnit"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;"10 boxes x 20 bags"&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;"UnitPrice"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;18&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;"Category_CategoryID"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;1&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;"Supplier_SupplierID"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;1&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;"UnitsInStock"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;39&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;"UnitsOnOrder"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;0&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;"ReorderLevel"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;10&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;"Discontinued"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;false&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;}&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;{&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;"ProductID"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;2&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;"ProductName"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;"Chang"&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;"QuantityPerUnit"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;"24 - 12 oz bottles"&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;"UnitPrice"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;19&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;"Category_CategoryID"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;1&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;"Supplier_SupplierID"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;1&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;"UnitsInStock"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;17&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;"UnitsOnOrder"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;40&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;"ReorderLevel"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;25&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;"Discontinued"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;false&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;}&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;{&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;"ProductID"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;3&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;"ProductName"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;"Aniseed Syrup"&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;"QuantityPerUnit"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;"12 - 550 ml bottles"&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;"UnitPrice"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;10&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;"Category_CategoryID"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;2&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;"Supplier_SupplierID"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;1&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;"UnitsInStock"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;13&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;"UnitsOnOrder"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;70&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;"ReorderLevel"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;25&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;"Discontinued"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;false&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;}&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;{&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;"ProductID"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;4&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;"ProductName"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;"Chef Anton's Cajun Seasoning"&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;"QuantityPerUnit"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;"48 - 6 oz jars"&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;"UnitPrice"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;22&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;"Category_CategoryID"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;2&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;"Supplier_SupplierID"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;2&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;"UnitsInStock"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;53&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;"UnitsOnOrder"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;0&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;"ReorderLevel"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;0&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;"Discontinued"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;false&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;}&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;{&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;"ProductID"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;5&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;"ProductName"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;"Chef Anton's Gumbo Mix"&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;"QuantityPerUnit"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;"36 boxes"&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;"UnitPrice"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;21.35&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;"Category_CategoryID"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;2&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;"Supplier_SupplierID"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;2&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;"UnitsInStock"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;0&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;"UnitsOnOrder"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;0&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;"ReorderLevel"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;0&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;"Discontinued"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;true&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;}&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt; &lt;SPAN class=""&gt;]&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN&gt;&lt;SPAN class=""&gt;}&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;H2&gt;Your task&lt;/H2&gt;&lt;P&gt;Your task is to calculate the total stock quantity (i.e. the total units in stock) for all current products, i.e. products that are not been marked as discontinued. The result of this calculation should be a number.&lt;/P&gt;&lt;P&gt;Once you have calculated the number, which should be an integer, you should hash it and post the hash as a new reply to this discussion thread, as described in &lt;A href="https://groups.community.sap.com/t5/application-development/sap-developer-challenge-apis-task-0-learn-to-share-your-task/m-p/276058" target="_blank" rel="noopener"&gt;Task 0 - Learn to share your task results&lt;/A&gt; and in a similar way to how you've done this in the previous task.&lt;/P&gt;&lt;H2&gt;Hints and tips&lt;/H2&gt;&lt;P&gt;Like all tasks in this challenge, you are free to approach this one however you see fit. One way would be to request all the products (&lt;A class="" href="https://developer-challenge.cfapps.eu10.hana.ondemand.com/odata/v4/northbreeze/Products" target="_blank" rel="noopener"&gt;https://developer-challenge.cfapps.eu10.hana.ondemand.com/odata/v4/northbreeze/Products&lt;/A&gt;) and manually sum the values of the relevant UnitsInStock properties.&lt;/P&gt;&lt;P&gt;But where's the fun in that?&lt;/P&gt;&lt;P&gt;How about requesting the entire products entity set in your favorite language and obtaining result by parsing the response and using that language to make the calculation?&lt;/P&gt;&lt;P&gt;You could also use OData's $filter system query option to first reduce the entity set result to only those products that have the value false for the Discontinued property.&lt;/P&gt;&lt;P&gt;And what about the $count facility, which in OData V4 &lt;A href="https://github.com/qmacro/odata-v4-and-cap/blob/main/slides.md#count-as-system-query-option" target="_blank" rel="noopener"&gt;is now a system query option as well something you can append to a resource path&lt;/A&gt;?&lt;/P&gt;&lt;P&gt;This would also be a good opportunity to take your first steps exploring some great new OData V4 features supported by CAP, such as &lt;A href="https://cap.cloud.sap/docs/advanced/odata#data-aggregation" target="_blank" rel="noopener"&gt;data aggregation&lt;/A&gt;.&lt;/P&gt;&lt;H2&gt;For discussion&lt;/H2&gt;&lt;P&gt;How did you approach this task? If you used a programming language, which one did you use, and how did you do it? If you used an $apply based data aggregation feature, what was it, and was was your experience using it?&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2023 14:50:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-2-calculate-northbreeze-product-stock/m-p/277325#M2555</guid>
      <dc:creator>qmacro</dc:creator>
      <dc:date>2023-08-11T14:50:40Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - APIs - Task 2 - Calculate Northbreeze product stock</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-2-calculate-northbreeze-product-stock/m-p/277345#M2559</link>
      <description>&lt;P&gt;3074a722566a0d38b50a5f3f5c2804ed4fa37dcc94f8f33ed2586a9f6c56f3ab&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 06:32:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-2-calculate-northbreeze-product-stock/m-p/277345#M2559</guid>
      <dc:creator>vladimirs_semikins</dc:creator>
      <dc:date>2023-08-07T06:32:17Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - APIs - Task 2 - Calculate Northbreeze product stock</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-2-calculate-northbreeze-product-stock/m-p/277346#M2560</link>
      <description>&lt;P&gt;I was today years old when I found out that OData v4 supports data aggregation 🫣&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 06:34:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-2-calculate-northbreeze-product-stock/m-p/277346#M2560</guid>
      <dc:creator>vladimirs_semikins</dc:creator>
      <dc:date>2023-08-07T06:34:11Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - APIs - Task 2 - Calculate Northbreeze product stock</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-2-calculate-northbreeze-product-stock/m-p/277356#M2563</link>
      <description>&lt;P class=""&gt;&lt;SPAN class=""&gt;7e30e0c2f9e6214f7dcda4c45056ee7b1755f4a0c3efa73f0b568d93147e6123&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 11:26:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-2-calculate-northbreeze-product-stock/m-p/277356#M2563</guid>
      <dc:creator>ajmaradiaga</dc:creator>
      <dc:date>2023-08-07T11:26:26Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - APIs - Task 2 - Calculate Northbreeze product stock</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-2-calculate-northbreeze-product-stock/m-p/277377#M2566</link>
      <description>&lt;P&gt;76a789b93f7545767ddf4b44cd4a37a7e2b976140a10c1e4c262568daf527d99&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 07:47:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-2-calculate-northbreeze-product-stock/m-p/277377#M2566</guid>
      <dc:creator>UweFetzer_se38</dc:creator>
      <dc:date>2023-08-07T07:47:48Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - APIs - Task 2 - Calculate Northbreeze product stock</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-2-calculate-northbreeze-product-stock/m-p/277379#M2568</link>
      <description>&lt;P&gt;The hashed "value" should only be the number, right?&lt;/P&gt;&lt;P&gt;I've used "apply" with filter and aggregate.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 07:48:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-2-calculate-northbreeze-product-stock/m-p/277379#M2568</guid>
      <dc:creator>UweFetzer_se38</dc:creator>
      <dc:date>2023-08-07T07:48:57Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - APIs - Task 2 - Calculate Northbreeze product stock</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-2-calculate-northbreeze-product-stock/m-p/277380#M2569</link>
      <description>&lt;PRE&gt;cfa7b85bac1866665ea24e08e8bf20472ceae1b42d1dcca8778597789bd04be0&lt;/PRE&gt;</description>
      <pubDate>Mon, 07 Aug 2023 07:51:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-2-calculate-northbreeze-product-stock/m-p/277380#M2569</guid>
      <dc:creator>ceedee666</dc:creator>
      <dc:date>2023-08-07T07:51:55Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - APIs - Task 2 - Calculate Northbreeze product stock</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-2-calculate-northbreeze-product-stock/m-p/277383#M2571</link>
      <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;I solved this task using three approaches:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Getting all data form the service and perform the filtering and aggregation in Python &lt;SPAN class="lia-unicode-emoji"&gt;&lt;span class="lia-unicode-emoji" title=":snake:"&gt;🐍&lt;/span&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;Filtering the data using OData '$filter` and the aggregation in Python &lt;SPAN class="lia-unicode-emoji"&gt;&lt;span class="lia-unicode-emoji" title=":snake:"&gt;🐍&lt;/span&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;Using OData data for filtering and aggregation as described&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Thanks &lt;a href="https://community.sap.com/t5/user/viewprofilepage/user-id/53"&gt;@qmacro&lt;/a&gt;&amp;nbsp; for providing the nice hints!&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 07 Aug 2023 07:55:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-2-calculate-northbreeze-product-stock/m-p/277383#M2571</guid>
      <dc:creator>ceedee666</dc:creator>
      <dc:date>2023-08-07T07:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - APIs - Task 2 - Calculate Northbreeze product stock</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-2-calculate-northbreeze-product-stock/m-p/277386#M2573</link>
      <description>&lt;P&gt;94d74a329419222662e42356a0ba4c5c07ceaf9b550c53cabc0fa45847d39080&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 08:02:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-2-calculate-northbreeze-product-stock/m-p/277386#M2573</guid>
      <dc:creator>FooThePolarBear</dc:creator>
      <dc:date>2023-08-07T08:02:02Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - APIs - Task 2 - Calculate Northbreeze product stock</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-2-calculate-northbreeze-product-stock/m-p/277394#M2575</link>
      <description>&lt;P&gt;6141c65b9ea179fcb34c1ba2505fd19badcbf79d77b1cd789632045fc0ca35aa&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 08:19:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-2-calculate-northbreeze-product-stock/m-p/277394#M2575</guid>
      <dc:creator>SandipAgarwalla</dc:creator>
      <dc:date>2023-08-07T08:19:55Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - APIs - Task 2 - Calculate Northbreeze product stock</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-2-calculate-northbreeze-product-stock/m-p/277395#M2576</link>
      <description>&lt;P&gt;&lt;SPAN&gt;d&lt;/SPAN&gt;&lt;SPAN class=""&gt;8342&lt;/SPAN&gt;&lt;SPAN&gt;a&lt;/SPAN&gt;&lt;SPAN class=""&gt;9512672&lt;/SPAN&gt;&lt;SPAN&gt;b&lt;/SPAN&gt;&lt;SPAN class=""&gt;9987909600065&lt;/SPAN&gt;&lt;SPAN class=""&gt;c&lt;/SPAN&gt;&lt;SPAN class=""&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;da&lt;/SPAN&gt;&lt;SPAN class=""&gt;57&lt;/SPAN&gt;&lt;SPAN&gt;f&lt;/SPAN&gt;&lt;SPAN class=""&gt;64&lt;/SPAN&gt;&lt;SPAN&gt;a&lt;/SPAN&gt;&lt;SPAN class=""&gt;77&lt;/SPAN&gt;&lt;SPAN&gt;f&lt;/SPAN&gt;&lt;SPAN class=""&gt;93&lt;/SPAN&gt;&lt;SPAN&gt;f&lt;/SPAN&gt;&lt;SPAN class=""&gt;400259e04&lt;/SPAN&gt;&lt;SPAN&gt;afd&lt;/SPAN&gt;&lt;SPAN class=""&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;d&lt;/SPAN&gt;&lt;SPAN class=""&gt;31e565&lt;/SPAN&gt;&lt;SPAN&gt;f&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 08:20:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-2-calculate-northbreeze-product-stock/m-p/277395#M2576</guid>
      <dc:creator>nicoschoenteich</dc:creator>
      <dc:date>2023-08-07T08:20:24Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - APIs - Task 2 - Calculate Northbreeze product stock</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-2-calculate-northbreeze-product-stock/m-p/277396#M2577</link>
      <description>&lt;P&gt;Same!&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 08:20:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-2-calculate-northbreeze-product-stock/m-p/277396#M2577</guid>
      <dc:creator>nicoschoenteich</dc:creator>
      <dc:date>2023-08-07T08:20:58Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - APIs - Task 2 - Calculate Northbreeze product stock</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-2-calculate-northbreeze-product-stock/m-p/277397#M2578</link>
      <description>&lt;P&gt;I used couple of ways to get the total number&lt;/P&gt;&lt;P&gt;1) wrote a small nodejs program, to get all the products and then using the filter and sum approach&lt;/P&gt;&lt;P&gt;2) used $apply to filter and aggregate. Took a while to get the correct syntax. But $apply &amp;amp; aggregate is so powerful, it was a great learning.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 08:22:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-2-calculate-northbreeze-product-stock/m-p/277397#M2578</guid>
      <dc:creator>SandipAgarwalla</dc:creator>
      <dc:date>2023-08-07T08:22:45Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - APIs - Task 2 - Calculate Northbreeze product stock</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-2-calculate-northbreeze-product-stock/m-p/277399#M2579</link>
      <description>&lt;P&gt;&lt;SPAN class=""&gt;30271&lt;/SPAN&gt;&lt;SPAN&gt;d&lt;/SPAN&gt;&lt;SPAN class=""&gt;0&lt;/SPAN&gt;&lt;SPAN class=""&gt;c&lt;/SPAN&gt;&lt;SPAN class=""&gt;9&lt;/SPAN&gt;&lt;SPAN class=""&gt;c&lt;/SPAN&gt;&lt;SPAN class=""&gt;3&lt;/SPAN&gt;&lt;SPAN&gt;a&lt;/SPAN&gt;&lt;SPAN class=""&gt;30e06&lt;/SPAN&gt;&lt;SPAN&gt;cb&lt;/SPAN&gt;&lt;SPAN class=""&gt;955411e56&lt;/SPAN&gt;&lt;SPAN class=""&gt;c&lt;/SPAN&gt;&lt;SPAN class=""&gt;388e591&lt;/SPAN&gt;&lt;SPAN&gt;ce&lt;/SPAN&gt;&lt;SPAN class=""&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;fa&lt;/SPAN&gt;&lt;SPAN class=""&gt;9606758&lt;/SPAN&gt;&lt;SPAN&gt;a&lt;/SPAN&gt;&lt;SPAN class=""&gt;269&lt;/SPAN&gt;&lt;SPAN&gt;cf&lt;/SPAN&gt;&lt;SPAN class=""&gt;97&lt;/SPAN&gt;&lt;SPAN&gt;fa&lt;/SPAN&gt;&lt;SPAN class=""&gt;7&lt;/SPAN&gt;&lt;SPAN class=""&gt;c&lt;/SPAN&gt;&lt;SPAN class=""&gt;9&lt;/SPAN&gt;&lt;SPAN&gt;cb&lt;/SPAN&gt;&lt;SPAN class=""&gt;4&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 08:31:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-2-calculate-northbreeze-product-stock/m-p/277399#M2579</guid>
      <dc:creator>harsh_itaverma</dc:creator>
      <dc:date>2023-08-07T08:31:31Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - APIs - Task 2 - Calculate Northbreeze product stock</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-2-calculate-northbreeze-product-stock/m-p/277409#M2581</link>
      <description>&lt;P&gt;Used data aggregation to get the total Unit in stocks; with $apply query option, first used a filter transformation to get Current Products and then used aggregate transformation with sum method to return the total value.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Being a JavaScript developer, just to make sure I was right; I did parse the response and used array traversing to get the total too! But the data aggregation approach was much easier and cleaner.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 08:49:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-2-calculate-northbreeze-product-stock/m-p/277409#M2581</guid>
      <dc:creator>harsh_itaverma</dc:creator>
      <dc:date>2023-08-07T08:49:27Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - APIs - Task 2 - Calculate Northbreeze product stock</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-2-calculate-northbreeze-product-stock/m-p/277413#M2583</link>
      <description>&lt;P&gt;Thanks for asking,&amp;nbsp;&lt;a href="https://community.sap.com/t5/user/viewprofilepage/user-id/401"&gt;@UweFetzer_se38&lt;/a&gt;&amp;nbsp;- the text in the "Your task" was a bit vague. I've modified it, thanks! And yes, it's just the number (total stock) that should be sent to be hashed &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 08:55:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-2-calculate-northbreeze-product-stock/m-p/277413#M2583</guid>
      <dc:creator>qmacro</dc:creator>
      <dc:date>2023-08-07T08:55:23Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - APIs - Task 2 - Calculate Northbreeze product stock</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-2-calculate-northbreeze-product-stock/m-p/277414#M2584</link>
      <description>&lt;P&gt;And lots more! Here are some interesting filter examples too&amp;nbsp;&lt;A href="https://github.com/SAP-samples/odata-basics-handsonsapdev/blob/main/filter.md" target="_blank"&gt;https://github.com/SAP-samples/odata-basics-handsonsapdev/blob/main/filter.md&lt;/A&gt;&amp;nbsp;cc&amp;nbsp;&lt;a href="https://community.sap.com/t5/user/viewprofilepage/user-id/898"&gt;@nicoschoenteich&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.sap.com/t5/user/viewprofilepage/user-id/10851"&gt;@ceedee666&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.sap.com/t5/user/viewprofilepage/user-id/14164"&gt;@SandipAgarwalla&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.sap.com/t5/user/viewprofilepage/user-id/154789"&gt;@harsh_itaverma&lt;/a&gt;&amp;nbsp;et al.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 08:59:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-2-calculate-northbreeze-product-stock/m-p/277414#M2584</guid>
      <dc:creator>qmacro</dc:creator>
      <dc:date>2023-08-07T08:59:40Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - APIs - Task 2 - Calculate Northbreeze product stock</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-2-calculate-northbreeze-product-stock/m-p/277415#M2585</link>
      <description>&lt;P&gt;It's great to have so many possibilities. Thanks for sharing, and thanks for doing this task in multiple ways &lt;span class="lia-unicode-emoji" title=":flexed_biceps:"&gt;💪&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 09:00:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-2-calculate-northbreeze-product-stock/m-p/277415#M2585</guid>
      <dc:creator>qmacro</dc:creator>
      <dc:date>2023-08-07T09:00:33Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - APIs - Task 2 - Calculate Northbreeze product stock</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-2-calculate-northbreeze-product-stock/m-p/277417#M2586</link>
      <description>&lt;P&gt;Nice once&amp;nbsp;&lt;a href="https://community.sap.com/t5/user/viewprofilepage/user-id/14164"&gt;@SandipAgarwalla&lt;/a&gt;&amp;nbsp;. In your JS program, what did you use? For example: in mine, I used filter and reduce, of course, as I'm a fan of the functional style of programming. I find reduce a particularly powerful and beautiful function.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've written a few posts on my blog about reduce. Here's one: &lt;A href="https://qmacro.org/blog/posts/2019/04/08/es6-reduce-and-pipe/" target="_self"&gt;ES6, reduce and pipe&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 09:03:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-2-calculate-northbreeze-product-stock/m-p/277417#M2586</guid>
      <dc:creator>qmacro</dc:creator>
      <dc:date>2023-08-07T09:03:36Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - APIs - Task 2 - Calculate Northbreeze product stock</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-2-calculate-northbreeze-product-stock/m-p/277418#M2587</link>
      <description>&lt;P&gt;Great work&amp;nbsp;&lt;a href="https://community.sap.com/t5/user/viewprofilepage/user-id/154789"&gt;@harsh_itaverma&lt;/a&gt;&amp;nbsp;! Feel free also to share more detail of what you did. I love learning from other folks' approaches.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 09:04:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-apis-task-2-calculate-northbreeze-product-stock/m-p/277418#M2587</guid>
      <dc:creator>qmacro</dc:creator>
      <dc:date>2023-08-07T09:04:23Z</dc:date>
    </item>
  </channel>
</rss>

