<?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: Create spool for background jobs which uses submit statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-spool-for-background-jobs-which-uses-submit-statement/m-p/3607778#M869062</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi check this link ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Scheduling a submitable program as a background task with the number number in a background request name. After scheduling, the background task is completed by function module JOB_CLOSE and released immediately. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: number TYPE tbtcjob-jobcount, &lt;/P&gt;&lt;P&gt;      name TYPE tbtcjob-jobname VALUE 'JOB_TEST', &lt;/P&gt;&lt;P&gt;      print_parameters TYPE pri_params. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'JOB_OPEN' &lt;/P&gt;&lt;P&gt;  EXPORTING &lt;/P&gt;&lt;P&gt;    jobname          = name &lt;/P&gt;&lt;P&gt;  IMPORTING &lt;/P&gt;&lt;P&gt;    jobcount         = number &lt;/P&gt;&lt;P&gt;  EXCEPTIONS &lt;/P&gt;&lt;P&gt;    cant_create_job  = 1 &lt;/P&gt;&lt;P&gt;    invalid_job_data = 2 &lt;/P&gt;&lt;P&gt;    jobname_missing  = 3 &lt;/P&gt;&lt;P&gt;    OTHERS           = 4. &lt;/P&gt;&lt;P&gt;IF sy-subrc = 0. &lt;/P&gt;&lt;P&gt;  SUBMIT submitable TO SAP-SPOOL &lt;/P&gt;&lt;P&gt;                    SPOOL PARAMETERS print_parameters &lt;/P&gt;&lt;P&gt;                    WITHOUT SPOOL DYNPRO &lt;/P&gt;&lt;P&gt;                    VIA JOB name NUMBER number &lt;/P&gt;&lt;P&gt;                    AND RETURN. &lt;/P&gt;&lt;P&gt;  IF sy-subrc = 0. &lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'JOB_CLOSE' &lt;/P&gt;&lt;P&gt;      EXPORTING &lt;/P&gt;&lt;P&gt;        jobcount             = number &lt;/P&gt;&lt;P&gt;        jobname              = name &lt;/P&gt;&lt;P&gt;        strtimmed            = 'X' &lt;/P&gt;&lt;P&gt;      EXCEPTIONS &lt;/P&gt;&lt;P&gt;        cant_start_immediate = 1 &lt;/P&gt;&lt;P&gt;        invalid_startdate    = 2 &lt;/P&gt;&lt;P&gt;        jobname_missing      = 3 &lt;/P&gt;&lt;P&gt;        job_close_failed     = 4 &lt;/P&gt;&lt;P&gt;        job_nosteps          = 5 &lt;/P&gt;&lt;P&gt;        job_notex            = 6 &lt;/P&gt;&lt;P&gt;        lock_failed          = 7 &lt;/P&gt;&lt;P&gt;        OTHERS               = 8. &lt;/P&gt;&lt;P&gt;    IF sy-subrc &amp;lt;&amp;gt; 0. &lt;/P&gt;&lt;P&gt;      ... &lt;/P&gt;&lt;P&gt;    ENDIF. &lt;/P&gt;&lt;P&gt;  ENDIF. &lt;/P&gt;&lt;P&gt;ENDIF. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&amp;amp;query=background" target="test_blank"&gt;https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&amp;amp;query=background&lt;/A&gt;&lt;EM&gt;submit&lt;/EM&gt;&amp;amp;adv=false&amp;amp;sortby=cm_rnd_rankvalue&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sy-subrc  Meaning &lt;/P&gt;&lt;P&gt;0            Background task scheduled successfully. &lt;/P&gt;&lt;P&gt;4            Scheduling cancelled by user on the selection screen. &lt;/P&gt;&lt;P&gt;8            Error during scheduling, i.e. when accessing JOB_SUBMIT internally. &lt;/P&gt;&lt;P&gt;12          Error in internal number assignment. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;venkat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: venkat  appikonda on Mar 18, 2008 6:32 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Mar 2008 17:30:15 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-18T17:30:15Z</dc:date>
    <item>
      <title>Create spool for background jobs which uses submit statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-spool-for-background-jobs-which-uses-submit-statement/m-p/3607777#M869061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;             I have a quick question regarding the backgroud jobs. When we run a program in the background , it should create a spool for us, but, the problem comes when I am running a program in the background, its not creating the spool. This program uses SUBMIT statement. This program collects the data and it will submit to the other program and then retuen. In this case, its not creating a spool. Its very important for us to look at the spool for this program. Does anybody cam across this kind of problem? I need ur inputs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance, &lt;STRONG&gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Srinivas.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Mar 18, 2008 4:31 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2008 17:26:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-spool-for-background-jobs-which-uses-submit-statement/m-p/3607777#M869061</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-18T17:26:57Z</dc:date>
    </item>
    <item>
      <title>Re: Create spool for background jobs which uses submit statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-spool-for-background-jobs-which-uses-submit-statement/m-p/3607778#M869062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi check this link ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Scheduling a submitable program as a background task with the number number in a background request name. After scheduling, the background task is completed by function module JOB_CLOSE and released immediately. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: number TYPE tbtcjob-jobcount, &lt;/P&gt;&lt;P&gt;      name TYPE tbtcjob-jobname VALUE 'JOB_TEST', &lt;/P&gt;&lt;P&gt;      print_parameters TYPE pri_params. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'JOB_OPEN' &lt;/P&gt;&lt;P&gt;  EXPORTING &lt;/P&gt;&lt;P&gt;    jobname          = name &lt;/P&gt;&lt;P&gt;  IMPORTING &lt;/P&gt;&lt;P&gt;    jobcount         = number &lt;/P&gt;&lt;P&gt;  EXCEPTIONS &lt;/P&gt;&lt;P&gt;    cant_create_job  = 1 &lt;/P&gt;&lt;P&gt;    invalid_job_data = 2 &lt;/P&gt;&lt;P&gt;    jobname_missing  = 3 &lt;/P&gt;&lt;P&gt;    OTHERS           = 4. &lt;/P&gt;&lt;P&gt;IF sy-subrc = 0. &lt;/P&gt;&lt;P&gt;  SUBMIT submitable TO SAP-SPOOL &lt;/P&gt;&lt;P&gt;                    SPOOL PARAMETERS print_parameters &lt;/P&gt;&lt;P&gt;                    WITHOUT SPOOL DYNPRO &lt;/P&gt;&lt;P&gt;                    VIA JOB name NUMBER number &lt;/P&gt;&lt;P&gt;                    AND RETURN. &lt;/P&gt;&lt;P&gt;  IF sy-subrc = 0. &lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'JOB_CLOSE' &lt;/P&gt;&lt;P&gt;      EXPORTING &lt;/P&gt;&lt;P&gt;        jobcount             = number &lt;/P&gt;&lt;P&gt;        jobname              = name &lt;/P&gt;&lt;P&gt;        strtimmed            = 'X' &lt;/P&gt;&lt;P&gt;      EXCEPTIONS &lt;/P&gt;&lt;P&gt;        cant_start_immediate = 1 &lt;/P&gt;&lt;P&gt;        invalid_startdate    = 2 &lt;/P&gt;&lt;P&gt;        jobname_missing      = 3 &lt;/P&gt;&lt;P&gt;        job_close_failed     = 4 &lt;/P&gt;&lt;P&gt;        job_nosteps          = 5 &lt;/P&gt;&lt;P&gt;        job_notex            = 6 &lt;/P&gt;&lt;P&gt;        lock_failed          = 7 &lt;/P&gt;&lt;P&gt;        OTHERS               = 8. &lt;/P&gt;&lt;P&gt;    IF sy-subrc &amp;lt;&amp;gt; 0. &lt;/P&gt;&lt;P&gt;      ... &lt;/P&gt;&lt;P&gt;    ENDIF. &lt;/P&gt;&lt;P&gt;  ENDIF. &lt;/P&gt;&lt;P&gt;ENDIF. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&amp;amp;query=background" target="test_blank"&gt;https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&amp;amp;query=background&lt;/A&gt;&lt;EM&gt;submit&lt;/EM&gt;&amp;amp;adv=false&amp;amp;sortby=cm_rnd_rankvalue&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sy-subrc  Meaning &lt;/P&gt;&lt;P&gt;0            Background task scheduled successfully. &lt;/P&gt;&lt;P&gt;4            Scheduling cancelled by user on the selection screen. &lt;/P&gt;&lt;P&gt;8            Error during scheduling, i.e. when accessing JOB_SUBMIT internally. &lt;/P&gt;&lt;P&gt;12          Error in internal number assignment. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;venkat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: venkat  appikonda on Mar 18, 2008 6:32 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2008 17:30:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-spool-for-background-jobs-which-uses-submit-statement/m-p/3607778#M869062</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-18T17:30:15Z</dc:date>
    </item>
    <item>
      <title>Re: Create spool for background jobs which uses submit statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-spool-for-background-jobs-which-uses-submit-statement/m-p/3607779#M869063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try replacing that submit statement with the submit statement having TO SAP-SPOOL spool_options .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once that spool is generated you can track it from table tsp01.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;G@urav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2008 17:40:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-spool-for-background-jobs-which-uses-submit-statement/m-p/3607779#M869063</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-18T17:40:36Z</dc:date>
    </item>
    <item>
      <title>Re: Create spool for background jobs which uses submit statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-spool-for-background-jobs-which-uses-submit-statement/m-p/3607780#M869064</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; Thanks for ur quick reply. Do I need to write these job_open, submit and job_close in my program? Actually in my system, there is a job stream.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fo example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jobstream 1:&lt;/P&gt;&lt;P&gt;Job 1 - This has the program with the submit statement.&lt;/P&gt;&lt;P&gt;job 2 - will read the file from job 1's output.&lt;/P&gt;&lt;P&gt;job 3 - &lt;/P&gt;&lt;P&gt;job 4 -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above jobs are already set up in the system and it runs every day at scheduled time and we need the spool from job1 to see which documents are processed. The main program to which we are submitting from our program will have this information in the output screen. when I ran my program in the foreground, I can see the output, but only the problem is when I am running in the background.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please let me know this. Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Srinivas.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: srinivas kari on Mar 18, 2008 6:50 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2008 17:48:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-spool-for-background-jobs-which-uses-submit-statement/m-p/3607780#M869064</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-18T17:48:46Z</dc:date>
    </item>
    <item>
      <title>Re: Create spool for background jobs which uses submit statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-spool-for-background-jobs-which-uses-submit-statement/m-p/3607781#M869065</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;did ur using the alvs if yes then please donot wrote the write statements ...it may cause the error..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check these links..&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="741729"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;venkat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2008 17:58:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-spool-for-background-jobs-which-uses-submit-statement/m-p/3607781#M869065</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-18T17:58:03Z</dc:date>
    </item>
    <item>
      <title>Re: Create spool for background jobs which uses submit statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-spool-for-background-jobs-which-uses-submit-statement/m-p/3607782#M869066</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;We do not have the ALVs and its plain output screen with the wrte statements and the jobs are already been set up and they will run at the scheduled intervals. Do I need to write the above statements in my program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Srinivas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2008 18:03:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-spool-for-background-jobs-which-uses-submit-statement/m-p/3607782#M869066</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-18T18:03:02Z</dc:date>
    </item>
    <item>
      <title>Re: Create spool for background jobs which uses submit statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-spool-for-background-jobs-which-uses-submit-statement/m-p/3607783#M869067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The issue is resolved. We used the "Exporting list to memory" in the submit statement and then we read this list and it worked for us.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help guys.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Apr 2008 15:50:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-spool-for-background-jobs-which-uses-submit-statement/m-p/3607783#M869067</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-30T15:50:35Z</dc:date>
    </item>
  </channel>
</rss>

