<?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: Previous data missing after appending an extra record into internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/previous-data-missing-after-appending-an-extra-record-into-internal-table/m-p/6430548#M1410890</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;Before appending just write the two additional fields also and pass initial values to it.&lt;/P&gt;&lt;P&gt;This might solve the problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 Dec 2009 08:09:40 GMT</pubDate>
    <dc:creator>former_member584974</dc:creator>
    <dc:date>2009-12-10T08:09:40Z</dc:date>
    <item>
      <title>Previous data missing after appending an extra record into internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/previous-data-missing-after-appending-an-extra-record-into-internal-table/m-p/6430546#M1410888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;In the below code Exportdata  internal table contains10 fields with 4 line items 10,20,40,50 records.all the 10 fields contain data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IT_EKKO_ekpo has 8 fields with 5 line items 10,20,30,40,50.all the 8 filedls contain data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;export data is having 2 extra fields with data compared to IT_ekko_ekpo.&lt;/P&gt;&lt;P&gt;my intension is to add the 30th line item from IT_ekko_ekpo into exportdata with the 2 extra fields data as initial .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ater my code though the line item 30 is sucessfully inserted into exportdata with 8 fields data , all the other line items are also having data in only 8fields. the 9th and 10th field data for line items 10, 20, 40, 50 are missing. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I solve this issue, I want the other line items apart from 30 to contain the 10 fields data and line item 30 to contain 8 fields data  after I append the exportdata table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT IT_EKKO_EKPO INTO wa_ekko_ekpo.&lt;/P&gt;&lt;P&gt;READ TABLE exportdata&lt;/P&gt;&lt;P&gt;INTO wa_exportdata&lt;/P&gt;&lt;P&gt;WITH KEY ebeln = wa_ekko_ekpo-ebeln&lt;/P&gt;&lt;P&gt;ebelp = wa_ekko_ekpo-ebelP&lt;/P&gt;&lt;P&gt;BINARY SEARCH.&lt;/P&gt;&lt;P&gt;IF syst-subrc NE 0.&lt;/P&gt;&lt;P&gt;wa_exportdata-ebeln = wa_ekko_ekpo-ebeln.&lt;/P&gt;&lt;P&gt;wa_exportdata-ebelp = wa_ekko_ekpo-ebelp.&lt;/P&gt;&lt;P&gt;wa_exportdata-konnr = wa_ekko_ekpo-konnr.&lt;/P&gt;&lt;P&gt;wa_exportdata-ktpnr = wa_ekko_ekpo-ktpnr.&lt;/P&gt;&lt;P&gt;wa_exportdata-werks = wa_ekko_ekpo-werks.&lt;/P&gt;&lt;P&gt;wa_exportdata-menge = wa_ekko_ekpo-menge.&lt;/P&gt;&lt;P&gt;wa_exportdata-netpr = wa_ekko_ekpo-netpr.&lt;/P&gt;&lt;P&gt;wa_exportdata-lgort = wa_ekko_ekpo-lgort.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;APPEND wa_exportdata TO exportdata.&lt;/P&gt;&lt;P&gt;CLEAR: wa_exportdata.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;SORT exportdata BY ebeln ebelp.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Dec 2009 07:35:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/previous-data-missing-after-appending-an-extra-record-into-internal-table/m-p/6430546#M1410888</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-10T07:35:29Z</dc:date>
    </item>
    <item>
      <title>Re: Previous data missing after appending an extra record into internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/previous-data-missing-after-appending-an-extra-record-into-internal-table/m-p/6430547#M1410889</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 you use BINARY SEARCH in READ statement you must sort table.&lt;/P&gt;&lt;P&gt;Two ways:&lt;/P&gt;&lt;P&gt;1. Declare table exportdata as sorted table and use INSERT instead of APPEND.&lt;/P&gt;&lt;P&gt;2. Modify code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
...
APPEND wa_exportdata TO exportdata.
SORT exportdata BY ebeln ebelp. " add this
CLEAR: wa_exportdata.
ENDIF.
ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Dec 2009 07:40:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/previous-data-missing-after-appending-an-extra-record-into-internal-table/m-p/6430547#M1410889</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-10T07:40:06Z</dc:date>
    </item>
    <item>
      <title>Re: Previous data missing after appending an extra record into internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/previous-data-missing-after-appending-an-extra-record-into-internal-table/m-p/6430548#M1410890</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;Before appending just write the two additional fields also and pass initial values to it.&lt;/P&gt;&lt;P&gt;This might solve the problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Dec 2009 08:09:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/previous-data-missing-after-appending-an-extra-record-into-internal-table/m-p/6430548#M1410890</guid>
      <dc:creator>former_member584974</dc:creator>
      <dc:date>2009-12-10T08:09:40Z</dc:date>
    </item>
    <item>
      <title>Re: Previous data missing after appending an extra record into internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/previous-data-missing-after-appending-an-extra-record-into-internal-table/m-p/6430549#M1410891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Selina,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Please check whether you &lt;STRONG&gt;sorted&lt;/STRONG&gt; the internal table &lt;STRONG&gt;Exportdata&lt;/STRONG&gt; by EBELN EBELP before you do a Binary search on the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have done this, and still facing the problem, Please post the structures of both internal tables IT_EKKO_ekpo and Exportdata.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Dec 2009 08:12:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/previous-data-missing-after-appending-an-extra-record-into-internal-table/m-p/6430549#M1410891</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-10T08:12:11Z</dc:date>
    </item>
  </channel>
</rss>

