<?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: Background run in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/background-run/m-p/3009492#M711151</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you mean the progam or the batch input session that it creates?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Nov 2007 03:43:14 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-11-15T03:43:14Z</dc:date>
    <item>
      <title>Background run</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/background-run/m-p/3009489#M711148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am working on an interface and I have developed my object completely and now I have been asked by my team lead to make sure that this program runs in background, so can you please guide me through how can I take care of this. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Rajeev&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Nov 2007 22:00:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/background-run/m-p/3009489#M711148</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-14T22:00:05Z</dc:date>
    </item>
    <item>
      <title>Re: Background run</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/background-run/m-p/3009490#M711149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can make a small program which can submit this program via jobname and jobcount to run it in background...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have use like:&lt;/P&gt;&lt;P&gt;FM JOB_OPEN&lt;/P&gt;&lt;P&gt;SUBMIT Z_REP&lt;/P&gt;&lt;P&gt;FM JOB_CLOSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This code can help you:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  DATA: w_job_name       TYPE btcjob,
        w_job_nr         TYPE btcjobcnt.

start-of-selection.

w_job_name = 'ZTEST_NP'.

CALL FUNCTION 'JOB_OPEN'
  EXPORTING
*   DELANFREP              = ' '
*   JOBGROUP               = ' '
    JOBNAME                = w_job_name
*   SDLSTRTDT              = NO_DATE
*   SDLSTRTTM              = NO_TIME
*   JOBCLASS               =
 IMPORTING
   JOBCOUNT               = w_job_nr
* CHANGING
*   RET                    =
* EXCEPTIONS
*   CANT_CREATE_JOB        = 1
*   INVALID_JOB_DATA       = 2
*   JOBNAME_MISSING        = 3
*   OTHERS                 = 4
          .
IF SY-SUBRC &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

submit ztest_np1 and return
     USER sy-uname
     VIA JOB w_job_name NUMBER w_job_nr.

  CALL FUNCTION 'JOB_CLOSE'
    EXPORTING
      jobcount             = w_job_nr
      jobname              = w_job_name
*      strtimmed            = co_marked
    EXCEPTIONS
      cant_start_immediate = 1
      invalid_startdate    = 2
      jobname_missing      = 3
      job_close_failed     = 4
      job_nosteps          = 5
      job_notex            = 6
      lock_failed          = 7
      invalid_target       = 8
      OTHERS               = 9.
  IF sy-subrc &amp;lt;&amp;gt; 0.
*   Internal error
  write: 'error'.
  ENDIF.
*&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Nov 2007 22:05:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/background-run/m-p/3009490#M711149</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2007-11-14T22:05:16Z</dc:date>
    </item>
    <item>
      <title>Re: Background run</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/background-run/m-p/3009491#M711150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To Schedule a background job:&lt;/P&gt;&lt;P&gt;Run SM36&lt;/P&gt;&lt;P&gt;Enter a background job name and job class&lt;/P&gt;&lt;P&gt;Click on the step button&lt;/P&gt;&lt;P&gt;Click on ABAP Program&lt;/P&gt;&lt;P&gt;Enter the program name and variant.&lt;/P&gt;&lt;P&gt;Click Start Condition and enter the time and date you would like the program to run&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternatively to run immediately in the background:&lt;/P&gt;&lt;P&gt;Run SE38&lt;/P&gt;&lt;P&gt;Enter the interface program name and execute&lt;/P&gt;&lt;P&gt;Enter any selection criteria&lt;/P&gt;&lt;P&gt;Press F9 or select Program-&amp;gt; Execute in Background&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Nov 2007 22:06:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/background-run/m-p/3009491#M711150</guid>
      <dc:creator>former_member670581</dc:creator>
      <dc:date>2007-11-14T22:06:49Z</dc:date>
    </item>
    <item>
      <title>Re: Background run</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/background-run/m-p/3009492#M711151</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you mean the progam or the batch input session that it creates?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Nov 2007 03:43:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/background-run/m-p/3009492#M711151</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-15T03:43:14Z</dc:date>
    </item>
  </channel>
</rss>

