<?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: Generate Spool from internal table while running in background?? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/generate-spool-from-internal-table-while-running-in-background/m-p/2073375#M429609</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rahul,&lt;/P&gt;&lt;P&gt;to generate spool, use below code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM create_spool .&lt;/P&gt;&lt;P&gt;  CONSTANTS : l_c_device(4)    VALUE 'LOCL'.&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;  Create Spool Request&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;  NEW-PAGE PRINT ON&lt;/P&gt;&lt;P&gt;  LINE-SIZE 120&lt;/P&gt;&lt;P&gt;  DESTINATION l_c_device&lt;/P&gt;&lt;P&gt;  IMMEDIATELY ' '&lt;/P&gt;&lt;P&gt;  KEEP IN SPOOL 'X'&lt;/P&gt;&lt;P&gt;  NEW LIST IDENTIFICATION 'X'&lt;/P&gt;&lt;P&gt;  NO DIALOG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " create_spool&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And after createing spool to get the spool number use below code,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM obtain_spool_id .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  TYPES : BEGIN OF t_tsp01,&lt;/P&gt;&lt;P&gt;          rqident TYPE tsp01-rqident,&lt;/P&gt;&lt;P&gt;          rqowner TYPE tsp01-rqowner,&lt;/P&gt;&lt;P&gt;          END OF t_tsp01.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA : it_tsp01 TYPE STANDARD TABLE OF t_tsp01,&lt;/P&gt;&lt;P&gt;         wa_tsp01 LIKE LINE OF it_tsp01.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT rqident&lt;/P&gt;&lt;P&gt;         rqowner&lt;/P&gt;&lt;P&gt;         FROM tsp01&lt;/P&gt;&lt;P&gt;         INTO TABLE it_tsp01&lt;/P&gt;&lt;P&gt;         WHERE rqowner = sy-uname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SORT it_tsp01 BY rqident DESCENDING.&lt;/P&gt;&lt;P&gt;  READ TABLE it_tsp01 INTO wa_tsp01 INDEX 1.&lt;/P&gt;&lt;P&gt;  IF sy-subrc = 0 .&lt;/P&gt;&lt;P&gt;    v_spool_nr  = wa_tsp01-rqident.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Capture the immediate spool created for this report&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; v_spool_nr = sy-spono.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " obtain_spool_id&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chandra&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(award points if helpful)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 23 Mar 2007 05:14:06 GMT</pubDate>
    <dc:creator>ChandrashekharMahajan</dc:creator>
    <dc:date>2007-03-23T05:14:06Z</dc:date>
    <item>
      <title>Generate Spool from internal table while running in background??</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generate-spool-from-internal-table-while-running-in-background/m-p/2073373#M429607</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 have a requirement such that i have to generate an excel sheet when the program is run in foreground (data is fetched from an internal table). That i have managed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now when the program is run in background, then i have to generate a spool for this(by checking sy-batch) as in background mode excel sheet can be donwloaded (in presentation).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please tell me how can i generate a spool request from the internal table and also how to get the name of that spool request, which is gerenated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;P&gt;Rahul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Mar 2007 04:58:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generate-spool-from-internal-table-while-running-in-background/m-p/2073373#M429607</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-23T04:58:45Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Spool from internal table while running in background??</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generate-spool-from-internal-table-while-running-in-background/m-p/2073374#M429608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;When you schedule a report in Background Job with some WRITE statements,automatically it generates a spool.&lt;/P&gt;&lt;P&gt;Go to SP01 and find that related spool and download it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Mar 2007 05:10:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generate-spool-from-internal-table-while-running-in-background/m-p/2073374#M429608</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-23T05:10:02Z</dc:date>
    </item>
    <item>
      <title>Re: Generate Spool from internal table while running in background??</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generate-spool-from-internal-table-while-running-in-background/m-p/2073375#M429609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rahul,&lt;/P&gt;&lt;P&gt;to generate spool, use below code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM create_spool .&lt;/P&gt;&lt;P&gt;  CONSTANTS : l_c_device(4)    VALUE 'LOCL'.&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;  Create Spool Request&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;  NEW-PAGE PRINT ON&lt;/P&gt;&lt;P&gt;  LINE-SIZE 120&lt;/P&gt;&lt;P&gt;  DESTINATION l_c_device&lt;/P&gt;&lt;P&gt;  IMMEDIATELY ' '&lt;/P&gt;&lt;P&gt;  KEEP IN SPOOL 'X'&lt;/P&gt;&lt;P&gt;  NEW LIST IDENTIFICATION 'X'&lt;/P&gt;&lt;P&gt;  NO DIALOG.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " create_spool&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And after createing spool to get the spool number use below code,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM obtain_spool_id .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  TYPES : BEGIN OF t_tsp01,&lt;/P&gt;&lt;P&gt;          rqident TYPE tsp01-rqident,&lt;/P&gt;&lt;P&gt;          rqowner TYPE tsp01-rqowner,&lt;/P&gt;&lt;P&gt;          END OF t_tsp01.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA : it_tsp01 TYPE STANDARD TABLE OF t_tsp01,&lt;/P&gt;&lt;P&gt;         wa_tsp01 LIKE LINE OF it_tsp01.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT rqident&lt;/P&gt;&lt;P&gt;         rqowner&lt;/P&gt;&lt;P&gt;         FROM tsp01&lt;/P&gt;&lt;P&gt;         INTO TABLE it_tsp01&lt;/P&gt;&lt;P&gt;         WHERE rqowner = sy-uname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SORT it_tsp01 BY rqident DESCENDING.&lt;/P&gt;&lt;P&gt;  READ TABLE it_tsp01 INTO wa_tsp01 INDEX 1.&lt;/P&gt;&lt;P&gt;  IF sy-subrc = 0 .&lt;/P&gt;&lt;P&gt;    v_spool_nr  = wa_tsp01-rqident.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Capture the immediate spool created for this report&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; v_spool_nr = sy-spono.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " obtain_spool_id&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chandra&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(award points if helpful)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Mar 2007 05:14:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generate-spool-from-internal-table-while-running-in-background/m-p/2073375#M429609</guid>
      <dc:creator>ChandrashekharMahajan</dc:creator>
      <dc:date>2007-03-23T05:14:06Z</dc:date>
    </item>
  </channel>
</rss>

