<?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: SUBMIT program and spool number in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-program-and-spool-number/m-p/2014014#M411412</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Vishnu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just use &amp;lt;b&amp;gt;sy-spono&amp;lt;/b&amp;gt; anywhr after your first Write statement.It will give you the spool number generated by the system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can get the spool number from the table &amp;lt;b&amp;gt;TSP01&amp;lt;/b&amp;gt; also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Jothi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*let me know the outcome.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Mar 2007 01:47:50 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-03-20T01:47:50Z</dc:date>
    <item>
      <title>SUBMIT program and spool number</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-program-and-spool-number/m-p/2014013#M411411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How to get a spool number (SY-SPONO or any other number) of the list created by a SUBMIT command, when using &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUBMIT.. TO SAP-SPOOL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also note that the SUBMIT is executed with in a batch / background job&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Helpful answers will be definitely rewarded&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Mar 2007 01:18:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-program-and-spool-number/m-p/2014013#M411411</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-20T01:18:20Z</dc:date>
    </item>
    <item>
      <title>Re: SUBMIT program and spool number</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-program-and-spool-number/m-p/2014014#M411412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Vishnu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just use &amp;lt;b&amp;gt;sy-spono&amp;lt;/b&amp;gt; anywhr after your first Write statement.It will give you the spool number generated by the system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can get the spool number from the table &amp;lt;b&amp;gt;TSP01&amp;lt;/b&amp;gt; also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Jothi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*let me know the outcome.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Mar 2007 01:47:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-program-and-spool-number/m-p/2014014#M411412</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-20T01:47:50Z</dc:date>
    </item>
    <item>
      <title>Re: SUBMIT program and spool number</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-program-and-spool-number/m-p/2014015#M411413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried using SY-SPONO, the problem is SY-SPONO is not set after the SUBMIT command both in foreground and background modes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to access the spool created by a SUBMIT command in the calling program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think, I have found out a way to do this, will have to test.. but if there is any better way... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  submit (p_repid) to sap-spool without spool dynpro
                   spool parameters mstr_print_parms
                   via selection-screen
                   and return.
*-- Find out what the spool number is that was just created
  perform get_spool_number using sy-repid
             sy-uname
    changing mi_rqident.



  form get_spool_number using f_repid
     f_uname
                changing f_rqident.
  data:
    lc_rq2name like tsp01-rq2name.
  concatenate f_repid+0(8)
              f_uname+0(3)
    into lc_rq2name separated by '_'.
  select * from tsp01 where  rq2name = lc_rq2name
  order by rqcretime descending.
    f_rqident = tsp01-rqident.
    exit.
  endselect.
  if sy-subrc ne 0.
    clear f_rqident.
  endif.
endform." get_spool_number&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;a href="http://abap4.tripod.com/Save_Report_Output_to_a_PDF_File.html"&amp;gt;Credits&amp;lt;/a&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Mar 2007 01:53:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-program-and-spool-number/m-p/2014015#M411413</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-20T01:53:45Z</dc:date>
    </item>
    <item>
      <title>Re: SUBMIT program and spool number</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-program-and-spool-number/m-p/2014016#M411414</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hope u r on right track and it will work.&lt;/P&gt;&lt;P&gt;We have either to use sy-spono or tsp01 table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Im also using the same logic and it works fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Jothi.P&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Mar 2007 02:01:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-program-and-spool-number/m-p/2014016#M411414</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-20T02:01:08Z</dc:date>
    </item>
  </channel>
</rss>

