<?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 How program run in background processing in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-program-run-in-background-processing/m-p/2938901#M692754</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, exparts&lt;/P&gt;&lt;P&gt;         How program run in background processing ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Oct 2007 04:10:34 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-15T04:10:34Z</dc:date>
    <item>
      <title>How program run in background processing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-program-run-in-background-processing/m-p/2938901#M692754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, exparts&lt;/P&gt;&lt;P&gt;         How program run in background processing ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2007 04:10:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-program-run-in-background-processing/m-p/2938901#M692754</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-15T04:10:34Z</dc:date>
    </item>
    <item>
      <title>Re: How program run in background processing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-program-run-in-background-processing/m-p/2938902#M692755</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;Check this thread, it will surely help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.sdn.sap.com/click.jspa?searchID=5273985&amp;amp;messageID=3151612" target="test_blank"&gt;https://forums.sdn.sap.com/click.jspa?searchID=5273985&amp;amp;messageID=3151612&lt;/A&gt;&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 04:16:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-program-run-in-background-processing/m-p/2938902#M692755</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-15T04:16:10Z</dc:date>
    </item>
    <item>
      <title>Re: How program run in background processing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-program-run-in-background-processing/m-p/2938903#M692756</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;To run a program (Report) in Background you have to create a Background job in SM36.&lt;/P&gt;&lt;P&gt;You can monitor the Status of this job in Tcode SM37.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Goto Tcode SM36.&lt;/P&gt;&lt;P&gt;Create a Job.&lt;/P&gt;&lt;P&gt;Create the Step and assign the Report name and Variant (selection screen).&lt;/P&gt;&lt;P&gt;Assign the Start condition . Eg Date &amp;amp; Time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Save the Job. so that it will be released.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can monitor the Status of this job in Tcode SM37.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward if Helpful.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2007 04:18:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-program-run-in-background-processing/m-p/2938903#M692756</guid>
      <dc:creator>varma_narayana</dc:creator>
      <dc:date>2007-10-15T04:18:32Z</dc:date>
    </item>
    <item>
      <title>Re: How program run in background processing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-program-run-in-background-processing/m-p/2938904#M692757</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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2007 04:36:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-program-run-in-background-processing/m-p/2938904#M692757</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-15T04:36:02Z</dc:date>
    </item>
  </channel>
</rss>

