<?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 Reading data from application server based on selection screen in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-data-from-application-server-based-on-selection-screen/m-p/3935447#M941888</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a file in application server with 6 million records.&lt;/P&gt;&lt;P&gt;I have to retrieve data from that file based on selection screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the following code is what I have used,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;********&lt;/P&gt;&lt;P&gt;  DO.&lt;/P&gt;&lt;P&gt;    READ DATASET p_fname INTO fs_file.&lt;/P&gt;&lt;P&gt;    MOVE-CORRESPONDING fs_file TO t_data.&lt;/P&gt;&lt;P&gt;    APPEND t_data.&lt;/P&gt;&lt;P&gt;  ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop at t_data where kunnr in so_kunnr.&lt;/P&gt;&lt;P&gt;      move-corresponding t_data to t_final.&lt;/P&gt;&lt;P&gt;        append t_final.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;****************&lt;/P&gt;&lt;P&gt;reading total data is taking more time. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to filter the data at the time of reading only?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 30 May 2008 09:14:40 GMT</pubDate>
    <dc:creator>former_member853013</dc:creator>
    <dc:date>2008-05-30T09:14:40Z</dc:date>
    <item>
      <title>Reading data from application server based on selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-data-from-application-server-based-on-selection-screen/m-p/3935447#M941888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a file in application server with 6 million records.&lt;/P&gt;&lt;P&gt;I have to retrieve data from that file based on selection screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the following code is what I have used,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;********&lt;/P&gt;&lt;P&gt;  DO.&lt;/P&gt;&lt;P&gt;    READ DATASET p_fname INTO fs_file.&lt;/P&gt;&lt;P&gt;    MOVE-CORRESPONDING fs_file TO t_data.&lt;/P&gt;&lt;P&gt;    APPEND t_data.&lt;/P&gt;&lt;P&gt;  ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop at t_data where kunnr in so_kunnr.&lt;/P&gt;&lt;P&gt;      move-corresponding t_data to t_final.&lt;/P&gt;&lt;P&gt;        append t_final.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;****************&lt;/P&gt;&lt;P&gt;reading total data is taking more time. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to filter the data at the time of reading only?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2008 09:14:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-data-from-application-server-based-on-selection-screen/m-p/3935447#M941888</guid>
      <dc:creator>former_member853013</dc:creator>
      <dc:date>2008-05-30T09:14:40Z</dc:date>
    </item>
    <item>
      <title>Re: Reading data from application server based on selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-data-from-application-server-based-on-selection-screen/m-p/3935448#M941889</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;While reading the data from application server itself, move the values to an Internal table or work area.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can filter there itself based on conditions and append the success records to an Internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Avoid using Looping and MOVE-TO CORRESPONDING FIELDS, since its hits a performance Issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can move by fields to an Internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anbalagan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2008 09:30:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-data-from-application-server-based-on-selection-screen/m-p/3935448#M941889</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-30T09:30:54Z</dc:date>
    </item>
    <item>
      <title>Re: Reading data from application server based on selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-data-from-application-server-based-on-selection-screen/m-p/3935449#M941890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eswar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are two ways:&lt;/P&gt;&lt;P&gt;1. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*********&lt;/P&gt;&lt;P&gt;DO.&lt;/P&gt;&lt;P&gt;READ DATASET p_fname INTO fs_file.&lt;/P&gt;&lt;P&gt;MOVE-CORRESPONDING fs_file TO t_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if t_data-kunnr in so_kunnr.&lt;/P&gt;&lt;P&gt;APPEND t_data.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;clear t_data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*********&lt;/P&gt;&lt;P&gt;This way you will append only required records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.&lt;/P&gt;&lt;P&gt;********&lt;/P&gt;&lt;P&gt;DO.&lt;/P&gt;&lt;P&gt;READ DATASET p_fname INTO fs_file.&lt;/P&gt;&lt;P&gt;MOVE-CORRESPONDING fs_file TO t_data.&lt;/P&gt;&lt;P&gt;APPEND t_data.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;delete t_data where kunnr in so_kunnr.&lt;/P&gt;&lt;P&gt;********&lt;/P&gt;&lt;P&gt;This way you will be left with relevant records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But in both ways, you will have to read the entire file at least once.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Reward points if useful.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2008 10:14:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-data-from-application-server-based-on-selection-screen/m-p/3935449#M941890</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-30T10:14:19Z</dc:date>
    </item>
    <item>
      <title>Re: Reading data from application server based on selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-data-from-application-server-based-on-selection-screen/m-p/3935450#M941891</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;First declare the internal table with fields in the order of flat file on application server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This helps in avoiding the MOVE-CORRESPONDING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead you can use MOVE. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOVE-CORRESPONDING is a performance issue. As you have mentioned that nearly 6 million records are there, it affects severly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now follow the logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO.&lt;/P&gt;&lt;P&gt;READ DATASET p_fname INTO fs_file.&lt;/P&gt;&lt;P&gt;MOVE  fs_file TO t_data.&lt;/P&gt;&lt;P&gt;APPEND t_data.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at t_data where kunnr in so_kunnr.&lt;/P&gt;&lt;P&gt;move t_data to t_final.&lt;/P&gt;&lt;P&gt;append t_final.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Otherwise use the logic given by Mr Sailesh nut put NOT .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO.&lt;/P&gt;&lt;P&gt;READ DATASET p_fname INTO fs_file.&lt;/P&gt;&lt;P&gt;MOVE  fs_file TO t_data.&lt;/P&gt;&lt;P&gt;APPEND t_data.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;delete t_data where kunnr &lt;STRONG&gt;not&lt;/STRONG&gt; in so_kunnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will put only selected values in internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this is clear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2008 11:04:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-data-from-application-server-based-on-selection-screen/m-p/3935450#M941891</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-30T11:04:28Z</dc:date>
    </item>
  </channel>
</rss>

