<?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: Job Scehduling in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/job-scehduling/m-p/1577577#M260753</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;1. You define event in SAP using transaction SM62.&lt;/P&gt;&lt;P&gt;2. For triggering the event use Function module &lt;/P&gt;&lt;P&gt;   &amp;lt;b&amp;gt;BP_EVENT_RAISE&amp;lt;/b&amp;gt; from ABAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to define the event periodic job from SM36 , and this job is called when event is triggered from abap program or from shell script in UNIX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Oct 2006 09:47:41 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-10-09T09:47:41Z</dc:date>
    <item>
      <title>Job Scehduling</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/job-scehduling/m-p/1577575#M260751</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;I am working in SCM and I am going to set up som batch jobs that should be scheduled to run after a particular event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My questions are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. How do you define an event if you dont want to use the standard ones?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. How do you trigger the event, do you have to write new ABAP code to raise the event or is there a standard function that can be used to raise events?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Baran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Oct 2006 09:24:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/job-scehduling/m-p/1577575#M260751</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-09T09:24:59Z</dc:date>
    </item>
    <item>
      <title>Re: Job Scehduling</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/job-scehduling/m-p/1577576#M260752</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;There are two ways for you to handle, &lt;/P&gt;&lt;P&gt;one manually setting up the job through SM36 which is better and convinient, &lt;/P&gt;&lt;P&gt;secondly through program using FM's JOB_OPEN, SUBMIT, JOB_CLOSE.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  Find below steps in doing both:&lt;/P&gt;&lt;P&gt;Procedure 1:&lt;/P&gt;&lt;P&gt;  1. Goto Trans -&amp;gt; SM36&lt;/P&gt;&lt;P&gt;  2. Define a job with the program and variant if any&lt;/P&gt;&lt;P&gt;  3. Click on start condition in application tool bar&lt;/P&gt;&lt;P&gt;  4. In the pop-up window, click on Date/Time&lt;/P&gt;&lt;P&gt;  5. Below you can see a check box "Periodic Job"&lt;/P&gt;&lt;P&gt;  6. Next click on Period Values&lt;/P&gt;&lt;P&gt;  7. Select "Other Period"&lt;/P&gt;&lt;P&gt;  8. Now give '15' for Minutes&lt;/P&gt;&lt;P&gt;  9. Save the job&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Procedure 2 via Program:&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Below is a sample code for the same. Note the ZTEMP2 is the program i am scheduling with 15mins frequency.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;DATA: P_JOBCNT LIKE TBTCJOB-JOBCOUNT,&lt;/P&gt;&lt;P&gt;      L_RELEASE(1) TYPE c.&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                = 'ZTEMP2' &lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      JOBCOUNT               = P_JOBCNT&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 &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   ENDIF.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;   SUBMIT ZTEMP2 VIA JOB 'ZTEMP2' NUMBER P_JOBCNT&lt;/P&gt;&lt;P&gt;          TO SAP-SPOOL WITHOUT SPOOL DYNPRO &lt;/P&gt;&lt;P&gt;          WITH DESTINATION = 'HPMISPRT'&lt;/P&gt;&lt;P&gt;          WITH IMMEDIATELY = SPACE&lt;/P&gt;&lt;P&gt;          WITH KEEP_IN_SPOOL = 'X' AND RETURN.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;   CALL FUNCTION 'JOB_CLOSE'&lt;/P&gt;&lt;P&gt;     EXPORTING&lt;/P&gt;&lt;P&gt;       JOBCOUNT                          = P_JOBCNT&lt;/P&gt;&lt;P&gt;       JOBNAME                           = 'ZTEMP2' &lt;/P&gt;&lt;P&gt;       STRTIMMED                         = 'X'&lt;/P&gt;&lt;P&gt;       PRDMINS                          = 15&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      JOB_WAS_RELEASED                  = L_RELEASE&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;      INVALID_TARGET                    = 8&lt;/P&gt;&lt;P&gt;      OTHERS                            = 9.&lt;/P&gt;&lt;P&gt;   IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   ENDIF.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Hope the above helps you.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;anver&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if usefful pls mark points&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Oct 2006 09:27:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/job-scehduling/m-p/1577576#M260752</guid>
      <dc:creator>anversha_s</dc:creator>
      <dc:date>2006-10-09T09:27:47Z</dc:date>
    </item>
    <item>
      <title>Re: Job Scehduling</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/job-scehduling/m-p/1577577#M260753</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;1. You define event in SAP using transaction SM62.&lt;/P&gt;&lt;P&gt;2. For triggering the event use Function module &lt;/P&gt;&lt;P&gt;   &amp;lt;b&amp;gt;BP_EVENT_RAISE&amp;lt;/b&amp;gt; from ABAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to define the event periodic job from SM36 , and this job is called when event is triggered from abap program or from shell script in UNIX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Oct 2006 09:47:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/job-scehduling/m-p/1577577#M260753</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-09T09:47:41Z</dc:date>
    </item>
    <item>
      <title>Re: Job Scehduling</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/job-scehduling/m-p/1577578#M260754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;that solved the problem!&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, 09 Oct 2006 10:51:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/job-scehduling/m-p/1577578#M260754</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-09T10:51:21Z</dc:date>
    </item>
    <item>
      <title>Re: Job Scehduling</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/job-scehduling/m-p/1577579#M260755</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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The solution herein requires ABAP programming which we do not want to do as the maintenance of the same may be difficult should things fall apart. The other one that requires a trigger of the event using UNIX level or ABAP script is limited in our case i.e., for UNIX level scripting you need to go through a bureaucracy with the managed service provider and if anything goes wrong the red tape kicks in. The ABAP script seems feasible however if this fails at some point the whole scheduling falls apart&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We thought a straight forward solution was to use after job condition only to find that you can use this with two different jobs whereas in our case we  want the same job to start every hour only if it ran successfully the previous time. This is because when it fails or runs for along time it chews up all background processes. Now for a BI system this is detrimental as all extraction jobs grind to a halt and then the reports start falling apart&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess the solution here for us is to go to Redwood Scheduling and get all out batch processing on Redwood only. This should provide easy means to do the above and many more&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;joseph&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Sep 2009 10:19:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/job-scehduling/m-p/1577579#M260755</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-02T10:19:41Z</dc:date>
    </item>
  </channel>
</rss>

