<?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: Operations on Hashed Internal tables in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/operations-on-hashed-internal-tables/m-p/940370#M63057</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;     Insert command will work on HASHED tables on Key access.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try with below code...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  zhashtable_test            .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES :&lt;/P&gt;&lt;P&gt;BEGIN OF t_city,&lt;/P&gt;&lt;P&gt;  city     TYPE sgeocity-city,&lt;/P&gt;&lt;P&gt;  country  TYPE sgeocity-country ,&lt;/P&gt;&lt;P&gt;  latitude TYPE sgeocity-latitude,&lt;/P&gt;&lt;P&gt;END OF t_city,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_city_list TYPE HASHED TABLE OF t_city WITH UNIQUE KEY city country.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : wa_itab TYPE t_city,&lt;/P&gt;&lt;P&gt;       city_list TYPE t_city_list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_itab-city = 'Coimbatore'.&lt;/P&gt;&lt;P&gt;wa_itab-country = 'INDIA'.&lt;/P&gt;&lt;P&gt;wa_itab-latitude = '150'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INSERT wa_itab INTO TABLE city_list .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 31 Aug 2005 08:36:33 GMT</pubDate>
    <dc:creator>VijayasekarK</dc:creator>
    <dc:date>2005-08-31T08:36:33Z</dc:date>
    <item>
      <title>Operations on Hashed Internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/operations-on-hashed-internal-tables/m-p/940363#M63050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I want to add a few rows to a hashed internal table, is it not possible at all?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INSERT and APPEND are not allowed on hashed internal tables. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anybody faced a similar problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I want to do is..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT hashed_inttable into wa where a = b.&lt;/P&gt;&lt;P&gt;APPEND wa TO another_hashed_inttable."[APPEND not allowed]&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Anoop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2005 05:43:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/operations-on-hashed-internal-tables/m-p/940363#M63050</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-31T05:43:03Z</dc:date>
    </item>
    <item>
      <title>Re: Operations on Hashed Internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/operations-on-hashed-internal-tables/m-p/940364#M63051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anoop,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think u can use INSERT command.Just try it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; TYPES: BEGIN OF LINE,&lt;/P&gt;&lt;P&gt;        COL1,&lt;/P&gt;&lt;P&gt;        COL2,&lt;/P&gt;&lt;P&gt;      END OF LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: WA TYPE LINE,&lt;/P&gt;&lt;P&gt;      ITAB TYPE HASHED TABLE OF LINE WITH UNIQUE KEY COL1,&lt;/P&gt;&lt;P&gt;      KEY(4) VALUE 'COL1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WA-COL1 = 'X'. INSERT WA INTO TABLE ITAB.&lt;/P&gt;&lt;P&gt;WA-COL1 = 'Y'. INSERT WA INTO TABLE ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Hope this helps u.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&amp;amp;Regards,&lt;/P&gt;&lt;P&gt;Ruthra.R&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Ruthra&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2005 05:58:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/operations-on-hashed-internal-tables/m-p/940364#M63051</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-31T05:58:47Z</dc:date>
    </item>
    <item>
      <title>Re: Operations on Hashed Internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/operations-on-hashed-internal-tables/m-p/940365#M63052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ruthra,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried INSERT, INSERT with INDEX , APPEND. &lt;/P&gt;&lt;P&gt;None of them are allowed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Anoop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2005 06:03:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/operations-on-hashed-internal-tables/m-p/940365#M63052</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-31T06:03:36Z</dc:date>
    </item>
    <item>
      <title>Re: Operations on Hashed Internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/operations-on-hashed-internal-tables/m-p/940366#M63053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anoop,&lt;/P&gt;&lt;P&gt;    U can't do index operation in Hashed Internal table.U can insert the values with out index.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With Regards,&lt;/P&gt;&lt;P&gt;Ranganathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2005 06:33:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/operations-on-hashed-internal-tables/m-p/940366#M63053</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-31T06:33:04Z</dc:date>
    </item>
    <item>
      <title>Re: Operations on Hashed Internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/operations-on-hashed-internal-tables/m-p/940367#M63054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anoop,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; You cannot use index operation in HASHED table.&lt;/P&gt;&lt;P&gt;Use INSERT &amp;lt;WA&amp;gt; INTO TABLE &amp;lt;HAS_ITAB&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hashed tables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the most appropriate type for any table where the main operation is key access. You cannot access a hashed table using its index. The response time for key access remains constant, regardless of the number of table entries. Like database tables, hashed tables always have a unique key. Hashed tables are useful if you want to construct and use an internal table which resembles a database table or for processing large amounts of data. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps u.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Ruthra.R&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2005 06:41:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/operations-on-hashed-internal-tables/m-p/940367#M63054</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-31T06:41:31Z</dc:date>
    </item>
    <item>
      <title>Re: Operations on Hashed Internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/operations-on-hashed-internal-tables/m-p/940368#M63055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;may be post your code then we can check where the issue is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Raja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2005 06:48:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/operations-on-hashed-internal-tables/m-p/940368#M63055</guid>
      <dc:creator>athavanraja</dc:creator>
      <dc:date>2005-08-31T06:48:16Z</dc:date>
    </item>
    <item>
      <title>Re: Operations on Hashed Internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/operations-on-hashed-internal-tables/m-p/940369#M63056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anoop,&lt;/P&gt;&lt;P&gt;Append definitely cant be used with hashed tables.&lt;/P&gt;&lt;P&gt;You need to use "insert" statement to insert records into ur hashed internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For insert you need to use the following syntax..&lt;/P&gt;&lt;P&gt;INSERT &amp;lt;WA&amp;gt; INTO &amp;lt;b&amp;gt;TABLE&amp;lt;/b&amp;gt; &amp;lt;ITAB&amp;gt;, as somebody pointed out.. The table keyword is important here. I think u wud have forgotten the Table keyword in your syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kinldy reward points to the reply that answered ur question, and close the thread if u have no other issues.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Prabhu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2005 08:00:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/operations-on-hashed-internal-tables/m-p/940369#M63056</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-31T08:00:58Z</dc:date>
    </item>
    <item>
      <title>Re: Operations on Hashed Internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/operations-on-hashed-internal-tables/m-p/940370#M63057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;     Insert command will work on HASHED tables on Key access.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try with below code...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  zhashtable_test            .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES :&lt;/P&gt;&lt;P&gt;BEGIN OF t_city,&lt;/P&gt;&lt;P&gt;  city     TYPE sgeocity-city,&lt;/P&gt;&lt;P&gt;  country  TYPE sgeocity-country ,&lt;/P&gt;&lt;P&gt;  latitude TYPE sgeocity-latitude,&lt;/P&gt;&lt;P&gt;END OF t_city,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_city_list TYPE HASHED TABLE OF t_city WITH UNIQUE KEY city country.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : wa_itab TYPE t_city,&lt;/P&gt;&lt;P&gt;       city_list TYPE t_city_list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_itab-city = 'Coimbatore'.&lt;/P&gt;&lt;P&gt;wa_itab-country = 'INDIA'.&lt;/P&gt;&lt;P&gt;wa_itab-latitude = '150'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INSERT wa_itab INTO TABLE city_list .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2005 08:36:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/operations-on-hashed-internal-tables/m-p/940370#M63057</guid>
      <dc:creator>VijayasekarK</dc:creator>
      <dc:date>2005-08-31T08:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: Operations on Hashed Internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/operations-on-hashed-internal-tables/m-p/940371#M63058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, As far as I know you cannot add rows to a hashed table from within a loop structure. This is because the hash has to be calculated and with that the order of the rows can change which gives you an unreliable loop result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sometimes you can make a copy of the table which you use for looping while adding records to the "desired table".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Bas Jansen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2005 08:46:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/operations-on-hashed-internal-tables/m-p/940371#M63058</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-31T08:46:58Z</dc:date>
    </item>
    <item>
      <title>Re: Operations on Hashed Internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/operations-on-hashed-internal-tables/m-p/940372#M63059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anoop,&lt;/P&gt;&lt;P&gt;More than just this, there r a lot of dos and dont's with a hashed table... u need to be extremely careful when using a hashed table. read the sap docu on this to understand thsi clearly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward suitable points if thsi post answered ur question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Prabhu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Sep 2005 09:58:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/operations-on-hashed-internal-tables/m-p/940372#M63059</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-02T09:58:08Z</dc:date>
    </item>
  </channel>
</rss>

