<?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: Get spool number using Job_Submit in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-spool-number-using-job-submit/m-p/3615058#M870894</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not too sure on your requirements, so to answer the question is rather difficult.  I suppose you could export spool numbers to memory and then import or use similar methods etc.  I afraid don't have a clear-cut method besides the use of the JOB_OPEN/JOB_CLOSE approach.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a look at this thread as it will give you some other approaches...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="5985856"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Richard.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 30 Nov 2010 15:52:45 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-11-30T15:52:45Z</dc:date>
    <item>
      <title>Get spool number using Job_Submit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-spool-number-using-job-submit/m-p/3615053#M870889</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 am calling Job_Submit inside a loop.Job_Submit executes a prg which creates 2- or more spools,thus inside a loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Job_Close for the corresponding job is outside the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it poss to get the spool number(s) generated as a result of job execution inside the loop i.e. after Job_Submit and before job_Close.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suppose spool number is generated after Job_Close.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please assist!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Answers will be rewarded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Rohan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2008 09:22:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-spool-number-using-job-submit/m-p/3615053#M870889</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-20T09:22:21Z</dc:date>
    </item>
    <item>
      <title>Re: Get spool number using Job_Submit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-spool-number-using-job-submit/m-p/3615054#M870890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes it is possible to get the spool number before JOB_CLOSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;make use of below code snippet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  1) SELECT MAX( RQIDENT ) INTO G_SPOOL_NUM&lt;/P&gt;&lt;P&gt;                        FROM TSP01&lt;/P&gt;&lt;P&gt;                        WHERE RQCLIENT = SY-MANDT AND&lt;/P&gt;&lt;P&gt;                        RQOWNER = SY-UNAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or else u can make use of system variable..........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) SY-SPONO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if useful.....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2008 09:26:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-spool-number-using-job-submit/m-p/3615054#M870890</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-20T09:26:28Z</dc:date>
    </item>
    <item>
      <title>Re: Get spool number using Job_Submit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-spool-number-using-job-submit/m-p/3615055#M870891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;2) SY-SPONO.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's not working, it's empty&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Spool number is stored on that system var (sy-spono) but it's cleared before going out of the submit so there's no data on it after.&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;John&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: John Smith on Nov 30, 2010 3:31 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: John Smith on Nov 30, 2010 3:43 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Nov 2010 14:31:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-spool-number-using-job-submit/m-p/3615055#M870891</guid>
      <dc:creator>marcelogb</dc:creator>
      <dc:date>2010-11-30T14:31:29Z</dc:date>
    </item>
    <item>
      <title>Re: Get spool number using Job_Submit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-spool-number-using-job-submit/m-p/3615056#M870892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are submitting the job, you will have the job name and the job number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Within a DO-ENDDO use the function module 'BDL_READ_JOB_STATUS' passing it job name and job number (I believe the spool numbers are only assigned once the job is complete but I could be wrong here).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the job status returned from 'BDL_READ_JOB_STATUS' = 'F' then the job is finished and exit the DO-ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select the SPOOLID from table TBTC_SPOOLID based on your job name and job number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should return all the spools you require.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Richard.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Richvdl on Nov 30, 2010 3:49 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Nov 2010 14:48:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-spool-number-using-job-submit/m-p/3615056#M870892</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-11-30T14:48:23Z</dc:date>
    </item>
    <item>
      <title>Re: Get spool number using Job_Submit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-spool-number-using-job-submit/m-p/3615057#M870893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using the job number would be a great idea since you can differ them clearly between different executions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, what if you use just the submit without being in a job?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards,&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Nov 2010 14:52:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-spool-number-using-job-submit/m-p/3615057#M870893</guid>
      <dc:creator>marcelogb</dc:creator>
      <dc:date>2010-11-30T14:52:31Z</dc:date>
    </item>
    <item>
      <title>Re: Get spool number using Job_Submit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-spool-number-using-job-submit/m-p/3615058#M870894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not too sure on your requirements, so to answer the question is rather difficult.  I suppose you could export spool numbers to memory and then import or use similar methods etc.  I afraid don't have a clear-cut method besides the use of the JOB_OPEN/JOB_CLOSE approach.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a look at this thread as it will give you some other approaches...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="5985856"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Richard.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Nov 2010 15:52:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-spool-number-using-job-submit/m-p/3615058#M870894</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-11-30T15:52:45Z</dc:date>
    </item>
  </channel>
</rss>

