<?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: Back ground processing in Reports in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/back-ground-processing-in-reports/m-p/3050660#M722243</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;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, 03 Dec 2007 07:34:45 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-12-03T07:34:45Z</dc:date>
    <item>
      <title>Back ground processing in Reports</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/back-ground-processing-in-reports/m-p/3050659#M722242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to prepare a report, it contains Selection Screen. This report  has to run in both foreground and in background. There is no option provided in selection &lt;/P&gt;&lt;P&gt;screen to ideentify whether it runs in Foreground or in Background. In report I need to provide logic so that the report has to run in background if it set for background processing.&lt;/P&gt;&lt;P&gt;How to write logic for this. can anybody suggest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naseer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Dec 2007 07:32:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/back-ground-processing-in-reports/m-p/3050659#M722242</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-03T07:32:12Z</dc:date>
    </item>
    <item>
      <title>Re: Back ground processing in Reports</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/back-ground-processing-in-reports/m-p/3050660#M722243</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;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, 03 Dec 2007 07:34:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/back-ground-processing-in-reports/m-p/3050660#M722243</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-03T07:34:45Z</dc:date>
    </item>
  </channel>
</rss>

