<?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 How to Return control from Background processing? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-return-control-from-background-processing/m-p/4140132#M989969</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have got one requirement to automatically save the Spool request generated in sp01 as a local file. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually i have generated one report, a few days back. In that report, if the user clicks on the button ( Execute in Background) in the Menu bar, my program needs to be navigated to the transaction SP01 and the recently generated spool request should be saved as a local file automatically....I need to use BDC on the transaction SP01.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But i don't know where to write the necessary code. Because i have debugged the program by clicking 'Execute in Background'. After 'AT SELECTION SCREEN' event, the control is transferred to Background processing and finally it is giving a message that 'Background job was scheduled for the program' and returning to the selection screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After the job was scheduled, i need to write the BDC code for saving the spool request as a local file. Please suggest me the the place where i have to write the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any helpful answer will surely be rewarded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Pavan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 Jul 2008 04:15:55 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-07-18T04:15:55Z</dc:date>
    <item>
      <title>How to Return control from Background processing?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-return-control-from-background-processing/m-p/4140132#M989969</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have got one requirement to automatically save the Spool request generated in sp01 as a local file. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually i have generated one report, a few days back. In that report, if the user clicks on the button ( Execute in Background) in the Menu bar, my program needs to be navigated to the transaction SP01 and the recently generated spool request should be saved as a local file automatically....I need to use BDC on the transaction SP01.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But i don't know where to write the necessary code. Because i have debugged the program by clicking 'Execute in Background'. After 'AT SELECTION SCREEN' event, the control is transferred to Background processing and finally it is giving a message that 'Background job was scheduled for the program' and returning to the selection screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After the job was scheduled, i need to write the BDC code for saving the spool request as a local file. Please suggest me the the place where i have to write the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any helpful answer will surely be rewarded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Pavan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jul 2008 04:15:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-return-control-from-background-processing/m-p/4140132#M989969</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-18T04:15:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to Return control from Background processing?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-return-control-from-background-processing/m-p/4140133#M989970</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;       If you RUN the program in Background mode you can not &lt;/P&gt;&lt;P&gt;generate the file to presantation sever. It possiable to generate&lt;/P&gt;&lt;P&gt; the file to application sever.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use this FM &lt;STRONG&gt;DX_FILE_WRITE&lt;/STRONG&gt; to create file to application server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Durai.V&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jul 2008 04:57:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-return-control-from-background-processing/m-p/4140133#M989970</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-18T04:57:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to Return control from Background processing?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-return-control-from-background-processing/m-p/4140134#M989971</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Durai,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for ur prompt response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U r saying that in B/G processsing, we cannot write to the presentation server....ok...But they want me to do the same...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to go to SP01 and get the recent spool request number and then i need to use the option 'Save as a Local file'. So i need to use BDC on SP01.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know how to get the spool request number, how to do BDC and all....But i m not getting where to write the code....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After i clicked on 'Execute in B/G' it is directly giving a msg that 'B/G job was scheduled'. After that, i need to the do the BDC. But the control is not coming back to my program, even in debugging mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't even know when the Performs for retrieving data are getting executed. I tried by placing Break points in STRT-OF-SELECTION. But the control is not coming there....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want the exact location to write the code.....I hope u got my requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me.&lt;/P&gt;&lt;P&gt;Pavan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jul 2008 05:47:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-return-control-from-background-processing/m-p/4140134#M989971</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-18T05:47:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to Return control from Background processing?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-return-control-from-background-processing/m-p/4140135#M989972</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;  DATA : lt_rdiresult LIKE  rdiresult.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'CLOSE_FORM'&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      RESULT                   = st_result1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After Closing form U get Spool number from &lt;/P&gt;&lt;P&gt; &lt;STRONG&gt;st_result1-tdspoolid&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U write the code after colsing form. But it will work in Forground only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF u want to Exctue in Background only u can gownload file to application sever only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If u schedule to background the program goes to out of the GUI contol ( Only excute in application server) so u cant debug &amp;amp; file create in presensation server.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;If download file from application server  Use t-code CG3Y. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Durai.V&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jul 2008 13:42:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-return-control-from-background-processing/m-p/4140135#M989972</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-18T13:42:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to Return control from Background processing?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-return-control-from-background-processing/m-p/4140136#M989973</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Execute your program with SUBMIT xxxxx exporting List to memory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can then import the list in another program (or from the calling program) --the list is stored in a table of type abaplist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can then manipulate this table -- note it's in  RAW format so you'll need the function modules to convert it to a list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This approach works both in Foreground and as a background process as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can't remember the function modules off hand but there's enough of them to handle this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just press the HELP / F1 key in the abap editor on the SUBMIT command and look for the exporting list to memory option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;jimbo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: james hawthorne on Jul 18, 2008 5:49 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jul 2008 15:48:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-return-control-from-background-processing/m-p/4140136#M989973</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-18T15:48:20Z</dc:date>
    </item>
  </channel>
</rss>

