<?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: Web Client Procedure Returns a third undocumented column INSTANCE in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/web-client-procedure-returns-a-third-undocumented-column-instance/qaa-p/13847879#M4878722</link>
    <description>&lt;P&gt;IIRC the Instance column was added to the result set in 17.0.1 if you are using a 17.0.1 (or newer) database. The purpose of the column is to allow support of having multiple attribute values with the same name. This change is documented on &lt;A href="http://dcx.sap.com/index.html#sqla170/en/html/85df02cf9625474683ac870846782ad1.html*loio85df02cf9625474683ac870846782ad1"&gt;this page&lt;/A&gt; (scroll down to Web service changes), and you can read more about it &lt;A href="http://dcx.sap.com/index.html#sqla170/en/html/3be25cc96c5f10148d5def8d7421730c.html"&gt;here&lt;/A&gt;.&lt;/P&gt;</description>
    <pubDate>Tue, 17 Jul 2018 13:24:36 GMT</pubDate>
    <dc:creator>MarkCulp</dc:creator>
    <dc:date>2018-07-17T13:24:36Z</dc:date>
    <item>
      <title>Web Client Procedure Returns a third undocumented column INSTANCE</title>
      <link>https://community.sap.com/t5/technology-q-a/web-client-procedure-returns-a-third-undocumented-column-instance/qaq-p/13847878</link>
      <description>&lt;P&gt;I have changed database file to 17.0.9.4803 from 16.0.0.2344. 
After that change my Web Client Procedures no longer worked. The login proecedure can be seen as an example.&lt;/P&gt;
&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;CREATE&lt;/SPAN&gt; &lt;SPAN&gt;OR&lt;/SPAN&gt; &lt;SPAN&gt;REPLACE&lt;/SPAN&gt; &lt;SPAN&gt;PROCEDURE&lt;/SPAN&gt; &lt;SPAN&gt;"dba"&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;"alfresco_login"&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;
&lt;SPAN&gt;in&lt;/SPAN&gt; &lt;SPAN&gt;"HostURL"&lt;/SPAN&gt; &lt;SPAN&gt;varchar&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;256&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;
&lt;SPAN&gt;in&lt;/SPAN&gt; &lt;SPAN&gt;"u"&lt;/SPAN&gt; &lt;SPAN&gt;varchar&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;256&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;
&lt;SPAN&gt;in&lt;/SPAN&gt; &lt;SPAN&gt;"pw"&lt;/SPAN&gt; &lt;SPAN&gt;varchar&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;256&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;
&lt;SPAN&gt;)&lt;/SPAN&gt;
&lt;SPAN&gt;result&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"Attribute"&lt;/SPAN&gt; &lt;SPAN&gt;long&lt;/SPAN&gt; &lt;SPAN&gt;varchar&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt; &lt;SPAN&gt;"Value"&lt;/SPAN&gt; &lt;SPAN&gt;long&lt;/SPAN&gt; &lt;SPAN&gt;varchar&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;
&lt;SPAN&gt;url&lt;/SPAN&gt; &lt;SPAN&gt;'!HostURL/alfresco/service/api/login'&lt;/SPAN&gt;
&lt;SPAN&gt;type&lt;/SPAN&gt; &lt;SPAN&gt;'HTTP:GET'&lt;/SPAN&gt;
&lt;SPAN&gt;header&lt;/SPAN&gt; &lt;SPAN&gt;'User-Agent:SATest'&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;/DIV&gt;


&lt;P&gt;I get an error Message SQLCODE -866 &lt;EM&gt;returned a result set with a different schema.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;To take a look at the default result set I have declared the Procedure without the result clause and instead of &lt;/P&gt;
&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;&lt;/SPAN&gt;select * from dba.alfresco_login(...)
&lt;/PRE&gt;&lt;/DIV&gt;


&lt;P&gt;I used &lt;/P&gt;
&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;&lt;/SPAN&gt;call dba.alfresco_login(...)
&lt;/PRE&gt;&lt;/DIV&gt;


&lt;P&gt;This showed a third column &lt;STRONG&gt;INSTANCE&lt;/STRONG&gt; that I was not aware of before. &lt;/P&gt;
&lt;P&gt;In the documentation &lt;A href="https://help.sap.com/viewer/40c01c3500744c85a02db71276495de5/17.0/en-US/3be475ec6c5f10149a70de3d57f416de.html?q=create%20procedure" target="_blank"&gt;CREATE PROCEDURE statement [Web service]&lt;/A&gt; the paragraph for RESULT only indicates 2 Columns. &lt;/P&gt;
&lt;P&gt;I fixed my procedures with the following result clause &lt;/P&gt;
&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;CREATE&lt;/SPAN&gt; &lt;SPAN&gt;OR&lt;/SPAN&gt; &lt;SPAN&gt;REPLACE&lt;/SPAN&gt; &lt;SPAN&gt;PROCEDURE&lt;/SPAN&gt; &lt;SPAN&gt;"dba"&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;"alfresco_login"&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;
&lt;SPAN&gt;in&lt;/SPAN&gt; &lt;SPAN&gt;"HostURL"&lt;/SPAN&gt; &lt;SPAN&gt;varchar&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;256&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;
&lt;SPAN&gt;in&lt;/SPAN&gt; &lt;SPAN&gt;"u"&lt;/SPAN&gt; &lt;SPAN&gt;varchar&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;256&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;
&lt;SPAN&gt;in&lt;/SPAN&gt; &lt;SPAN&gt;"pw"&lt;/SPAN&gt; &lt;SPAN&gt;varchar&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;256&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;
&lt;SPAN&gt;)&lt;/SPAN&gt;
&lt;SPAN&gt;result&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"Attribute"&lt;/SPAN&gt; &lt;SPAN&gt;long&lt;/SPAN&gt; &lt;SPAN&gt;varchar&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt; &lt;SPAN&gt;"Value"&lt;/SPAN&gt; &lt;SPAN&gt;long&lt;/SPAN&gt; &lt;SPAN&gt;varchar&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt; &lt;SPAN&gt;"Instance"&lt;/SPAN&gt; &lt;SPAN&gt;integer&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;
&lt;SPAN&gt;url&lt;/SPAN&gt; &lt;SPAN&gt;'!HostURL/alfresco/service/api/login'&lt;/SPAN&gt;
&lt;SPAN&gt;type&lt;/SPAN&gt; &lt;SPAN&gt;'HTTP:GET'&lt;/SPAN&gt;
&lt;SPAN&gt;header&lt;/SPAN&gt; &lt;SPAN&gt;'User-Agent:SATest'&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;/DIV&gt;


&lt;P&gt;Is this Documented and I can't find it?     &lt;/P&gt;
&lt;P&gt;HTH
Thomas&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jul 2018 11:50:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/web-client-procedure-returns-a-third-undocumented-column-instance/qaq-p/13847878</guid>
      <dc:creator>thomas_duemesnil</dc:creator>
      <dc:date>2018-07-17T11:50:00Z</dc:date>
    </item>
    <item>
      <title>Re: Web Client Procedure Returns a third undocumented column INSTANCE</title>
      <link>https://community.sap.com/t5/technology-q-a/web-client-procedure-returns-a-third-undocumented-column-instance/qaa-p/13847879#M4878722</link>
      <description>&lt;P&gt;IIRC the Instance column was added to the result set in 17.0.1 if you are using a 17.0.1 (or newer) database. The purpose of the column is to allow support of having multiple attribute values with the same name. This change is documented on &lt;A href="http://dcx.sap.com/index.html#sqla170/en/html/85df02cf9625474683ac870846782ad1.html*loio85df02cf9625474683ac870846782ad1"&gt;this page&lt;/A&gt; (scroll down to Web service changes), and you can read more about it &lt;A href="http://dcx.sap.com/index.html#sqla170/en/html/3be25cc96c5f10148d5def8d7421730c.html"&gt;here&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jul 2018 13:24:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/web-client-procedure-returns-a-third-undocumented-column-instance/qaa-p/13847879#M4878722</guid>
      <dc:creator>MarkCulp</dc:creator>
      <dc:date>2018-07-17T13:24:36Z</dc:date>
    </item>
    <item>
      <title>Re: Web Client Procedure Returns a third undocumented column INSTANCE</title>
      <link>https://community.sap.com/t5/technology-q-a/web-client-procedure-returns-a-third-undocumented-column-instance/qaa-p/13847880#M4878723</link>
      <description>&lt;P&gt;Thanks for the hints. &lt;/P&gt;
&lt;P&gt;But the Documentation of Create Procedure should be update to include this third column. &lt;/P&gt;
&lt;P&gt;I see in the Sample select * from Proc() with (attr.....) is this style the better approach to call a webclient function so I avoid the Result clause in the procedure ?&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jul 2018 01:07:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/web-client-procedure-returns-a-third-undocumented-column-instance/qaa-p/13847880#M4878723</guid>
      <dc:creator>thomas_duemesnil</dc:creator>
      <dc:date>2018-07-18T01:07:00Z</dc:date>
    </item>
    <item>
      <title>Re: Web Client Procedure Returns a third undocumented column INSTANCE</title>
      <link>https://community.sap.com/t5/technology-q-a/web-client-procedure-returns-a-third-undocumented-column-instance/qaa-p/13847881#M4878724</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;is this style the better approach [...]&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;IMHO, if you already know the result set when creating the procedure, it's better to specify the RESULT clause within the procedure's declaration - otherwise you will need to specify it in every query you select over the procedure...&lt;/P&gt;
&lt;P&gt;And if the procedure's result set does change (as it is here), I guess you will need do adapt it either in the procedure's declaration or in the query using the procedure - and then again, I would prefer the former.&lt;/P&gt;
&lt;P&gt;Omitting the RESULT clause is certainly appropriate in cases where the result set's schema may vary between calls, but I guess that's not possible with web client procedures.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jul 2018 04:33:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/web-client-procedure-returns-a-third-undocumented-column-instance/qaa-p/13847881#M4878724</guid>
      <dc:creator>VolkerBarth</dc:creator>
      <dc:date>2018-07-18T04:33:24Z</dc:date>
    </item>
    <item>
      <title>Re: Web Client Procedure Returns a third undocumented column INSTANCE</title>
      <link>https://community.sap.com/t5/technology-q-a/web-client-procedure-returns-a-third-undocumented-column-instance/qaa-p/13847882#M4878725</link>
      <description>&lt;P&gt;I have added a comment for the documentation team to the page: &lt;A href="http://dcx.sap.com/index.html#sqla170/en/html/3be475ec6c5f10149a70de3d57f416de.html"&gt;http://dcx.sap.com/index.html#sqla170/en/html/3be475ec6c5f10149a70de3d57f416de.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jul 2018 08:46:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/web-client-procedure-returns-a-third-undocumented-column-instance/qaa-p/13847882#M4878725</guid>
      <dc:creator>MarkCulp</dc:creator>
      <dc:date>2018-07-18T08:46:50Z</dc:date>
    </item>
  </channel>
</rss>

