<?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: Error while trying to read data from xsodata with multiple input parameters in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/error-while-trying-to-read-data-from-xsodata-with-multiple-input-parameters/qaa-p/12432727#M4655235</link>
    <description>&lt;P&gt;Hi Florian,&lt;/P&gt;&lt;P&gt;Thanks for your response.&lt;/P&gt;&lt;P&gt;Date parameters are defined as decimal in SAP standard view.It worked for me when I pass data with format (YYYYMMDD+m) in Date input parameters.&lt;/P&gt;&lt;P&gt;For example:- 20210429m&lt;/P&gt;&lt;P&gt;Issue is resolved now &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Om&lt;/P&gt;</description>
    <pubDate>Thu, 20 May 2021 12:07:39 GMT</pubDate>
    <dc:creator>OmPrakashJha</dc:creator>
    <dc:date>2021-05-20T12:07:39Z</dc:date>
    <item>
      <title>Error while trying to read data from xsodata with multiple input parameters</title>
      <link>https://community.sap.com/t5/technology-q-a/error-while-trying-to-read-data-from-xsodata-with-multiple-input-parameters/qaq-p/12432725</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
  &lt;P&gt;I have created an XSODATA service using a calculation view with multiple input parameters. Below is the code syntax.&lt;/P&gt;
  &lt;P&gt;service { "xxx_pal2::PAL2_INTRADAY_FORECAST" as "xyz" with ("LocationId", "ForecastDate", "StartTime", "EndTime", "ForecastValue" ) keys generate local "ProductId" parameters via entity "InputParams";}&lt;/P&gt;
  &lt;P&gt;When I try to preview data in browser. It throws error.&lt;/P&gt;
  &lt;P&gt;&lt;U&gt;URL 1 : &lt;/U&gt;&lt;A href="https://Port//Package/PAL2_INTRADAY_FORECAST.xsodata/xyz?$format=json" target="test_blank"&gt;https://Port//Package/PAL2_INTRADAY_FORECAST.xsodata/xyz?$format=json&lt;/A&gt;&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;&lt;U&gt;error:&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;{ "error": { "code": "", "message": { "lang": "en-US", "value": "Resource not found for the segment 'xyz' at position 0."}}}
&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;&lt;U&gt;URL 2:&lt;/U&gt;&lt;/P&gt;
  &lt;P&gt;https://Port//Package/PAL2_INTRADAY_FORECAST.xsodata/InputParams(P_SAPClient='100',P_DiagnosticId='0',P_SlotTimeFrame='120',P_DateFrom='0',P_DateTo='0',P_ForecastDateFrom=20210429,P_ForecastDateTo=20210429)/Results?$format=json&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;&lt;U&gt;error:&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;{ "error": { "code": "", "message": { "lang": "en-US", "value": "Illegal query syntax."}}}&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;Could you please check if I am passing input parameter correctly? I have also attached metadata screenshot.&lt;/P&gt;</description>
      <pubDate>Wed, 19 May 2021 06:14:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/error-while-trying-to-read-data-from-xsodata-with-multiple-input-parameters/qaq-p/12432725</guid>
      <dc:creator>OmPrakashJha</dc:creator>
      <dc:date>2021-05-19T06:14:15Z</dc:date>
    </item>
    <item>
      <title>Re: Error while trying to read data from xsodata with multiple input parameters</title>
      <link>https://community.sap.com/t5/technology-q-a/error-while-trying-to-read-data-from-xsodata-with-multiple-input-parameters/qaa-p/12432726#M4655234</link>
      <description>&lt;P&gt;The 2nd URL has the right format, but I guess you get the error, because of how you pass the date parameters (P_DateFrom, P_DateTo, P_ForecastDateFrom, P_ForecastDateTo).&lt;/P&gt;&lt;P&gt;If the parameters are typed as strings you have to enclose it in single quotes, if they are real dates, you should pass it like following, for instance:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;P_ForecastDateFrom=datetime'2021-05-19'&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 19 May 2021 08:46:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/error-while-trying-to-read-data-from-xsodata-with-multiple-input-parameters/qaa-p/12432726#M4655234</guid>
      <dc:creator>pfefferf</dc:creator>
      <dc:date>2021-05-19T08:46:11Z</dc:date>
    </item>
    <item>
      <title>Re: Error while trying to read data from xsodata with multiple input parameters</title>
      <link>https://community.sap.com/t5/technology-q-a/error-while-trying-to-read-data-from-xsodata-with-multiple-input-parameters/qaa-p/12432727#M4655235</link>
      <description>&lt;P&gt;Hi Florian,&lt;/P&gt;&lt;P&gt;Thanks for your response.&lt;/P&gt;&lt;P&gt;Date parameters are defined as decimal in SAP standard view.It worked for me when I pass data with format (YYYYMMDD+m) in Date input parameters.&lt;/P&gt;&lt;P&gt;For example:- 20210429m&lt;/P&gt;&lt;P&gt;Issue is resolved now &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Om&lt;/P&gt;</description>
      <pubDate>Thu, 20 May 2021 12:07:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/error-while-trying-to-read-data-from-xsodata-with-multiple-input-parameters/qaa-p/12432727#M4655235</guid>
      <dc:creator>OmPrakashJha</dc:creator>
      <dc:date>2021-05-20T12:07:39Z</dc:date>
    </item>
  </channel>
</rss>

