<?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: Error Message - Identifier must be declared in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-identifier-must-be-declared/m-p/11105273#M1903535</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, a question, you have your query aggregation functions ? as sum () or something? if so you should target within the grouping , like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select customer, year, product, sum(sales)&lt;/P&gt;&lt;P&gt;&amp;nbsp; from t1&lt;/P&gt;&lt;P&gt;&amp;nbsp; group by grouping sets LIMIT 2&lt;/P&gt;&lt;P&gt;&amp;nbsp; (&lt;/P&gt;&lt;P&gt;&amp;nbsp; (customer, year),&lt;/P&gt;&lt;P&gt;&amp;nbsp; (product)&lt;/P&gt;&lt;P&gt;&amp;nbsp; );&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Jun 2015 13:21:56 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2015-06-05T13:21:56Z</dc:date>
    <item>
      <title>Error Message - Identifier must be declared</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-identifier-must-be-declared/m-p/11105271#M1903533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are trying to create an AMDP joining a few tables, applying some where clauses and returning a list of records. In this we are trying to dynamically pass the LIMIT and OFFSET parameters to the AMDP. Here we declare the values to be passed in the signature of the AMDP as importing parameters. But HANA Studio keeps throwing an error message saying the identifiers must be declared.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is our code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The method definition&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;CLASS-METHODS execute&lt;/P&gt;&lt;P&gt;IMPORTING VALUE(iv_top) TYPE int4&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VALUE(iv_skip) TYPE int4.&lt;/P&gt;&lt;P&gt;EXPORTING VALUE(et_result) &amp;lt;relevant type&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The method implementation&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;METHOD execute BY DATABASE PROCEDURE FOR HDB LANGUAGE SQLSCRIPT&lt;/P&gt;&lt;P&gt;OPTIONS READ-ONLY&amp;nbsp; USING &amp;lt;some tables&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;et_result = SELECT &amp;lt;required columns&amp;gt; FROM &amp;lt;tables, joins and where conditions&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LIMIT :iv_top OFFSET :iv_skip;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The error message displayed is this:&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/718798" /&gt;&lt;/P&gt;&lt;P&gt;Would appreciate some pointers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jun 2015 10:59:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-identifier-must-be-declared/m-p/11105271#M1903533</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-06-05T10:59:50Z</dc:date>
    </item>
    <item>
      <title>Re: Error Message - Identifier must be declared</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-identifier-must-be-declared/m-p/11105272#M1903534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe the error message does not reflect the actaul error.&lt;/P&gt;&lt;P&gt;Does the following work ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from dummy LIMIT :iv_top OFFSET :iv_skip;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;et_result = SELECT &amp;lt;required columns&amp;gt; FROM &amp;lt;tables, joins and where conditions&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LIMIT 1 OFFSET 1;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jun 2015 11:45:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-identifier-must-be-declared/m-p/11105272#M1903534</guid>
      <dc:creator>christian_seitel</dc:creator>
      <dc:date>2015-06-05T11:45:50Z</dc:date>
    </item>
    <item>
      <title>Re: Error Message - Identifier must be declared</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-identifier-must-be-declared/m-p/11105273#M1903535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, a question, you have your query aggregation functions ? as sum () or something? if so you should target within the grouping , like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select customer, year, product, sum(sales)&lt;/P&gt;&lt;P&gt;&amp;nbsp; from t1&lt;/P&gt;&lt;P&gt;&amp;nbsp; group by grouping sets LIMIT 2&lt;/P&gt;&lt;P&gt;&amp;nbsp; (&lt;/P&gt;&lt;P&gt;&amp;nbsp; (customer, year),&lt;/P&gt;&lt;P&gt;&amp;nbsp; (product)&lt;/P&gt;&lt;P&gt;&amp;nbsp; );&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jun 2015 13:21:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-identifier-must-be-declared/m-p/11105273#M1903535</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-06-05T13:21:56Z</dc:date>
    </item>
    <item>
      <title>Re: Error Message - Identifier must be declared</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-identifier-must-be-declared/m-p/11105274#M1903536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Harish, this question had been asked and answered a couple of times before.&lt;/P&gt;&lt;P&gt;Please do search before you post!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also: it is not possible to use variables in the LIMIT or TOP clauses. &lt;/P&gt;&lt;P&gt;If you want to do use those e.g. in a loop you have to use dynamic SQL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since this will lead to massive parsing overhead and query re-execution it might be better to implement a cached result set that you then access in your application code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Lars&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Jun 2015 21:42:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-identifier-must-be-declared/m-p/11105274#M1903536</guid>
      <dc:creator>lbreddemann</dc:creator>
      <dc:date>2015-06-07T21:42:00Z</dc:date>
    </item>
  </channel>
</rss>

