<?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: PACKAGE SIZE SELECT LOOP with incorporated function call? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/package-size-select-loop-with-incorporated-function-call/m-p/4251170#M1014764</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jens: &lt;/P&gt;&lt;P&gt;You cannot call FM to write to a file inside a SELECT .. ENDSELECT Loop. This interrupts the database access.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If possible, try to reduce the amout of used memory by fetching only the required fields in your select. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Jordi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 Jul 2008 10:42:14 GMT</pubDate>
    <dc:creator>jordi_escodaruiz</dc:creator>
    <dc:date>2008-07-30T10:42:14Z</dc:date>
    <item>
      <title>PACKAGE SIZE SELECT LOOP with incorporated function call?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/package-size-select-loop-with-incorporated-function-call/m-p/4251169#M1014763</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 am trying to minimize the amount of memory used by a report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One of the ways of doing this is to use the PACKAGE SIZE addition to the SELECT statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, as the data extracted needs to be either stored on the application server or downloaded to a PC, I also want to create the file using the option to APPEND the data extracted for each package a little at a time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here comes the problem: If I try to call function module GUI_DOWNLOAD inside the PACKAGE SIZE SELECT - ENDSELECT loop, I get the DBIF_RSQL_INVALID_CURSOR CX_SY_OPEN_SQL_DB exception at the beginning of the second loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any way to avoid this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jul 2008 06:39:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/package-size-select-loop-with-incorporated-function-call/m-p/4251169#M1014763</guid>
      <dc:creator>jensbilgrav</dc:creator>
      <dc:date>2008-07-30T06:39:35Z</dc:date>
    </item>
    <item>
      <title>Re: PACKAGE SIZE SELECT LOOP with incorporated function call?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/package-size-select-loop-with-incorporated-function-call/m-p/4251170#M1014764</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jens: &lt;/P&gt;&lt;P&gt;You cannot call FM to write to a file inside a SELECT .. ENDSELECT Loop. This interrupts the database access.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If possible, try to reduce the amout of used memory by fetching only the required fields in your select. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Jordi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jul 2008 10:42:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/package-size-select-loop-with-incorporated-function-call/m-p/4251170#M1014764</guid>
      <dc:creator>jordi_escodaruiz</dc:creator>
      <dc:date>2008-07-30T10:42:14Z</dc:date>
    </item>
    <item>
      <title>Re: PACKAGE SIZE SELECT LOOP with incorporated function call?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/package-size-select-loop-with-incorporated-function-call/m-p/4251171#M1014765</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use the free statement for the internal tables...if the table data is sent to some other internal table then clear the memory of the internal tables which had no use at the end of the program&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jul 2008 10:44:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/package-size-select-loop-with-incorporated-function-call/m-p/4251171#M1014765</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-30T10:44:08Z</dc:date>
    </item>
    <item>
      <title>Re: PACKAGE SIZE SELECT LOOP with incorporated function call?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/package-size-select-loop-with-incorporated-function-call/m-p/4251172#M1014766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It causes lot of performance. it is not advisable to use GUI_DOWNLOAD inside the select endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and you are using PACKAGE SIZE.&lt;/P&gt;&lt;P&gt;You select them one shot and send it to GUI_DOWNLAOD.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jul 2008 10:45:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/package-size-select-loop-with-incorporated-function-call/m-p/4251172#M1014766</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-30T10:45:00Z</dc:date>
    </item>
    <item>
      <title>Re: PACKAGE SIZE SELECT LOOP with incorporated function call?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/package-size-select-loop-with-incorporated-function-call/m-p/4251173#M1014767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; Usually this error (DBIF_RSQL_INVALID_CURSOR ) comes if you are Select Statement is missing some fields please do have a look around with your SELECT statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sudharshan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jul 2008 10:45:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/package-size-select-loop-with-incorporated-function-call/m-p/4251173#M1014767</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-30T10:45:13Z</dc:date>
    </item>
    <item>
      <title>Re: PACKAGE SIZE SELECT LOOP with incorporated function call?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/package-size-select-loop-with-incorporated-function-call/m-p/4251174#M1014768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What I find strange, though, is that it does not cause any problems to create the file on the application server, appending the data extracted for each package a little at a time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is only when using FM GUI_DOWNLOAD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe another function module for downloading the data exists?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jul 2008 11:25:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/package-size-select-loop-with-incorporated-function-call/m-p/4251174#M1014768</guid>
      <dc:creator>jensbilgrav</dc:creator>
      <dc:date>2008-07-30T11:25:19Z</dc:date>
    </item>
    <item>
      <title>Re: PACKAGE SIZE SELECT LOOP with incorporated function call?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/package-size-select-loop-with-incorporated-function-call/m-p/4251175#M1014769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's not that strange. While you are only using the DATASET related ABAP statements when writing a file to the application server, the function GUI_DOWNLOAD might contain statements that invalidate the database cursor, such as COMMIT WORK.&lt;/P&gt;&lt;P&gt;Maye you can set up an automatic transfer of the complete file from the application server to the desired destination via FTP (or similar products) as a second step.&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jul 2008 11:47:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/package-size-select-loop-with-incorporated-function-call/m-p/4251175#M1014769</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2008-07-30T11:47:06Z</dc:date>
    </item>
  </channel>
</rss>

