<?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: Fetching huge data into an internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/fetching-huge-data-into-an-internal-table/m-p/9028397#M1700057</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hermann,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;well, to operate DB snapshots has become quite comfortable meanwhile.&lt;/P&gt;&lt;P&gt;And there are lots of usefull things you can do with them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only pitfalls it has is that you always need to set back the entire DB, &lt;/P&gt;&lt;P&gt;which might not always is what you really like to do. So there might&lt;/P&gt;&lt;P&gt;be need to proceed with exports and imports somtimes, and I always&lt;/P&gt;&lt;P&gt;did not like to re-invent the wheel, so I often use transports if appropriate.&lt;/P&gt;&lt;P&gt;Devlopers usually know how they work, so I do not need to explain, what I am&lt;/P&gt;&lt;P&gt;doing with my database tools underneath THEIR system &lt;SPAN __jive_emoticon_name="laugh" __jive_macro_name="emoticon" class="jive_macro jive_macro_emoticon jive_emote" src="https://community.sap.com/1031/images/emoticons/laugh.gif"&gt;&lt;/SPAN&gt; .&lt;/P&gt;&lt;P&gt;But if they are doing stuff to the big beasts, I always like to have my DB exports in addition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On Oracle, you can even use other flashback features, &lt;/P&gt;&lt;P&gt;but not all of them are supported in SAP environment.&lt;/P&gt;&lt;P&gt;But i.e. flashback query is a "MUST KNOW" when running oracle.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Volker&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Oct 2012 17:11:22 GMT</pubDate>
    <dc:creator>volker_borowski2</dc:creator>
    <dc:date>2012-10-23T17:11:22Z</dc:date>
    <item>
      <title>Fetching huge data into an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fetching-huge-data-into-an-internal-table/m-p/9028392#M1700052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I have below requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to take a backup of all the entries of a table in a file (either in presentation or application server). Since the data is so huge when i fetch the entries into the internal table it might result in a Dump as it may run out of memory. So is there a way i can fetch the data part by part and append in the same file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All your help will be very much appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Praveenkumar T.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Oct 2012 10:15:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fetching-huge-data-into-an-internal-table/m-p/9028392#M1700052</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-10-22T10:15:48Z</dc:date>
    </item>
    <item>
      <title>Re: Fetching huge data into an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fetching-huge-data-into-an-internal-table/m-p/9028393#M1700053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Use PACKAGE SIZE in SELECT statement and then append into your internal table to avoid dump for fetching huge amount of data.&lt;/P&gt;&lt;P&gt;If the data you have to download is from one table . You can also download directly from se11 , just execute the table with no conditions,give the maximum number of hits and columns from number of entries&amp;nbsp; , select all and download(shift + F8)&amp;nbsp; to the format you need. I havent tried it with huge amount of data but i think it should work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Oct 2012 10:38:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fetching-huge-data-into-an-internal-table/m-p/9028393#M1700053</guid>
      <dc:creator>former_member193464</dc:creator>
      <dc:date>2012-10-22T10:38:03Z</dc:date>
    </item>
    <item>
      <title>Re: Fetching huge data into an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fetching-huge-data-into-an-internal-table/m-p/9028394#M1700054</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;sounds like a DBA task to me. What about exporting on DB level and storing it on the db server?&lt;/P&gt;&lt;P&gt;Why would you want to do it in ABAP and have it on the app server level or frontend?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want / have to do it with ABAP SELECT ... INTO TABLE ... PACKAGE SIZE... ENDSELECT is your friend.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hermann&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Oct 2012 14:08:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fetching-huge-data-into-an-internal-table/m-p/9028394#M1700054</guid>
      <dc:creator>HermannGahm</dc:creator>
      <dc:date>2012-10-22T14:08:15Z</dc:date>
    </item>
    <item>
      <title>Re: Fetching huge data into an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fetching-huge-data-into-an-internal-table/m-p/9028395#M1700055</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;be sure, that a backup of ALL entries is all you need.&lt;/P&gt;&lt;P&gt;Is the table client dependant? &lt;/P&gt;&lt;P&gt;Do you need to rescue ALL clients?&lt;/P&gt;&lt;P&gt;What will you do to the table? A structural conversion? &lt;/P&gt;&lt;P&gt;You will need to save the DDIC Source in additon.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So why not use transports as a backup?&lt;/P&gt;&lt;P&gt;Add as virtual system DUM (dummy) to your STMS config.&lt;/P&gt;&lt;P&gt;It does not need to be on any path or track, you only need it to send transports of copies to it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a transport of COPYs.&lt;/P&gt;&lt;P&gt;Include &lt;/P&gt;&lt;P&gt;R3TR TABL tablename&lt;/P&gt;&lt;P&gt;to the object list and assign DUM as the target system and release the transport. &lt;/P&gt;&lt;P&gt;This is your structure export.&lt;/P&gt;&lt;P&gt;Check that the datafile is indeed created on OS Level and the export log.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a new transport of COPYs.&lt;/P&gt;&lt;P&gt;include&lt;/P&gt;&lt;P&gt;R3TR TABU tablesname&lt;/P&gt;&lt;P&gt;to the object list and assign DUM as the target system and release the transport. &lt;/P&gt;&lt;P&gt;This is your data export for the client you are logged into (if the table is client dependent).&lt;/P&gt;&lt;P&gt;Check that the datafile is indeed created on OS Level.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Repeat the last step untill all clients are processed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Test the functionality of re-importing the stuff you need on QAS, to make sure, &lt;/P&gt;&lt;P&gt;that you do proper handling of the required actions.&lt;/P&gt;&lt;P&gt;You can do a client copy of only users and authorisations to a new empty client.&lt;/P&gt;&lt;P&gt;After this you can import the transport of copies (of the data, not the structure)&lt;/P&gt;&lt;P&gt; to the new client and crosscheck in SE16.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the other hand: Some DBs have snapshot capabilities meanwhile, so on MAXDB or&lt;/P&gt;&lt;P&gt;ORACLE I would check out, if this would be a fast was to set back a DB. &lt;/P&gt;&lt;P&gt;This usually requires only minutes to set back and you are sure, everything is consistent, so &lt;/P&gt;&lt;P&gt;you do not need to make sure that you captured all tables involved.&lt;/P&gt;&lt;P&gt;For MAXDB you should be on recent Version 7.7 patches. &lt;/P&gt;&lt;P&gt;For ORACLE the feature is called flashback database. &lt;/P&gt;&lt;P&gt;You should be on recent Version 11.2 patches for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Volker&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Oct 2012 16:43:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fetching-huge-data-into-an-internal-table/m-p/9028395#M1700055</guid>
      <dc:creator>volker_borowski2</dc:creator>
      <dc:date>2012-10-22T16:43:09Z</dc:date>
    </item>
    <item>
      <title>Re: Fetching huge data into an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fetching-huge-data-into-an-internal-table/m-p/9028396#M1700056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Volker,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;very interesting ideas. Yes you are right the op should have given more information what the purpose is... . I like your additional ideas to the question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hermann&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Oct 2012 17:34:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fetching-huge-data-into-an-internal-table/m-p/9028396#M1700056</guid>
      <dc:creator>HermannGahm</dc:creator>
      <dc:date>2012-10-22T17:34:53Z</dc:date>
    </item>
    <item>
      <title>Re: Fetching huge data into an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fetching-huge-data-into-an-internal-table/m-p/9028397#M1700057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hermann,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;well, to operate DB snapshots has become quite comfortable meanwhile.&lt;/P&gt;&lt;P&gt;And there are lots of usefull things you can do with them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only pitfalls it has is that you always need to set back the entire DB, &lt;/P&gt;&lt;P&gt;which might not always is what you really like to do. So there might&lt;/P&gt;&lt;P&gt;be need to proceed with exports and imports somtimes, and I always&lt;/P&gt;&lt;P&gt;did not like to re-invent the wheel, so I often use transports if appropriate.&lt;/P&gt;&lt;P&gt;Devlopers usually know how they work, so I do not need to explain, what I am&lt;/P&gt;&lt;P&gt;doing with my database tools underneath THEIR system &lt;SPAN __jive_emoticon_name="laugh" __jive_macro_name="emoticon" class="jive_macro jive_macro_emoticon jive_emote" src="https://community.sap.com/1031/images/emoticons/laugh.gif"&gt;&lt;/SPAN&gt; .&lt;/P&gt;&lt;P&gt;But if they are doing stuff to the big beasts, I always like to have my DB exports in addition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On Oracle, you can even use other flashback features, &lt;/P&gt;&lt;P&gt;but not all of them are supported in SAP environment.&lt;/P&gt;&lt;P&gt;But i.e. flashback query is a "MUST KNOW" when running oracle.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Volker&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Oct 2012 17:11:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fetching-huge-data-into-an-internal-table/m-p/9028397#M1700057</guid>
      <dc:creator>volker_borowski2</dc:creator>
      <dc:date>2012-10-23T17:11:22Z</dc:date>
    </item>
    <item>
      <title>Re: Fetching huge data into an internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fetching-huge-data-into-an-internal-table/m-p/9028398#M1700058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thanks for your responses. Since i needed an abap solution for this, below is the logic which helped me solve the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="L0S52"&gt;OPEN &lt;SPAN class="L0S52"&gt;DATASET &amp;lt;file name&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="L0S52"&gt;FOR &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;OUTPUT &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;IN &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;TEXT &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;MODE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;ENCODING &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;DEFAULT&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="L0S52"&gt;OPEN &lt;SPAN class="L0S52"&gt;CURSOR &lt;/SPAN&gt;l_c1 &lt;SPAN class="L0S52"&gt;FOR &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;SELECT &lt;/SPAN&gt;* &lt;SPAN class="L0S52"&gt;FROM &lt;/SPAN&gt;&amp;lt;Table name&amp;gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;WHILE l_c1 IS NOT INITIAL.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="L0S52"&gt;FETCH &lt;SPAN class="L0S52"&gt;NEXT &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;CURSOR &lt;/SPAN&gt;l_c1 &lt;SPAN class="L0S52"&gt;INTO &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;TABLE &lt;/SPAN&gt;&amp;lt;Internal table&amp;gt; PACKAGE &lt;SPAN class="L0S52"&gt;SIZE &lt;/SPAN&gt;p_pkg&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;* p_pkg is the maximum number of records to be fetched every time.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="L0S52"&gt;IF sy&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;subrc &lt;SPAN class="L0S52"&gt;EQ &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;0&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;LOOP AT &amp;lt;internal table&amp;gt; INTO &amp;lt;work area&amp;gt;.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;TRANSFER &amp;lt;work area&amp;gt; TO &amp;lt;file name&amp;gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;ENDLOOP.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;ELSE.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;CLOSE CURSOR l_c1.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;ENDIF.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;ENDWHILE.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;&lt;STRONG&gt;CLOSE DATASET &amp;lt;file name&amp;gt;.&lt;/STRONG&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;Best Regards,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;Praveenkumar T&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Oct 2012 08:21:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fetching-huge-data-into-an-internal-table/m-p/9028398#M1700058</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-10-24T08:21:19Z</dc:date>
    </item>
  </channel>
</rss>

