<?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 - Full-Stack - Back-end Development – API Exposure (Week 2) in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-full-stack-back-end-development-api-exposure-week-2/m-p/292048#M4280</link>
    <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ziyangwong238_0-1696352809888.png" style="width: 753px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/46144iFE4FB493336827E0/image-dimensions/753x192?v=v2" width="753" height="192" role="button" title="ziyangwong238_0-1696352809888.png" alt="ziyangwong238_0-1696352809888.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 03 Oct 2023 17:07:07 GMT</pubDate>
    <dc:creator>ziyangwong238</dc:creator>
    <dc:date>2023-10-03T17:07:07Z</dc:date>
    <item>
      <title>SAP Developer Challenge - Full-Stack - Back-end Development – API Exposure (Week 2)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-full-stack-back-end-development-api-exposure-week-2/m-p/286252#M4102</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Welcome to the second week of this month’s SAP Developer Challenge. If you have not yet read the &lt;/SPAN&gt;&lt;A href="https://blogs.sap.com/2023/09/06/sap-developer-challenge-full-stack-sap-cap-sap-fiori-elements/" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;initial blog post&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;, please do so and complete the &lt;/SPAN&gt;&lt;A href="https://groups.community.sap.com/t5/application-development-discussions/sap-developer-challenge-full-stack-project-set-up-and-database-modeling/td-p/284674" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;first week’s task&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt; as we will build upon it.&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;H3&gt;Task Description&amp;nbsp;&lt;/H3&gt;&lt;P&gt;&lt;SPAN&gt;With a robust back-end architecture and initial data records in place, we proceed to automatically update our models with data. In &lt;/SPAN&gt;&lt;A href="https://groups.community.sap.com/t5/application-development-discussions/sap-developer-challenge-full-stack-project-set-up-and-database-modeling/td-p/284674" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;week one&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;, we modeled our database and manually added records to our entities using csv files.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;We now want to implement an API endpoint that will allow a user to provide the number of questions they wish to associate with a test, from the browser. We will then process that by selecting the given number of questions (yet to be associated with a test) from our currently existing questions model and associate/link them to a test automatically.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN&gt;Note&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;STRONG&gt;&lt;I&gt;&lt;SPAN&gt;A question cannot be used in more than one test.&lt;/SPAN&gt;&lt;/I&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Below is a process flow diagram of the API endpoint to be implemented:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Api endpoint process flow(2).png" style="width: 999px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/43860i92ACDF4DCB5094EB/image-size/large?v=v2&amp;amp;px=999" role="button" title="Api endpoint process flow(2).png" alt="Api endpoint process flow(2).png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;H3&gt;Task Outline&amp;nbsp;&lt;/H3&gt;&lt;P&gt;&lt;SPAN&gt;Our goal is to implement an API layer that will later connect our back-end to the front-end. After implementation, we need to expose the API to allow front-end components seamlessly access it.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN&gt;What is an action?&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;An action can be defined as an operation to be performed on one or several entities within a service, which allows for definition of custom behavior or functionality based on the business rules. There are two main &lt;/SPAN&gt;&lt;A href="https://docs.oasis-open.org/odata/odata/v4.0/os/part1-protocol/odata-v4.0-os-part1-protocol.html#_Toc372793737" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;types of actions in OData&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;STRONG&gt;&lt;I&gt;&lt;SPAN&gt;Bound &lt;/SPAN&gt;&lt;/I&gt;&lt;/STRONG&gt;&lt;SPAN&gt;and &lt;/SPAN&gt;&lt;STRONG&gt;&lt;I&gt;&lt;SPAN&gt;Unbound&lt;/SPAN&gt;&lt;/I&gt;&lt;/STRONG&gt;&lt;SPAN&gt;.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN&gt;Difference between bound and unbound actions&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Bound actions are associated with a specific entity type and can only be invoked on instances of that entity type. Unbound actions on the other hand are not tied to any specific entity type and can be invoked independently on any particular entity instance. Unbound actions are mostly used to perform operations that do not require a specific entity context.&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;We are therefore &lt;/SPAN&gt;&lt;STRONG&gt;&lt;I&gt;&lt;SPAN&gt;interested in a bound action&lt;/SPAN&gt;&lt;/I&gt;&lt;/STRONG&gt;&lt;SPAN&gt; as we would like to perform operations related to the Tests entity instance.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;H3&gt;Steps&amp;nbsp;&lt;/H3&gt;&lt;OL&gt;&lt;LI&gt;&lt;SPAN&gt;In the &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;srv &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;directory, create a file named &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;cat-service.js. &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;C&lt;/SPAN&gt;&lt;SPAN&gt;opy the following lines of code and paste them in the file:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const cds = require('@sap/cds') 

module.exports = class DevChallengeService extends cds.ApplicationService { 
    init() { 
        return super.init() 
    } 

    // TODO: Implement the bound action: assignQuestionsToTest  
} &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; 2. Implement a bound action named &lt;/SPAN&gt;&lt;STRONG&gt;&lt;I&gt;&lt;SPAN&gt;assignQuestionsToTest &lt;/SPAN&gt;&lt;/I&gt;&lt;/STRONG&gt;&lt;SPAN&gt;in the &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;cat-service.js&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt; file we just created. This action should contain the logic explained and illustrated in the API endpoint Process Flow diagram above.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Note&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;: the &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;questionsCount &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;value is passed as a parameter to the &lt;/SPAN&gt;&lt;STRONG&gt;&lt;I&gt;&lt;SPAN&gt;assignQuestionsToTest &lt;/SPAN&gt;&lt;/I&gt;&lt;/STRONG&gt;&lt;SPAN&gt;action.&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; 3. In the action implementation, return a string with the message you want conveyed to the user based on the result of the action execution. Example: “2 questions successfully added to the test”.&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;4. &lt;/SPAN&gt;&lt;A href="https://cap.cloud.sap/docs/guides/providing-services#modeling-in-cds" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;Define the bound action&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt; - &lt;/SPAN&gt;&lt;STRONG&gt;&lt;I&gt;&lt;SPAN&gt;assignQuestionsToTest&lt;/SPAN&gt;&lt;/I&gt;&lt;/STRONG&gt;&lt;SPAN&gt; in &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;srv/cat-service.cds&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt; file.&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;H3&gt;Resources:&amp;nbsp;&amp;nbsp;&lt;/H3&gt;&lt;P&gt;&lt;A href="https://cap.cloud.sap/docs/guides/providing-services#bound-vs-unbound" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;Bound vs Unbound&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.oasis-open.org/odata/odata/v4.0/os/part1-protocol/odata-v4.0-os-part1-protocol.html#_Toc372793737" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;Read more on bound and unbound actions (11.5.4.1 Invoking an Action)&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://cap.cloud.sap/docs/guides/providing-services#modeling-in-cds" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;Modeling in CDS&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://cap.cloud.sap/docs/node.js/cds-ql" target="_self"&gt;&lt;SPAN&gt;Querying in JavaScript&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;H3&gt;Task Checklist – post screenshot in the reply section&amp;nbsp;&lt;/H3&gt;&lt;P&gt;&lt;SPAN&gt;Create a file named &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;test.http&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt; in the root directory of our project. Copy and paste the following code that will enable you to make an API call. Feel free to use other tools to test the endpoint.&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Replace &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;YOUR_TEST_ID&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt; in the link with one of the test IDs you manually populated in &lt;/SPAN&gt;&lt;A href="https://groups.community.sap.com/t5/application-development-discussions/sap-developer-challenge-full-stack-project-set-up-and-database-modeling/td-p/284674" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;week 1&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;POST http://localhost:4004/dev-challenge/Tests(ID=YOUR_TEST_ID,IsActiveEntity=true)/DevChallengeService.assignQuestionsToTest 
Content-Type: application/json 

{"questionsCount":3} &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Click on &lt;EM&gt;Send Request&lt;/EM&gt; to make a call to the implemented endpoint. The response should return a &lt;STRONG&gt;HTTP 200 status code&lt;/STRONG&gt; with a &lt;STRONG&gt;message&lt;/STRONG&gt; (the message can vary depending on the number of questions requested, the state of your data and validation status).&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dinah_1-1694581027064.png" style="width: 572px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/43854iC333EB818FFD419A/image-dimensions/572x134?v=v2" width="572" height="134" role="button" title="dinah_1-1694581027064.png" alt="dinah_1-1694581027064.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 13:55:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-full-stack-back-end-development-api-exposure-week-2/m-p/286252#M4102</guid>
      <dc:creator>dinah</dc:creator>
      <dc:date>2023-09-14T13:55:12Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - Full-Stack - Back-end Development – API Exposure (Week 2)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-full-stack-back-end-development-api-exposure-week-2/m-p/286364#M4105</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2023-09-13_14-04-49.png" style="width: 999px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/43885iBB29E35B3FE5B279/image-size/large?v=v2&amp;amp;px=999" role="button" title="2023-09-13_14-04-49.png" alt="2023-09-13_14-04-49.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2023 12:17:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-full-stack-back-end-development-api-exposure-week-2/m-p/286364#M4105</guid>
      <dc:creator>Trulov</dc:creator>
      <dc:date>2023-09-13T12:17:20Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - Full-Stack - Back-end Development – API Exposure (Week 2)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-full-stack-back-end-development-api-exposure-week-2/m-p/286366#M4106</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="harsh_itaverma_0-1694607660316.png" style="width: 400px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/43886iEB00F3A64873A1A9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="harsh_itaverma_0-1694607660316.png" alt="harsh_itaverma_0-1694607660316.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2023 12:21:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-full-stack-back-end-development-api-exposure-week-2/m-p/286366#M4106</guid>
      <dc:creator>harsh_itaverma</dc:creator>
      <dc:date>2023-09-13T12:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - Full-Stack - Back-end Development – API Exposure (Week 2)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-full-stack-back-end-development-api-exposure-week-2/m-p/286491#M4112</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="miyasuta_0-1694637020040.png" style="width: 400px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/43921i2CBC38AB2B2EC60D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="miyasuta_0-1694637020040.png" alt="miyasuta_0-1694637020040.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2023 20:30:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-full-stack-back-end-development-api-exposure-week-2/m-p/286491#M4112</guid>
      <dc:creator>MioYasutake</dc:creator>
      <dc:date>2023-09-13T20:30:28Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - Full-Stack - Back-end Development – API Exposure (Week 2)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-full-stack-back-end-development-api-exposure-week-2/m-p/286495#M4113</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="stickman_0x00_0-1694637745907.png" style="width: 400px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/43922i24828F85C114EA1C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="stickman_0x00_0-1694637745907.png" alt="stickman_0x00_0-1694637745907.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This blog post helped a lot on how to do select and update, &lt;A href="https://answers.sap.com/questions/13165150/select-inside-action.html" target="_blank" rel="noopener"&gt;https://answers.sap.com/questions/13165150/select-inside-action.html&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;I think you guys should have provide more resources honestly, for someone that never did something like this, I still don't know how to return an error if I wanted instead of a string like in that blog post.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2023 20:44:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-full-stack-back-end-development-api-exposure-week-2/m-p/286495#M4113</guid>
      <dc:creator>stickman_0x00</dc:creator>
      <dc:date>2023-09-13T20:44:55Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - Full-Stack - Back-end Development – API Exposure (Week 2)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-full-stack-back-end-development-api-exposure-week-2/m-p/286527#M4115</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="choujiacheng_0-1694658873316.png" style="width: 400px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/43934i71B73D09B3C1E00F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="choujiacheng_0-1694658873316.png" alt="choujiacheng_0-1694658873316.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 02:34:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-full-stack-back-end-development-api-exposure-week-2/m-p/286527#M4115</guid>
      <dc:creator>choujiacheng</dc:creator>
      <dc:date>2023-09-14T02:34:40Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - Full-Stack - Back-end Development – API Exposure (Week 2)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-full-stack-back-end-development-api-exposure-week-2/m-p/286572#M4121</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screesnhot3.png" style="width: 999px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/43953iC3453F9CBB842918/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screesnhot3.png" alt="Screesnhot3.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screesnhot2.png" style="width: 999px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/43954i3D5669E46DF0261D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screesnhot2.png" alt="Screesnhot2.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screesnhot1.png" style="width: 999px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/43955i97F8C916115926F1/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screesnhot1.png" alt="Screesnhot1.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 06:54:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-full-stack-back-end-development-api-exposure-week-2/m-p/286572#M4121</guid>
      <dc:creator>jens_borau</dc:creator>
      <dc:date>2023-09-14T06:54:08Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - Full-Stack - Back-end Development – API Exposure (Week 2)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-full-stack-back-end-development-api-exposure-week-2/m-p/286619#M4122</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SandipAgarwalla_0-1694681092808.png" style="width: 400px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/43982iA509001A8031F462/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SandipAgarwalla_0-1694681092808.png" alt="SandipAgarwalla_0-1694681092808.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 08:44:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-full-stack-back-end-development-api-exposure-week-2/m-p/286619#M4122</guid>
      <dc:creator>SandipAgarwalla</dc:creator>
      <dc:date>2023-09-14T08:44:59Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - Full-Stack - Back-end Development – API Exposure (Week 2)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-full-stack-back-end-development-api-exposure-week-2/m-p/286703#M4126</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="thomas_jung_0-1694698984233.png" style="width: 400px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/43995i4ECA9E4D0F3A1259/image-size/medium?v=v2&amp;amp;px=400" role="button" title="thomas_jung_0-1694698984233.png" alt="thomas_jung_0-1694698984233.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="thomas_jung_1-1694698992755.png" style="width: 400px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/43996i5B1D2E9C5C282621/image-size/medium?v=v2&amp;amp;px=400" role="button" title="thomas_jung_1-1694698992755.png" alt="thomas_jung_1-1694698992755.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 13:43:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-full-stack-back-end-development-api-exposure-week-2/m-p/286703#M4126</guid>
      <dc:creator>thomas_jung</dc:creator>
      <dc:date>2023-09-14T13:43:24Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - Full-Stack - Back-end Development – API Exposure (Week 2)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-full-stack-back-end-development-api-exposure-week-2/m-p/286705#M4127</link>
      <description>&lt;P&gt;If you want to return an error instead of the message:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt; (!questionsCount || questionsCount &amp;lt; &lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;){&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;throw&lt;/SPAN&gt; &lt;SPAN&gt;new&lt;/SPAN&gt;&lt;SPAN&gt; Error(&lt;/SPAN&gt;&lt;SPAN&gt;`You asked for zero questions. Nothing to do.`&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 14 Sep 2023 13:45:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-full-stack-back-end-development-api-exposure-week-2/m-p/286705#M4127</guid>
      <dc:creator>thomas_jung</dc:creator>
      <dc:date>2023-09-14T13:45:21Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - Full-Stack - Back-end Development – API Exposure (Week 2)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-full-stack-back-end-development-api-exposure-week-2/m-p/286709#M4128</link>
      <description>&lt;P&gt;You ask a valuable question about throwing the error.&amp;nbsp; Just this little change in handler code (throwing instead of returning the message) will later impact the UI.&amp;nbsp; Returning a message will result in an informational dialog:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="thomas_jung_2-1694699276545.png" style="width: 400px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/43997iF1058F8A9AD05388/image-size/medium?v=v2&amp;amp;px=400" role="button" title="thomas_jung_2-1694699276545.png" alt="thomas_jung_2-1694699276545.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Whereas throwing the message as an error will result in an error dialog on the frontend.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="thomas_jung_3-1694699324631.png" style="width: 400px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/43998iB33D1426C74E14EE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="thomas_jung_3-1694699324631.png" alt="thomas_jung_3-1694699324631.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 13:50:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-full-stack-back-end-development-api-exposure-week-2/m-p/286709#M4128</guid>
      <dc:creator>thomas_jung</dc:creator>
      <dc:date>2023-09-14T13:50:28Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - Full-Stack - Back-end Development – API Exposure (Week 2)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-full-stack-back-end-development-api-exposure-week-2/m-p/286717#M4129</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Erdaleser_0-1694700693735.png" style="width: 803px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/44001iD6B359E463B53E86/image-dimensions/803x271?v=v2" width="803" height="271" role="button" title="Erdaleser_0-1694700693735.png" alt="Erdaleser_0-1694700693735.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 14:11:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-full-stack-back-end-development-api-exposure-week-2/m-p/286717#M4129</guid>
      <dc:creator>Erdaleser</dc:creator>
      <dc:date>2023-09-14T14:11:59Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - Full-Stack - Back-end Development – API Exposure (Week 2)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-full-stack-back-end-development-api-exposure-week-2/m-p/286726#M4130</link>
      <description>&lt;P&gt;Really cool! &lt;span class="lia-unicode-emoji" title=":sign_of_the_horns:"&gt;🤘&lt;/span&gt; Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 14:31:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-full-stack-back-end-development-api-exposure-week-2/m-p/286726#M4130</guid>
      <dc:creator>stickman_0x00</dc:creator>
      <dc:date>2023-09-14T14:31:34Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - Full-Stack - Back-end Development – API Exposure (Week 2)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-full-stack-back-end-development-api-exposure-week-2/m-p/286920#M4142</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2023-09-15 at 12.57.24 PM.png" style="width: 999px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/44084iC9D2505C2E7FF351/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2023-09-15 at 12.57.24 PM.png" alt="Screenshot 2023-09-15 at 12.57.24 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Sep 2023 07:29:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-full-stack-back-end-development-api-exposure-week-2/m-p/286920#M4142</guid>
      <dc:creator>priyankaG</dc:creator>
      <dc:date>2023-09-15T07:29:21Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - Full-Stack - Back-end Development – API Exposure (Week 2)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-full-stack-back-end-development-api-exposure-week-2/m-p/286923#M4143</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="albravo_0-1694763121384.png" style="width: 400px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/44085iA953167134E074AC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="albravo_0-1694763121384.png" alt="albravo_0-1694763121384.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Sep 2023 07:32:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-full-stack-back-end-development-api-exposure-week-2/m-p/286923#M4143</guid>
      <dc:creator>ruben_alvarez</dc:creator>
      <dc:date>2023-09-15T07:32:11Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - Full-Stack - Back-end Development – API Exposure (Week 2)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-full-stack-back-end-development-api-exposure-week-2/m-p/286924#M4144</link>
      <description>&lt;P&gt;well I am&amp;nbsp; using req.reject() to return error. Will that also have the similar impact on UI ??&lt;/P&gt;</description>
      <pubDate>Fri, 15 Sep 2023 07:35:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-full-stack-back-end-development-api-exposure-week-2/m-p/286924#M4144</guid>
      <dc:creator>priyankaG</dc:creator>
      <dc:date>2023-09-15T07:35:20Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - Full-Stack - Back-end Development – API Exposure (Week 2)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-full-stack-back-end-development-api-exposure-week-2/m-p/286957#M4145</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Nicolas_0-1694770605492.png" style="width: 400px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/44098iD86D746B3E7FF3D4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Nicolas_0-1694770605492.png" alt="Nicolas_0-1694770605492.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Sep 2023 09:36:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-full-stack-back-end-development-api-exposure-week-2/m-p/286957#M4145</guid>
      <dc:creator>Nicolas</dc:creator>
      <dc:date>2023-09-15T09:36:54Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - Full-Stack - Back-end Development – API Exposure (Week 2)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-full-stack-back-end-development-api-exposure-week-2/m-p/287024#M4147</link>
      <description>&lt;P&gt;Yes that will result in the same. req.reject (or req.error)&amp;nbsp;&lt;A href="https://cap.cloud.sap/docs/node.js/events#req-reject" target="_blank"&gt;Events and Requests | CAPire (cloud.sap)&lt;/A&gt;&amp;nbsp;- will result in the error dialog in the Fiori UI as well.&amp;nbsp; When you throw any error from within a handler the CAP framework will catch that and build the request for you the same as directly calling req.reject or req.error.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;If you inhert from cds.Service or cds.ApplicationService you can directly hook your handlers without having the the whole this.on... construct.&amp;nbsp; Then you don't use the req... calls but just throw or return the results.&amp;nbsp;&lt;BR /&gt;&lt;A href="https://cap.cloud.sap/docs/node.js/events#req-reject" target="_blank"&gt;Events and Requests | CAPire (cloud.sap)&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Sep 2023 14:36:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-full-stack-back-end-development-api-exposure-week-2/m-p/287024#M4147</guid>
      <dc:creator>thomas_jung</dc:creator>
      <dc:date>2023-09-15T14:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - Full-Stack - Back-end Development – API Exposure (Week 2)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-full-stack-back-end-development-api-exposure-week-2/m-p/287132#M4150</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Data Setup : 5 Q's available for assignment&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="agnissh_0-1694850328390.png" style="width: 400px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/44158i1638D6D55CF73E96/image-size/medium?v=v2&amp;amp;px=400" role="button" title="agnissh_0-1694850328390.png" alt="agnissh_0-1694850328390.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Linking - 3 Q's&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="agnissh_1-1694850373212.png" style="width: 400px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/44159i6A08D26D6AAD023A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="agnissh_1-1694850373212.png" alt="agnissh_1-1694850373212.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Trying to Link 3 more Q's&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="agnissh_2-1694851048534.png" style="width: 400px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/44160iE6F3A21640745A66/image-size/medium?v=v2&amp;amp;px=400" role="button" title="agnissh_2-1694851048534.png" alt="agnissh_2-1694851048534.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Again, trying to add 3 Q's&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="agnissh_4-1694851092066.png" style="width: 400px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/44162i3F42E73F3DD534D1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="agnissh_4-1694851092066.png" alt="agnissh_4-1694851092066.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Sep 2023 07:59:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-full-stack-back-end-development-api-exposure-week-2/m-p/287132#M4150</guid>
      <dc:creator>agnissh</dc:creator>
      <dc:date>2023-09-16T07:59:11Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Developer Challenge - Full-Stack - Back-end Development – API Exposure (Week 2)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-full-stack-back-end-development-api-exposure-week-2/m-p/287181#M4153</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Alpesa_0-1694963336278.png" style="width: 718px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/44212iA1FD7FD4756A3C25/image-dimensions/718x185?v=v2" width="718" height="185" role="button" title="Alpesa_0-1694963336278.png" alt="Alpesa_0-1694963336278.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Sep 2023 15:09:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-developer-challenge-full-stack-back-end-development-api-exposure-week-2/m-p/287181#M4153</guid>
      <dc:creator>Alpesa1990</dc:creator>
      <dc:date>2023-09-17T15:09:16Z</dc:date>
    </item>
  </channel>
</rss>

