<?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 while downloading data in excel file. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-downloading-data-in-excel-file/m-p/2313747#M507077</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 Can't use WS_Upload in Back ground...Use open dataset and write itto a file..This will work in background...See the sample code below...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : var_msg(50).&lt;/P&gt;&lt;P&gt;  DATA: e_lfile LIKE rlgrap-filename .&lt;/P&gt;&lt;P&gt;  DATA : flname(500) TYPE c.&lt;/P&gt;&lt;P&gt;  CONCATENATE p_spath 'LOG' sy-datum sy-uzeit '.LOG' INTO flname.&lt;/P&gt;&lt;P&gt;  e_lfile  =  flname.&lt;/P&gt;&lt;P&gt;  SELECT MAX( crdate ) INTO g_date  FROM  zirl01_day_bal2 WHERE crdate &amp;lt;= p_date.&lt;/P&gt;&lt;P&gt;  IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;    IF ( g_date &amp;lt;&amp;gt; p_pdate AND p_skipw &amp;lt;&amp;gt; 'X' ).&lt;/P&gt;&lt;P&gt;      CONCATENATE  g_date ' is the available maximum date ' INTO var_msg.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;             var_msg = ''.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      log_line = var_msg.&lt;/P&gt;&lt;P&gt;      APPEND log_line TO itab_log.&lt;/P&gt;&lt;P&gt;      OPEN DATASET e_lfile FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.&lt;/P&gt;&lt;P&gt;      IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;        PERFORM log_writing.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;      MESSAGE  e398(00) WITH var_msg.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM log_writing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF NOT itab_log[] IS INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    LOOP AT itab_log.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      TRANSFER itab_log TO e_logfile.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;    CLOSE DATASET e_logfile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    "LOG_WRITING&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Change the variable and internal table names and do like this,....this will workk&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward All Helpfull Answers.........&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 May 2007 07:10:29 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-22T07:10:29Z</dc:date>
    <item>
      <title>Problem while downloading data in excel file.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-downloading-data-in-excel-file/m-p/2313743#M507073</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 m having a Problem while downloading data in excel file while running the program in background. I m using WS_DOWNLOAD for downloading the data of internal table in a file. The job CANCLES every time when i run it in background.&lt;/P&gt;&lt;P&gt;But when i run the same program in foreground it runs sucessfully.&lt;/P&gt;&lt;P&gt;pls tel me how can i download data while running the program in background&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 May 2007 07:05:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-downloading-data-in-excel-file/m-p/2313743#M507073</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-22T07:05:06Z</dc:date>
    </item>
    <item>
      <title>Re: Problem while downloading data in excel file.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-downloading-data-in-excel-file/m-p/2313744#M507074</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 can't use WS_DOWNLOAD in the background as it downloads the data on presentation server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Atish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 May 2007 07:06:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-downloading-data-in-excel-file/m-p/2313744#M507074</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-22T07:06:15Z</dc:date>
    </item>
    <item>
      <title>Re: Problem while downloading data in excel file.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-downloading-data-in-excel-file/m-p/2313745#M507075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want to download the data when the job runs in background you have to downlaod it on application server using OPEN DATASET...and related keywords.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 May 2007 07:07:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-downloading-data-in-excel-file/m-p/2313745#M507075</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-22T07:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: Problem while downloading data in excel file.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-downloading-data-in-excel-file/m-p/2313746#M507076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;U should provide the file path satatically in code,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Suresh.D&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 May 2007 07:08:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-downloading-data-in-excel-file/m-p/2313746#M507076</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-22T07:08:23Z</dc:date>
    </item>
    <item>
      <title>Re: Problem while downloading data in excel file.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-downloading-data-in-excel-file/m-p/2313747#M507077</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 Can't use WS_Upload in Back ground...Use open dataset and write itto a file..This will work in background...See the sample code below...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : var_msg(50).&lt;/P&gt;&lt;P&gt;  DATA: e_lfile LIKE rlgrap-filename .&lt;/P&gt;&lt;P&gt;  DATA : flname(500) TYPE c.&lt;/P&gt;&lt;P&gt;  CONCATENATE p_spath 'LOG' sy-datum sy-uzeit '.LOG' INTO flname.&lt;/P&gt;&lt;P&gt;  e_lfile  =  flname.&lt;/P&gt;&lt;P&gt;  SELECT MAX( crdate ) INTO g_date  FROM  zirl01_day_bal2 WHERE crdate &amp;lt;= p_date.&lt;/P&gt;&lt;P&gt;  IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;    IF ( g_date &amp;lt;&amp;gt; p_pdate AND p_skipw &amp;lt;&amp;gt; 'X' ).&lt;/P&gt;&lt;P&gt;      CONCATENATE  g_date ' is the available maximum date ' INTO var_msg.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;             var_msg = ''.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      log_line = var_msg.&lt;/P&gt;&lt;P&gt;      APPEND log_line TO itab_log.&lt;/P&gt;&lt;P&gt;      OPEN DATASET e_lfile FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.&lt;/P&gt;&lt;P&gt;      IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;        PERFORM log_writing.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;      MESSAGE  e398(00) WITH var_msg.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM log_writing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF NOT itab_log[] IS INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    LOOP AT itab_log.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      TRANSFER itab_log TO e_logfile.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;    CLOSE DATASET e_logfile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    "LOG_WRITING&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Change the variable and internal table names and do like this,....this will workk&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward All Helpfull Answers.........&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 May 2007 07:10:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-downloading-data-in-excel-file/m-p/2313747#M507077</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-22T07:10:29Z</dc:date>
    </item>
  </channel>
</rss>

