<?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: SELECT APPENDING TABLE into a HASHED TABLE in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-appending-table-into-a-hashed-table/m-p/11676576#M1945366</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First - If you look again at the discussion, It has started with the append error.&lt;/P&gt;&lt;P&gt;So, its not purely about database selection, I think it is about internal table usage.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Second - I agree with append part, that's the same i tried to explain in my previous comment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Third - My mistake for not using &lt;SPAN style="color: #333333; font-size: 12px;"&gt; INSERT wa INTO &lt;/SPAN&gt;&lt;STRONG style="font-size: 12px; color: #333333; background: #ffffff;"&gt;TABLE &lt;/STRONG&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;my_hashed_table.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fourth - That header line i just wanted to check that whether it's issue with keys or not. I know that it's obsolete.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 Apr 2016 05:07:25 GMT</pubDate>
    <dc:creator>Ashg1402</dc:creator>
    <dc:date>2016-04-29T05:07:25Z</dc:date>
    <item>
      <title>SELECT APPENDING TABLE into a HASHED TABLE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-appending-table-into-a-hashed-table/m-p/11676569#M1945359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I try to append a work area into a hashed table with the following syntax:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND wa_hash TO it_hash&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get the error message &lt;EM&gt;"You cannot use explicit or implicit index operations on tables with"&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, if I use the syntax SELECT APPENDING TABLE into a HASHED TABLE, there's no error and the program works just fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I check the ABAP documentation:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;"The results set is inserted into the internal table itab row-by-row; a sorting process is executed in the case of a sorted table. If INTO is used, the internal table is initialized. Previous rows remain intact if APPENDING is used."&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is said that the result set is inserted into the internal table row by row. Does this mean using SELECT APPENDING TABLE into a HASHED TABLE is actually the same as using INSERT wa_hash INTO TABLE it_hash? Then the difference of using SELECT INTO TABLE and SELECT APPENDING TABLE is that when using INTO TABLE, the internal table is first initalized.&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;Suwandi C.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Apr 2016 03:06:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-appending-table-into-a-hashed-table/m-p/11676569#M1945359</guid>
      <dc:creator>suwandi_cahyadi</dc:creator>
      <dc:date>2016-04-29T03:06:57Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT APPENDING TABLE into a HASHED TABLE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-appending-table-into-a-hashed-table/m-p/11676570#M1945360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; If an internal table is declared as hashed table, it means that it has some key fields. They don't have any linear index. So when we do any insert or append, it works on index, but for hashed tables there is no such concept. As this kind of table is accessed by key not index.&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;Ashish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Apr 2016 04:35:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-appending-table-into-a-hashed-table/m-p/11676570#M1945360</guid>
      <dc:creator>Ashg1402</dc:creator>
      <dc:date>2016-04-29T04:35:36Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT APPENDING TABLE into a HASHED TABLE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-appending-table-into-a-hashed-table/m-p/11676571#M1945361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Funny. I always assumed that you couldn't use APPENDING INTO with a HASHED TABLE - but it seems you can. In which case, it appears that APPENDING INTO actually does the equivalent of an INSERT INTO. Perhaps it the addition SELECT .... INSERTING INTO table ... would be nicer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;For your questions though - why not try it and see?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A __default_attr="3984" __jive_macro_name="user" class="jive_macro_user jive_macro" data-orig-content="Horst Keller" href="https://community.sap.com/"&gt;&lt;/A&gt; - I've read the documentation, and to me it's not entirely clear that it works with HASHED tables - although there is mention of SORTED tables. And how about an INSERTING INTO alternative for ABAP 7.60? &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/108/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Apr 2016 04:42:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-appending-table-into-a-hashed-table/m-p/11676571#M1945361</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2016-04-29T04:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT APPENDING TABLE into a HASHED TABLE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-appending-table-into-a-hashed-table/m-p/11676572#M1945362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi matthew,&lt;/P&gt;&lt;P&gt;I tried both APPEND and INSERT, it doesn't allow. Only SELECT APPENDING works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Apr 2016 04:47:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-appending-table-into-a-hashed-table/m-p/11676572#M1945362</guid>
      <dc:creator>Ashg1402</dc:creator>
      <dc:date>2016-04-29T04:47:55Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT APPENDING TABLE into a HASHED TABLE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-appending-table-into-a-hashed-table/m-p/11676573#M1945363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What exactly did you try. You've not&amp;nbsp; given any context.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Apr 2016 04:48:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-appending-table-into-a-hashed-table/m-p/11676573#M1945363</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2016-04-29T04:48:47Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT APPENDING TABLE into a HASHED TABLE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-appending-table-into-a-hashed-table/m-p/11676574#M1945364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried this:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S31"&gt;DATA: it_ekko TYPE HASHED TABLE OF ekko WITH UNIQUE KEY ebeln WITH HEADER LINE,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S31"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wa_ekko LIKE LINE OF it_ekko.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S31"&gt;SELECT * FROM ekko APPENDING TABLE it_ekko UP TO 5 ROWS.&amp;nbsp; " This worked&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S31"&gt;it_ekko-ebeln = '000000001'.&amp;nbsp;&amp;nbsp; "&amp;nbsp; I thought it will allow append with header line but didn't work&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S31"&gt;append it_ekko to&amp;nbsp; it_ekko.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S31"&gt;wa_ekko-ebeln = '000000002'. " Same error with this too&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S31"&gt;insert wa_ekko into it_ekko.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Apr 2016 04:52:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-appending-table-into-a-hashed-table/m-p/11676574#M1945364</guid>
      <dc:creator>Ashg1402</dc:creator>
      <dc:date>2016-04-29T04:52:54Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT APPENDING TABLE into a HASHED TABLE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-appending-table-into-a-hashed-table/m-p/11676575#M1945365</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First of all, the discussion is about database selections into internal tables, rather than just internal table usage. Multiple SELECT ... APPENDING TABLE ... work for HASHED tables (and SORTED), which I wasn't previously aware of. Glad to find out, though I feel a bit stupid. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Second - you can't use APPEND (the internal table operation) on a HASHED table (or a SORTED table for that matter), as it just tries to add the data to the end of the table. No-one is disputing this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Third - to insert into a hashed table you must use. INSERT wa INTO &lt;STRONG&gt;TABLE&lt;/STRONG&gt; my_hashed_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fourth - don't use tables with header lines, they're obsolete and, even more importantly, ambiguous bad programming.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Apr 2016 05:01:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-appending-table-into-a-hashed-table/m-p/11676575#M1945365</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2016-04-29T05:01:03Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT APPENDING TABLE into a HASHED TABLE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-appending-table-into-a-hashed-table/m-p/11676576#M1945366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First - If you look again at the discussion, It has started with the append error.&lt;/P&gt;&lt;P&gt;So, its not purely about database selection, I think it is about internal table usage.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Second - I agree with append part, that's the same i tried to explain in my previous comment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Third - My mistake for not using &lt;SPAN style="color: #333333; font-size: 12px;"&gt; INSERT wa INTO &lt;/SPAN&gt;&lt;STRONG style="font-size: 12px; color: #333333; background: #ffffff;"&gt;TABLE &lt;/STRONG&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;my_hashed_table.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fourth - That header line i just wanted to check that whether it's issue with keys or not. I know that it's obsolete.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Apr 2016 05:07:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-appending-table-into-a-hashed-table/m-p/11676576#M1945366</guid>
      <dc:creator>Ashg1402</dc:creator>
      <dc:date>2016-04-29T05:07:25Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT APPENDING TABLE into a HASHED TABLE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-appending-table-into-a-hashed-table/m-p/11676577#M1945367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hmm, the &lt;A href="http://help.sap.com/abapdocu_750/en/index.htm?file=abapinto_clause.htm"&gt;documentation&lt;/A&gt; says:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Arial; font-size: 12.8px; background-color: #fefeff;"&gt;If the results set consists of multiple rows, an internal table &lt;/SPAN&gt;&lt;SPAN class="qtext" style="font-family: 'Courier New'; font-weight: bold; color: #000000; font-size: 12.8px; background-color: #fefeff;"&gt;itab&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Arial; font-size: 12.8px; background-color: #fefeff;"&gt;&lt;STRONG&gt; of any table type&lt;/STRONG&gt; can be specified as a host variable using the escape character &lt;/SPAN&gt;&lt;SPAN class="qtext" style="font-family: 'Courier New'; font-weight: bold; color: #000000; font-size: 12.8px; background-color: #fefeff;"&gt;@&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Arial; font-size: 12.8px; background-color: #fefeff;"&gt; after &lt;/SPAN&gt;&lt;SPAN class="qtext" style="font-family: 'Courier New'; font-weight: bold; color: #000000; font-size: 12.8px; background-color: #fefeff;"&gt;INTO&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Arial; font-size: 12.8px; background-color: #fefeff;"&gt; or &lt;/SPAN&gt;&lt;SPAN class="qtext" style="font-family: 'Courier New'; font-weight: bold; color: #000000; font-size: 12.8px; background-color: #fefeff;"&gt;APPENDING&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Arial; font-size: 12.8px; background-color: #fefeff;"&gt;. &lt;/SPAN&gt;&lt;/P&gt;


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;"any table type" includes hashed tables doesn't it? (In German I distinguish between "Tabellenart" (table kind) and "Tabellentyp" (table type). The table kind (standard, sorted, hashed) is a part of the table type. Unfortunately, the difference between kind and type is generally lost in translation).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Arial; font-size: 12.8px; background-color: #fefeff;"&gt;the results set is &lt;STRONG&gt;inserted&lt;/STRONG&gt; into the internal table &lt;/SPAN&gt;&lt;SPAN class="qtext" style="font-family: 'Courier New'; font-weight: bold; color: #000000; font-size: 12.8px; background-color: #fefeff;"&gt;itab&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Arial; font-size: 12.8px; background-color: #fefeff;"&gt; row-by-row&lt;/SPAN&gt;&lt;/P&gt;


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Arial; font-size: 12.8px; background-color: #fefeff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Arial; font-size: 12.8px; background-color: #fefeff;"&gt;Sounds like more like "insert" than "append" for me, but OK, a link to INSERT can help here.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;And how about an INSERTING INTO alternative for ABAP 7.60?&lt;/SPAN&gt;&lt;/P&gt;


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Yeah, there are a lot of such additions that for historical or other reasons do not express their exact semantics (e.g. the infamous ACCEPTING DUPLICATE KEYS). But I'm afraid that will not be changed any more.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Apr 2016 06:11:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-appending-table-into-a-hashed-table/m-p/11676577#M1945367</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2016-04-29T06:11:12Z</dc:date>
    </item>
  </channel>
</rss>

