<?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 declared hash table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-declared-hash-table/m-p/5259462#M1214865</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Index operation is not Possible with HASHED table.Only key operation is possible&lt;/P&gt;&lt;P&gt;Check in your code you have used INDEX to access data from hashed internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex:&lt;/P&gt;&lt;P&gt;Delete itab index 5.    " Not possible with Hashed table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[ Hashed table|http://help.sap.com/saphelp_nw70/helpdata/en/fc/eb35de358411d1829f0000e829fbfe/content.htm]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gurpreet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Mar 2009 10:34:27 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-03-11T10:34:27Z</dc:date>
    <item>
      <title>Error declared hash table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-declared-hash-table/m-p/5259458#M1214861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have this problem&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types : begin of stru,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         workcenter type /bi0/oiworkcenter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end of stru.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:&lt;/P&gt;&lt;P&gt;tb_work1 type hashed table of stru with key workcenter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tb_work2 type hashed table of stru with key workcenter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this code generate an error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;why?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Mar 2009 10:15:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-declared-hash-table/m-p/5259458#M1214861</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-11T10:15:59Z</dc:date>
    </item>
    <item>
      <title>Re: Error declared hash table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-declared-hash-table/m-p/5259459#M1214862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;no key specified&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Mar 2009 10:21:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-declared-hash-table/m-p/5259459#M1214862</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-11T10:21:29Z</dc:date>
    </item>
    <item>
      <title>Re: Error declared hash table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-declared-hash-table/m-p/5259460#M1214863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use Addition &lt;STRONG&gt;Unique key&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data: Itab like Hashed table of stru with &lt;STRONG&gt;Unique key&lt;/STRONG&gt;  workcenter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hashed table has to be declared with unique key.It will only have unique key entries&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gurpreet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Mar 2009 10:21:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-declared-hash-table/m-p/5259460#M1214863</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-11T10:21:31Z</dc:date>
    </item>
    <item>
      <title>Re: Error declared hash table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-declared-hash-table/m-p/5259461#M1214864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this is my error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You cannot use explicit or implicit index operations on tables with&lt;/P&gt;&lt;P&gt;types "HASHED TABLE" or "ANY TABLE". "TB_WORKGOOD_EP" has the type&lt;/P&gt;&lt;P&gt;"HASHED TABLE".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Mar 2009 10:28:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-declared-hash-table/m-p/5259461#M1214864</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-11T10:28:39Z</dc:date>
    </item>
    <item>
      <title>Re: Error declared hash table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-declared-hash-table/m-p/5259462#M1214865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Index operation is not Possible with HASHED table.Only key operation is possible&lt;/P&gt;&lt;P&gt;Check in your code you have used INDEX to access data from hashed internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex:&lt;/P&gt;&lt;P&gt;Delete itab index 5.    " Not possible with Hashed table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[ Hashed table|http://help.sap.com/saphelp_nw70/helpdata/en/fc/eb35de358411d1829f0000e829fbfe/content.htm]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gurpreet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Mar 2009 10:34:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-declared-hash-table/m-p/5259462#M1214865</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-11T10:34:27Z</dc:date>
    </item>
    <item>
      <title>Re: Error declared hash table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-declared-hash-table/m-p/5259463#M1214866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I type in your code, I get the error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"Use UNIQUE when declaring internal tables of type HSAHS for specification of the key type".   Which means exactly what it says.  You're not using the correct syntax for defining a table - you should declare the tables as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TYPES : BEGIN OF stru,
          workcenter TYPE /bi0/oiworkcenter,
END OF stru.

DATA:
  tb_work1 TYPE HASHED TABLE OF stru WITH UNIQUE KEY workcenter,
  tb_work2 TYPE HASHED TABLE OF stru WITH UNIQUE KEY workcenter.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, the error you say your getting isn't related to the code you've pasted.  Why not paste the code that has that problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;( As an aside, I wouldn't declare the tables like that anyway - I'd use &lt;STRONG&gt;tb_work1 TYPE HASHED TABLE OF /bi0/oiworkcenter WITH UNIQUE KEY table_line&lt;/STRONG&gt;. )&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Mar 2009 14:53:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-declared-hash-table/m-p/5259463#M1214866</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2009-03-11T14:53:30Z</dc:date>
    </item>
    <item>
      <title>Re: Error declared hash table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-declared-hash-table/m-p/5259464#M1214867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; Delete itab index 5. " Not possible with Hashed table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;not necessary .... hash is fast.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@Matt &lt;/P&gt;&lt;P&gt;I see no advantage in your recommendation, it is adviable to define a structure which can be used as&lt;/P&gt;&lt;P&gt;a workarea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Really advisable is the definition in the dictionary.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Siegfried&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Mar 2009 15:03:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-declared-hash-table/m-p/5259464#M1214867</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-11T15:03:54Z</dc:date>
    </item>
    <item>
      <title>Re: Error declared hash table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-declared-hash-table/m-p/5259465#M1214868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; @Matt &lt;/P&gt;&lt;P&gt;&amp;gt; I see no advantage in your recommendation, it is adviable to define a structure which can be used as&lt;/P&gt;&lt;P&gt;&amp;gt; a workarea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clarity, really.  A structure with one element seems to me to be an unnecessary complication. For example:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FIELD-SYMBOLS: &amp;lt;l_workcenter&amp;gt; TYPE /bi0/oiworkcenter.

LOOP AT th_workcenter ASSIGNING &amp;lt;l_workcenter&amp;gt;.
  " Do something with &amp;lt;l_workcenter&amp;gt;.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; seems to me more semantically obvious than:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FIELD-SYMBOLS: &amp;lt;ls_workcenter&amp;gt; TYPE workcenter_structure.

LOOP AT th_workcenter ASSIGNING &amp;lt;ls_workcenter&amp;gt;.
  " Do something with &amp;lt;ls_workcenter&amp;gt;-workcenter.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Mar 2009 15:27:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-declared-hash-table/m-p/5259465#M1214868</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2009-03-11T15:27:56Z</dc:date>
    </item>
    <item>
      <title>Re: Error declared hash table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-declared-hash-table/m-p/5259466#M1214869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;You can use the following declaration.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Here you have an advantage of using stru as work area.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: BEGIN OF stru,
        workcenter TYPE /bi0/oiworkcenter,
      END OF stru,
      tb_work1 TYPE HASHED TABLE OF stru WITH UNIQUE KEY workcenter,
      tb_work2 TYPE HASHED TABLE OF stru WITH UNIQUE KEY workcenter.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2009 13:35:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-declared-hash-table/m-p/5259466#M1214869</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-13T13:35:44Z</dc:date>
    </item>
  </channel>
</rss>

