<?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: APPEND LINES - with sorted table? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/append-lines-with-sorted-table/m-p/4953853#M1154985</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eric,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Agreed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But If this is the Case you would get Dump With Insert Also.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;APPEND 1.
APPEND 3.
APPEND 2. "Dump ITAB_ILLEGAL_SORT_ORDER&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Dec 2008 21:06:51 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-12-17T21:06:51Z</dc:date>
    <item>
      <title>APPEND LINES - with sorted table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/append-lines-with-sorted-table/m-p/4953849#M1154981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how can I use the APPEND LINES statment with sorted tables? Is this possible???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2008 18:08:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/append-lines-with-sorted-table/m-p/4953849#M1154981</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-17T18:08:50Z</dc:date>
    </item>
    <item>
      <title>Re: APPEND LINES - with sorted table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/append-lines-with-sorted-table/m-p/4953850#M1154982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should use the INSERT command.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2008 18:13:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/append-lines-with-sorted-table/m-p/4953850#M1154982</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-17T18:13:20Z</dc:date>
    </item>
    <item>
      <title>Re: APPEND LINES - with sorted table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/append-lines-with-sorted-table/m-p/4953851#M1154983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Below is F1 help Of Append Lines:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;"Appending square numbers to a "sorted table" with elementary row type. 

DATA: int  TYPE i, 
      itab LIKE SORTED TABLE OF int 
           WITH UNIQUE KEY table_line. 

DO 10 TIMES. 
  int = sy-index ** 2. 
  APPEND int TO itab. 
ENDDO.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2008 18:15:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/append-lines-with-sorted-table/m-p/4953851#M1154983</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-17T18:15:16Z</dc:date>
    </item>
    <item>
      <title>Re: APPEND LINES - with sorted table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/append-lines-with-sorted-table/m-p/4953852#M1154984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Amit: the above example from you works, but the only reason for that is that the rows are appended according to the sort sequence (APPEND adds the line to the internal table one after the other). Once the sort sequence is not kept, the program will dump. An example to understand better:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here the dump is acc. to the sort sequence, so it works:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;APPEND 1.
APPEND 2.
APPEND 3.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here the sort sequence is not kept:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;APPEND 1.
APPEND 3.
APPEND 2. "this will dump at this line&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As Jerry suggested already INSERT has to be used in case of SORTED (and HASHED) tables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2008 20:35:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/append-lines-with-sorted-table/m-p/4953852#M1154984</guid>
      <dc:creator>JozsefSzikszai</dc:creator>
      <dc:date>2008-12-17T20:35:55Z</dc:date>
    </item>
    <item>
      <title>Re: APPEND LINES - with sorted table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/append-lines-with-sorted-table/m-p/4953853#M1154985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eric,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Agreed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But If this is the Case you would get Dump With Insert Also.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;APPEND 1.
APPEND 3.
APPEND 2. "Dump ITAB_ILLEGAL_SORT_ORDER&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2008 21:06:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/append-lines-with-sorted-table/m-p/4953853#M1154985</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-17T21:06:51Z</dc:date>
    </item>
    <item>
      <title>Re: APPEND LINES - with sorted table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/append-lines-with-sorted-table/m-p/4953854#M1154986</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It works ok for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT zztemp.

TYPES:  BEGIN OF intline,
  int  TYPE i.
TYPES: END OF intline.

DATA: intline  TYPE intline,
      itab LIKE SORTED TABLE OF intline WITH UNIQUE KEY int.

intline-int = 3.
INSERT intline INTO TABLE itab.

intline-int = 5.
INSERT intline INTO TABLE itab.

intline-int = 1.
INSERT intline INTO TABLE itab.

intline-int = 2.
INSERT intline INTO TABLE itab.


LOOP AT itab INTO intline.
  WRITE:/ intline-int.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2008 21:15:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/append-lines-with-sorted-table/m-p/4953854#M1154986</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-17T21:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: APPEND LINES - with sorted table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/append-lines-with-sorted-table/m-p/4953855#M1154987</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; But If this is the Case you would get Dump With Insert Also.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;/CODE&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;CODE&gt;APPEND 1.
&amp;gt; APPEND 3.
&amp;gt; APPEND 2. "Dump ITAB_ILLEGAL_SORT_ORDER&lt;/CODE&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with simply INSERT ... INTO yes, but the correct syntax is INSERT ... INTO &lt;STRONG&gt;TABLE&lt;/STRONG&gt; (I did not mention in my first reply, sorry)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2008 21:36:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/append-lines-with-sorted-table/m-p/4953855#M1154987</guid>
      <dc:creator>JozsefSzikszai</dc:creator>
      <dc:date>2008-12-17T21:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: APPEND LINES - with sorted table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/append-lines-with-sorted-table/m-p/4953856#M1154988</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2008 21:48:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/append-lines-with-sorted-table/m-p/4953856#M1154988</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-17T21:48:05Z</dc:date>
    </item>
    <item>
      <title>Re: APPEND LINES - with sorted table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/append-lines-with-sorted-table/m-p/4953857#M1154989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I got the same issue.&lt;/P&gt;&lt;P&gt;With this code I got ITAB_ILLEGAL_SORT_ORDER&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT from_table INTO l_from.
    READ TABLE to_table INTO l_to
                           WITH KEY thekey = ...
                          BINARY SEARCH.
    IF sy-subrc EQ 0.
      MOVE sy-tabix TO l_index.
      ADD l_from-volume TO l_to-volume.
      MODIFY to_table INDEX l_index
                         FROM l_to
                         TRANSPORTING volume.
    ELSE.
      MOVE l_from TO l_to.
      MOVE ... TO l_to-....
      APPEND l_to TO to_table.
    ENDIF.
  ENDLOOP. " from_table&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I replaced APPEND with INSERT and I got TABLE_ILLEGAL_STATEMENT&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT from_table INTO l_from.
    READ TABLE to_table INTO l_to
                           WITH KEY thekey = ...
                          BINARY SEARCH.
    IF sy-subrc EQ 0.
      MOVE sy-tabix TO l_index.
      ADD l_from-volume TO l_to-volume.
      MODIFY to_table INDEX l_index
                         FROM l_to
                         TRANSPORTING volume.
    ELSE.
      MOVE l_from TO l_to.
      MOVE ... TO l_to-....
      INSERT l_to INTO to_table.
    ENDIF.
  ENDLOOP. " from_table&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wtf ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Help !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Aug 2010 09:01:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/append-lines-with-sorted-table/m-p/4953857#M1154989</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-06T09:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: APPEND LINES - with sorted table?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/append-lines-with-sorted-table/m-p/4953858#M1154990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This message was moderated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Mar 2015 13:35:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/append-lines-with-sorted-table/m-p/4953858#M1154990</guid>
      <dc:creator>navdeep_thakur12</dc:creator>
      <dc:date>2015-03-31T13:35:48Z</dc:date>
    </item>
  </channel>
</rss>

