<?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: Auto-working programs in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/auto-working-programs/m-p/2947889#M694965</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi viji,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not clear with Monitor Job Status, sm37, and the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What does this code segment: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
if syst-subrc = 0.
*submit job with all the selection screen params...
submit (lv_job_name)
with applfile = applfile
with p_lines = p_lines
with rfc_dest = rfcdest
with p_selmtd = lv_selmtd
with px_shsim = px_shsim
with px_sherr = px_sherr
user syst-uname
via job lv_job_name number lv_job_nr and return.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Oct 2007 06:56:39 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-15T06:56:39Z</dc:date>
    <item>
      <title>Auto-working programs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/auto-working-programs/m-p/2947885#M694961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good morning all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to make some abap programs worked at a time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I do that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2007 06:46:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/auto-working-programs/m-p/2947885#M694961</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-15T06:46:05Z</dc:date>
    </item>
    <item>
      <title>Re: Auto-working programs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/auto-working-programs/m-p/2947886#M694962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Schedule the jobs for those respective programs in SM36 to work at at time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Gopi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2007 06:47:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/auto-working-programs/m-p/2947886#M694962</guid>
      <dc:creator>gopi_narendra</dc:creator>
      <dc:date>2007-10-15T06:47:37Z</dc:date>
    </item>
    <item>
      <title>Re: Auto-working programs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/auto-working-programs/m-p/2947887#M694963</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;&amp;lt;b&amp;gt;Go for background scheduled jobs.&amp;lt;/b&amp;gt;&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;Sree&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2007 06:48:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/auto-working-programs/m-p/2947887#M694963</guid>
      <dc:creator>sreeramkumar_madisetty</dc:creator>
      <dc:date>2007-10-15T06:48:05Z</dc:date>
    </item>
    <item>
      <title>Re: Auto-working programs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/auto-working-programs/m-p/2947888#M694964</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;Method 1: in SE38&lt;/P&gt;&lt;P&gt;type your program name&lt;/P&gt;&lt;P&gt;choose Program -&amp;gt; Execute -&amp;gt; Background&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Method 2: in SM36&lt;/P&gt;&lt;P&gt;Create a job with your program name&lt;/P&gt;&lt;P&gt;it will run in bg &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We can Run an ABAP Program in Background but only Executable program i.e Report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Tcode SE38.&lt;/P&gt;&lt;P&gt;Create the Variant with Required selection criteria.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Tcode SM36&lt;/P&gt;&lt;P&gt;Create a Background Job &lt;/P&gt;&lt;P&gt;Create a Step and Assign the Report and Variant.&lt;/P&gt;&lt;P&gt;Set the Start Condition (Date &amp;amp; Time )&lt;/P&gt;&lt;P&gt;Save the Job.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Monitor the jOB Status in Tcode SM37&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is how to do it through code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: lv_job_name like tbtco-jobname,&lt;/P&gt;&lt;P&gt;lv_job_nr like tbtco-jobcount,&lt;/P&gt;&lt;P&gt;lv_job_released type c,&lt;/P&gt;&lt;P&gt;lv_job_start_sofort type c,&lt;/P&gt;&lt;P&gt;lv_print_parameters type pri_params.&lt;/P&gt;&lt;P&gt;lv_job_name = 'Z_test'. " your background program name&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 = lv_job_name&lt;/P&gt;&lt;P&gt;importing&lt;/P&gt;&lt;P&gt;jobcount = lv_job_nr&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 syst-subrc = 0.&lt;/P&gt;&lt;P&gt;*submit job with all the selection screen params...&lt;/P&gt;&lt;P&gt;submit (lv_job_name)&lt;/P&gt;&lt;P&gt;with applfile = applfile&lt;/P&gt;&lt;P&gt;with p_lines = p_lines&lt;/P&gt;&lt;P&gt;with rfc_dest = rfcdest&lt;/P&gt;&lt;P&gt;with p_selmtd = lv_selmtd&lt;/P&gt;&lt;P&gt;with px_shsim = px_shsim&lt;/P&gt;&lt;P&gt;with px_sherr = px_sherr&lt;/P&gt;&lt;P&gt;user syst-uname&lt;/P&gt;&lt;P&gt;via job lv_job_name number lv_job_nr 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 = lv_job_nr&lt;/P&gt;&lt;P&gt;jobname = lv_job_name&lt;/P&gt;&lt;P&gt;strtimmed = 'X'&lt;/P&gt;&lt;P&gt;importing&lt;/P&gt;&lt;P&gt;job_was_released = lv_job_released&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 syst-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;message i162(00) with&lt;/P&gt;&lt;P&gt;'An error occured while closing the background job.'.&lt;/P&gt;&lt;P&gt;stop.&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;skip 1.&lt;/P&gt;&lt;P&gt;write: / 'Background process', lv_job_name ,&lt;/P&gt;&lt;P&gt;'called successfully' no-gap.&lt;/P&gt;&lt;P&gt;write: / 'You can check the job in transaction SM37'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Reward If Helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2007 06:48:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/auto-working-programs/m-p/2947888#M694964</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-15T06:48:07Z</dc:date>
    </item>
    <item>
      <title>Re: Auto-working programs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/auto-working-programs/m-p/2947889#M694965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi viji,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not clear with Monitor Job Status, sm37, and the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What does this code segment: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
if syst-subrc = 0.
*submit job with all the selection screen params...
submit (lv_job_name)
with applfile = applfile
with p_lines = p_lines
with rfc_dest = rfcdest
with p_selmtd = lv_selmtd
with px_shsim = px_shsim
with px_sherr = px_sherr
user syst-uname
via job lv_job_name number lv_job_nr and return.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2007 06:56:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/auto-working-programs/m-p/2947889#M694965</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-15T06:56:39Z</dc:date>
    </item>
    <item>
      <title>Re: Auto-working programs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/auto-working-programs/m-p/2947890#M694966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your replies:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is monitoring job status.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.Deniz.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2007 07:10:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/auto-working-programs/m-p/2947890#M694966</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-15T07:10:38Z</dc:date>
    </item>
    <item>
      <title>Re: Auto-working programs</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/auto-working-programs/m-p/2947891#M694967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jobs are created using the transaction SM36. But if you wnt to know the status of the jobs created by SM36, you can monitor the job status using the transaction SM37. &lt;/P&gt;&lt;P&gt;Monitor job status is to going thru the status of the job, whether if it is released, finished, cancelled etc...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For ex just create a job in SM36 and See SM37, you can come to know it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Gopi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2007 07:37:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/auto-working-programs/m-p/2947891#M694967</guid>
      <dc:creator>gopi_narendra</dc:creator>
      <dc:date>2007-10-15T07:37:39Z</dc:date>
    </item>
  </channel>
</rss>

