<?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: How to use parameterized external service programatically in CAP node.js in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/how-to-use-parameterized-external-service-programatically-in-cap-node-js/qaa-p/12715538#M4771709</link>
    <description>&lt;P&gt;Hi  &lt;SPAN class="mention-scrubbed"&gt;kanikamalhotra&lt;/SPAN&gt; ,&lt;/P&gt;&lt;P&gt;"Key" is a reserved keyword, so it must be escaped and you don't need quotes around the value.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT.from('Abc(![Key]:123)')&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Best regards,&lt;BR /&gt;David&lt;/P&gt;</description>
    <pubDate>Mon, 06 Feb 2023 08:32:02 GMT</pubDate>
    <dc:creator>david_kunz2</dc:creator>
    <dc:date>2023-02-06T08:32:02Z</dc:date>
    <item>
      <title>How to use parameterized external service programatically in CAP node.js</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-use-parameterized-external-service-programatically-in-cap-node-js/qaq-p/12715537</link>
      <description>&lt;P&gt;Hi Experts &lt;/P&gt;
  &lt;P&gt;I need to programmatically call an external parameterized service in my cap application.&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;External service url:&lt;/STRONG&gt; &lt;/P&gt;
  &lt;P&gt;/servicename/ABC(Key=‘123’)/Set&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;CAP service.cds file: &lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;entity Abc(Key:String(3)) as projection on ext.ABC;&lt;/P&gt;
  &lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;CAP Node.js call:&lt;/STRONG&gt; srv.run(SELECT.from(‘Abc(Key:’123’)’)); // tried passing in single quotes and template string both&lt;/P&gt;
  &lt;P&gt;&lt;EM&gt;This created a url like: dest.servicename/?$select=Key &lt;/EM&gt;&lt;/P&gt;
  &lt;P&gt;&lt;BR /&gt;&lt;EM&gt;Note: The external service is made out of calc view with parameters&lt;/EM&gt;&lt;BR /&gt;&lt;/P&gt;
  &lt;P&gt;&lt;BR /&gt;Kindly help. &lt;SPAN class="mention-scrubbed"&gt;david.kunz2&lt;/SPAN&gt; &lt;SPAN class="mention-scrubbed"&gt;gregorwolf&lt;/SPAN&gt; &lt;BR /&gt;&lt;/P&gt;
  &lt;P&gt;Thanks&lt;/P&gt;
  &lt;P&gt;Kanika&lt;/P&gt;</description>
      <pubDate>Sat, 04 Feb 2023 07:31:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-use-parameterized-external-service-programatically-in-cap-node-js/qaq-p/12715537</guid>
      <dc:creator>KM11</dc:creator>
      <dc:date>2023-02-04T07:31:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to use parameterized external service programatically in CAP node.js</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-use-parameterized-external-service-programatically-in-cap-node-js/qaa-p/12715538#M4771709</link>
      <description>&lt;P&gt;Hi  &lt;SPAN class="mention-scrubbed"&gt;kanikamalhotra&lt;/SPAN&gt; ,&lt;/P&gt;&lt;P&gt;"Key" is a reserved keyword, so it must be escaped and you don't need quotes around the value.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT.from('Abc(![Key]:123)')&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Best regards,&lt;BR /&gt;David&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2023 08:32:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-use-parameterized-external-service-programatically-in-cap-node-js/qaa-p/12715538#M4771709</guid>
      <dc:creator>david_kunz2</dc:creator>
      <dc:date>2023-02-06T08:32:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to use parameterized external service programatically in CAP node.js</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-use-parameterized-external-service-programatically-in-cap-node-js/qaa-p/12715539#M4771710</link>
      <description>&lt;P&gt;Hi &lt;SPAN class="mention-scrubbed"&gt;david.kunz2&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;Thanks for the reply!!&lt;BR /&gt;Well, I wrote 'key' hypothetically to avoid using exact names as my service.&lt;/P&gt;&lt;P&gt;Passing with and without quotes around the value also, didnt work.&lt;BR /&gt;Finally, I found the cqn way of passing which is finally making the correct URL '/ABC(Key=‘123’)/Set'.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Would be happy to try any other way of achieving the same &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; SELECT: { from: { ref: [{ id: "Abc", where: [{ ref: ["key"] }, "=", { val: `${value}` }] }, "Set"] }, columns: [ { ref: ["*"] } ], where: [{ ref: ["fieldname"] }, "=", { val: `${value}` }], } };&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;SELECT: { 
    from: { ref: [{ id: "Abc", where: [{ ref: ["key"] }, "=", { val: `${value}` }] }, "Set"] }, 
    columns: [ { ref: ["*"] } ], 
    where: [{ ref: ["fieldname"] }, "=", { val: `${value}` }], 
  } 
};&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 06 Feb 2023 09:16:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-use-parameterized-external-service-programatically-in-cap-node-js/qaa-p/12715539#M4771710</guid>
      <dc:creator>KM11</dc:creator>
      <dc:date>2023-02-06T09:16:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to use parameterized external service programatically in CAP node.js</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-use-parameterized-external-service-programatically-in-cap-node-js/qaa-p/12715540#M4771711</link>
      <description>&lt;P&gt;Hi &lt;SPAN class="mention-scrubbed"&gt;kanikamalhotra&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;Iam also working on same requirement now. can you please share me code snippet once.&lt;/P&gt;&lt;P&gt;Thanks in Advance,&lt;/P&gt;&lt;P&gt;Sairam&lt;/P&gt;</description>
      <pubDate>Thu, 13 Apr 2023 12:25:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-use-parameterized-external-service-programatically-in-cap-node-js/qaa-p/12715540#M4771711</guid>
      <dc:creator>sairampadarthi</dc:creator>
      <dc:date>2023-04-13T12:25:05Z</dc:date>
    </item>
  </channel>
</rss>

