<?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: problem in ws_download while executing in background in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-ws-download-while-executing-in-background/m-p/1667143#M295246</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rich,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"There is a way to download to PC from background, but you really have to jump thru some hoops and there is some stuff to be done on the PC itself"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know the way to download to PC from background..Just to learn a new thing..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 31 Oct 2006 15:49:42 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-10-31T15:49:42Z</dc:date>
    <item>
      <title>problem in ws_download while executing in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-ws-download-while-executing-in-background/m-p/1667136#M295239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am downloading an excel file. &lt;/P&gt;&lt;P&gt;I have written a code like this.&lt;/P&gt;&lt;P&gt;If it is in foreground, it will display in ALV and download the data in an excel file in C:/ drive. IF i run in foreground i am getting the output and also the file is created in C:/ with the data.&lt;/P&gt;&lt;P&gt;If i run that program in background the file is not created. I am not able to see the file in C:/.&lt;/P&gt;&lt;P&gt;How to download a file in background..??&lt;/P&gt;&lt;P&gt;Kindly help meout plz..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Oct 2006 14:37:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-ws-download-while-executing-in-background/m-p/1667136#M295239</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-31T14:37:21Z</dc:date>
    </item>
    <item>
      <title>Re: problem in ws_download while executing in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-ws-download-while-executing-in-background/m-p/1667137#M295240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can not download from background process.  The background process does not know what "C:\" on your computer is.  You can only download to the application server in background.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Oct 2006 14:39:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-ws-download-while-executing-in-background/m-p/1667137#M295240</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-10-31T14:39:29Z</dc:date>
    </item>
    <item>
      <title>Re: problem in ws_download while executing in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-ws-download-while-executing-in-background/m-p/1667138#M295241</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;You cannot use WS_DOWNLOAD in background.&lt;/P&gt;&lt;P&gt;you can not use your presentation server links.that means that you will also not be able to use gui_download also.&lt;/P&gt;&lt;P&gt;Why dont you write your file to the application server and then download it using transaction CG3Y.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Oct 2006 14:43:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-ws-download-while-executing-in-background/m-p/1667138#M295241</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-31T14:43:09Z</dc:date>
    </item>
    <item>
      <title>Re: problem in ws_download while executing in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-ws-download-while-executing-in-background/m-p/1667139#M295242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So, is there any solution for this issue. I need to do it as i do not have any other option.&lt;/P&gt;&lt;P&gt;Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Oct 2006 14:43:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-ws-download-while-executing-in-background/m-p/1667139#M295242</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-31T14:43:56Z</dc:date>
    </item>
    <item>
      <title>Re: problem in ws_download while executing in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-ws-download-while-executing-in-background/m-p/1667140#M295243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is a way to download to PC from background, but you really have to jump thru some hoops and there is some stuff to be done on the PC itself.  Really its not worth it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are a couple ways to work around this, but it depends on the real requirement.  For example, say you have a long running report and the user wants to have the report in excel.  So you need to run in background, you can run your report in backgroun and update a custom table with the data(or just write to the application server as a file), then the user can run a transaction after the job is completed to download the data to the PC, either from the custom db, or the application server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a short program which shows how to download a file from the application server to the frontend PC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;report zrich_0001.

parameters: p_file type localfile
           default '/usr/sap/trans/data/R903289.TST'.

data: begin of idata occurs 0,
      rec type string,
      end of idata.
data: xdata type string.

data: stripped type rlgrap-filename.
data: file_path type rlgrap-filename.
data: fe_path type string.

start-of-selection.

* Download Data Files
  open dataset p_file for input in text mode.
  if sy-subrc = 0.
    do.
      read dataset p_file into xdata.
      if sy-subrc &amp;lt;&amp;gt; 0.
        exit.
      endif.
      idata-rec = xdata.
      append idata.
    enddo.
  endif.

  call function 'SO_SPLIT_FILE_AND_PATH'
       exporting
            full_name     = p_file
       importing
            stripped_name = stripped
            file_path     = file_path.

  concatenate 'C:' stripped into fe_path.

  call function 'GUI_DOWNLOAD'
       exporting
            filename = fe_path
       tables
            data_tab = idata
       exceptions
            others   = 22.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Oct 2006 14:51:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-ws-download-while-executing-in-background/m-p/1667140#M295243</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-10-31T14:51:13Z</dc:date>
    </item>
    <item>
      <title>Re: problem in ws_download while executing in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-ws-download-while-executing-in-background/m-p/1667141#M295244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thankyou all,&lt;/P&gt;&lt;P&gt;Anyway my problem is not solved, but got some reasons to put to my boss.. :-(..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thankyou all...&lt;/P&gt;&lt;P&gt;Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Oct 2006 15:10:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-ws-download-while-executing-in-background/m-p/1667141#M295244</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-31T15:10:31Z</dc:date>
    </item>
    <item>
      <title>Re: problem in ws_download while executing in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-ws-download-while-executing-in-background/m-p/1667142#M295245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please remember to award points for any helpful answers.  Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Oct 2006 15:22:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-ws-download-while-executing-in-background/m-p/1667142#M295245</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-10-31T15:22:30Z</dc:date>
    </item>
    <item>
      <title>Re: problem in ws_download while executing in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-ws-download-while-executing-in-background/m-p/1667143#M295246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rich,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"There is a way to download to PC from background, but you really have to jump thru some hoops and there is some stuff to be done on the PC itself"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know the way to download to PC from background..Just to learn a new thing..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Oct 2006 15:49:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-ws-download-while-executing-in-background/m-p/1667143#M295246</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-31T15:49:42Z</dc:date>
    </item>
    <item>
      <title>Re: problem in ws_download while executing in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-ws-download-while-executing-in-background/m-p/1667144#M295247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Naren, here is the doc which lays it all out.  Yes, it is possible(anything is with time and money) but is it a good idea?, maybe for an extreme case, but I think that we should still operate under the understanding that you can not download/upload using the standard SAP function modules from the background.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/abap/communication%20to%20presentation%20server%20in%20background%20mode.doc" target="test_blank"&gt;https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/abap/communication%20to%20presentation%20server%20in%20background%20mode.doc&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Oct 2006 16:05:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-ws-download-while-executing-in-background/m-p/1667144#M295247</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-10-31T16:05:59Z</dc:date>
    </item>
    <item>
      <title>Re: problem in ws_download while executing in background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-ws-download-while-executing-in-background/m-p/1667145#M295248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot Rich..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Oct 2006 16:10:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-ws-download-while-executing-in-background/m-p/1667145#M295248</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-31T16:10:04Z</dc:date>
    </item>
  </channel>
</rss>

