<?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: background process in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/background-process/m-p/5398886#M1240539</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;Use s-batch to confirm whether you are running the program in Background or foreground.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If fore ground then use the function module gui_download to download.&lt;/P&gt;&lt;P&gt;if back ground then use open dataset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Rajesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Apr 2009 12:52:01 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-04-08T12:52:01Z</dc:date>
    <item>
      <title>background process</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/background-process/m-p/5398875#M1240528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;                I have  developed  report for purchase register . if i execute this report in background process i am not able to get the downloaded file in excel and output is also not coming properly, columns are going to overlap.&lt;/P&gt;&lt;P&gt;                i used the functional  module SAP_CONVERT_TO_XLS_FORMAT, but it is coming without data i.e excel file is blank.So tell me How to download excel file  in background process&lt;/P&gt;&lt;P&gt;directly? If u have reference code send me. &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;Balu.K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2009 11:34:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/background-process/m-p/5398875#M1240528</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-07T11:34:52Z</dc:date>
    </item>
    <item>
      <title>Re: background process</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/background-process/m-p/5398876#M1240529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is not possible to download the report to XLS directly when the report is run in background..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the report is run in background.. it actually runs on the application server.. and not on gui frontend...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the best solution is to .. write the data in a particular file in the application server..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And then once the job is executed successfully ( This can be seen in SM37 )... we can write another logic to fetch that file from application server and put it in XLS format..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheer.s....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2009 11:39:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/background-process/m-p/5398876#M1240529</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-07T11:39:27Z</dc:date>
    </item>
    <item>
      <title>Re: background process</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/background-process/m-p/5398877#M1240530</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;&lt;/P&gt;&lt;P&gt;For this you should check in debugging that if the internal table which you are passing contains the values before the function call.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And for downloading to excle sheet their is OLE method which can easily meet the formatting requiremenst also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;just check with it,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;N.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2009 11:39:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/background-process/m-p/5398877#M1240530</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-07T11:39:48Z</dc:date>
    </item>
    <item>
      <title>Re: background process</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/background-process/m-p/5398878#M1240531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bala,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In background processing the control goes to application server so know of the FM like(GUI_DOWNLOAD/UPLOAD) will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to write program to transfer the content of internal table to application directory file.&lt;/P&gt;&lt;P&gt;Open dataset&lt;/P&gt;&lt;P&gt;Transfer&lt;/P&gt;&lt;P&gt;Close dataset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can create the file separated by commas, so once you save it as .CSV extension using transaction cg3y (Download file from application dir) your problem would be solved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR/Manas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2009 11:44:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/background-process/m-p/5398878#M1240531</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-07T11:44:03Z</dc:date>
    </item>
    <item>
      <title>Re: background process</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/background-process/m-p/5398879#M1240532</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;can u pls send me the reference code to download  file from application server to Presentation server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i used &lt;/P&gt;&lt;P&gt;open data set &lt;/P&gt;&lt;P&gt;Trasfer &lt;/P&gt;&lt;P&gt;closed data set&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but it is not working. do you have any idea to increase no of cloumns in SPAD.&lt;/P&gt;&lt;P&gt;&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;balu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Apr 2009 06:52:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/background-process/m-p/5398879#M1240532</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-08T06:52:47Z</dc:date>
    </item>
    <item>
      <title>Re: background process</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/background-process/m-p/5398880#M1240533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bala,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is the sample code...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS: p_file TYPE fileextern DEFAULT '/sapout/xyz'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;File on Application Server&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  OPEN DATASET p_file FOR OUTPUT IN TEXT MODE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Transfer the content.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  LOOP AT gt_output INTO gs_output.&lt;/P&gt;&lt;P&gt;    TRANSFER gs_output TO p_file LENGTH 1000.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;  CLOSE DATASET p_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it will help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;About SPAD, follow the below steps.&lt;/P&gt;&lt;P&gt;Goto SPAD-&amp;gt; Full Administartion-&amp;gt; Device Types-&amp;gt; Format Types-&amp;gt;&lt;/P&gt;&lt;P&gt;Check for the format X_65_1024/4.&lt;/P&gt;&lt;P&gt;This is the maximum allowed size format with 65 lines and 1024 charcters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If its there you can use it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or create a new format with 65 lines(20000 lines are allowed without page breaks) and 1024 columns(maximum allowed) Z_65_1024.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then copy the standard Device type to ZSAPWIN and attach the new format Z_65_1024.&lt;/P&gt;&lt;P&gt;Then copy the Output device LOCL to ZLOCL and assign device type ZSAPWIN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then while sheduling jobs in background you can use ZLOCL with the new fromat Z_65_1024.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR/Manas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Apr 2009 06:57:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/background-process/m-p/5398880#M1240533</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-08T06:57:53Z</dc:date>
    </item>
    <item>
      <title>Re: background process</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/background-process/m-p/5398881#M1240534</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;&lt;/P&gt;&lt;P&gt;You can use it as...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;wf_file which contain file name
 OPEN DATASET wf_file FOR INPUT IN TEXT MODE.

*  MSG:Error opening the file
  IF sy-subrc &amp;lt;&amp;gt; 0.
    CLEAR wf_reper.
    MESSAGE e999(/dceur/zais_msg) WITH text-t16.
  ENDIF.

  DO.
*  Reading the data from dataset.
    READ DATASET wf_file INTO wa_file.
    IF sy-subrc = 0.
      APPEND wa_file TO tb_data.
    ELSE.
      EXIT.
    ENDIF.
    CLEAR : wa_file.

  ENDDO.

  CLOSE DATASET wf_file.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Nitin Sikka on Apr 8, 2009 8:58 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Nitin Sikka on Apr 8, 2009 9:00 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Apr 2009 06:58:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/background-process/m-p/5398881#M1240534</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-08T06:58:40Z</dc:date>
    </item>
    <item>
      <title>Re: background process</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/background-process/m-p/5398882#M1240535</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;u need to save the data in application server  and use tcode CG3Y to save in presentaion server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1300356"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;~linganna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Apr 2009 07:10:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/background-process/m-p/5398882#M1240535</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-08T07:10:10Z</dc:date>
    </item>
    <item>
      <title>Re: background process</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/background-process/m-p/5398883#M1240536</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 wrote the same code with modification, still it is not working, i am sending the below modified code of my programe, pls go through this if any modification reqire inform me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you have the code with concatenate statement, pls send to me&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: p_file like rlgrap-filename.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;_file = 'c:\temp\data.xls'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  open dataset p_file for input in text mode encoding default.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  do.&lt;/P&gt;&lt;P&gt;  read dataset p_file into p_file.&lt;/P&gt;&lt;P&gt;  if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;    append p_file to itab.&lt;/P&gt;&lt;P&gt;  else.&lt;/P&gt;&lt;P&gt;    exit.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;  clear:p_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  enddo.&lt;/P&gt;&lt;P&gt;close dataset p_file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Apr 2009 10:50:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/background-process/m-p/5398883#M1240536</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-08T10:50:25Z</dc:date>
    </item>
    <item>
      <title>Re: background process</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/background-process/m-p/5398884#M1240537</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;And the first thing is that should first write it to the Application server&lt;/P&gt;&lt;P&gt;and should take the same file path in to work field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you are not using the same path.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The place where you are using &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read dataset p_file into p_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here you should take a work area of type internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then append the work area to internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check if it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regds&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Nitin Sikka on Apr 8, 2009 1:34 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Apr 2009 11:33:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/background-process/m-p/5398884#M1240537</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-08T11:33:49Z</dc:date>
    </item>
    <item>
      <title>Re: background process</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/background-process/m-p/5398885#M1240538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Balu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As mentioned by you earlier you wanted to download the connent of your internal table to excel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In that case the program would be &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you have the code with concatenate statement, pls send to me&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: p_file like rlgrap-filename.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;p_file = '\sapout\test.csv'.   " Should be on application directory path not local file&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;open dataset p_file for input in text mode encoding default.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at itab.&lt;/P&gt;&lt;P&gt;Transfer itab to p_file.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;close dataset p_file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Apr 2009 12:07:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/background-process/m-p/5398885#M1240538</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-08T12:07:02Z</dc:date>
    </item>
    <item>
      <title>Re: background process</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/background-process/m-p/5398886#M1240539</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;Use s-batch to confirm whether you are running the program in Background or foreground.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If fore ground then use the function module gui_download to download.&lt;/P&gt;&lt;P&gt;if back ground then use open dataset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Rajesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Apr 2009 12:52:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/background-process/m-p/5398886#M1240539</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-08T12:52:01Z</dc:date>
    </item>
  </channel>
</rss>

