<?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: Insert records into Sorted Internal Table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-records-into-sorted-internal-table/m-p/4322915#M1030093</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;INSERT wa_tab INTO table i_tab.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Sep 2008 09:34:16 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-09-01T09:34:16Z</dc:date>
    <item>
      <title>Insert records into Sorted Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-records-into-sorted-internal-table/m-p/4322912#M1030090</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 an SORTED Internal table i_tab. I am inserting records into this table inside a loop as we should not use append records to a sorted table.&lt;/P&gt;&lt;P&gt;The internal table is declared as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: i_tab TYPE SORTED TABLE OF t_tab WITH NON-UNIQUE KEY matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Insert is used as :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INSERT wa_tab INTO i_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code is getting activated but its giving a dump on execution.&lt;/P&gt;&lt;P&gt;Should I insert records using the key for sorted table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Abhishek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Sep 2008 07:15:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-records-into-sorted-internal-table/m-p/4322912#M1030090</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-01T07:15:56Z</dc:date>
    </item>
    <item>
      <title>Re: Insert records into Sorted Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-records-into-sorted-internal-table/m-p/4322913#M1030091</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;check this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: BEGIN OF connection,
cityfrom TYPE spfli-cityfrom,
cityto TYPE spfli-cityto,
distid TYPE spfli-distid,
distance TYPE spfli-distance,
END OF connection.
 
DATA connection_tab LIKE sorted TABLE OF connection
WITH unique KEY cityfrom
with header line.
 
SELECT cityfrom cityto distid distance
FROM spfli
INTO connection.
INSERT connection INTO table connection_tab.  "Add table keyword here
ENDSELECT.
loop at connection_tab.
write: / connection_tab-cityfrom, connection_tab-cityto, connection_tab-distid, connection_tab-distance.
endloop.
 
connection-cityfrom = 'Bangalore'.
connection-cityto = 'Delhi'.
connection-distid = 'KL'.
connection-distance = '2500'.
 
insert connection into table connection_tab .
loop at connection_tab.
write: / connection_tab-cityfrom, connection_tab-cityto, connection_tab-distid, connection_tab-distance.
endloop. 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Omkaram.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Sep 2008 07:20:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-records-into-sorted-internal-table/m-p/4322913#M1030091</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-01T07:20:51Z</dc:date>
    </item>
    <item>
      <title>Re: Insert records into Sorted Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-records-into-sorted-internal-table/m-p/4322914#M1030092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi &lt;/P&gt;&lt;P&gt; use &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append &lt;/P&gt;&lt;P&gt;instead of insert and that to be like this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND  wa_itab TO itab SORTED BY matnr. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Snehi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Sep 2008 07:22:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-records-into-sorted-internal-table/m-p/4322914#M1030092</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-01T07:22:55Z</dc:date>
    </item>
    <item>
      <title>Re: Insert records into Sorted Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-records-into-sorted-internal-table/m-p/4322915#M1030093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;INSERT wa_tab INTO table i_tab.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Sep 2008 09:34:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-records-into-sorted-internal-table/m-p/4322915#M1030093</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-01T09:34:16Z</dc:date>
    </item>
  </channel>
</rss>

