<?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: Create a JOB in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-job/m-p/2809483#M656731</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;Go thru this Link &amp;amp; Forum,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="339200"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/fa/096d40543b11d1898e0000e8322d00/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/fa/096d40543b11d1898e0000e8322d00/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Padmam.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 24 Sep 2007 16:30:07 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-09-24T16:30:07Z</dc:date>
    <item>
      <title>Create a JOB</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-job/m-p/2809480#M656728</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;    Please.! Help me.! I need to create a JOB, this have to run a report Z by salesman and send him by mail his respective information every weekend..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    I don't know about the JOB, if some body can help me, with a link, manual, or the basic step and tx that I have to use..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Thanks, Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Gustavo Gil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Sep 2007 15:13:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-job/m-p/2809480#M656728</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-24T15:13:43Z</dc:date>
    </item>
    <item>
      <title>Re: Create a JOB</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-job/m-p/2809481#M656729</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&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. 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;Thanks&lt;/P&gt;&lt;P&gt;Seshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Sep 2007 15:35:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-job/m-p/2809481#M656729</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-24T15:35:16Z</dc:date>
    </item>
    <item>
      <title>Re: Create a JOB</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-job/m-p/2809482#M656730</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;In SM36,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. give Job name&lt;/P&gt;&lt;P&gt;2. click Step&lt;/P&gt;&lt;P&gt;3. specify program name and variant&lt;/P&gt;&lt;P&gt;4. check and save&lt;/P&gt;&lt;P&gt;5. back to the front screen of sm36&lt;/P&gt;&lt;P&gt;6. click save button&lt;/P&gt;&lt;P&gt;7. now click Start condition&lt;/P&gt;&lt;P&gt;8. click Date/Time&lt;/P&gt;&lt;P&gt;9. clikc Period values&lt;/P&gt;&lt;P&gt;8. clikc Daily&lt;/P&gt;&lt;P&gt;9. click save button&lt;/P&gt;&lt;P&gt;10. set the scheduled start date and start time&lt;/P&gt;&lt;P&gt;11. The job will execute daily at the start time&lt;/P&gt;&lt;P&gt;12. Save to release the job&lt;/P&gt;&lt;P&gt;13. verify the job in SM37&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Siva&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Alvaro Tejada Galindo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Sep 2007 16:28:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-job/m-p/2809482#M656730</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-24T16:28:22Z</dc:date>
    </item>
    <item>
      <title>Re: Create a JOB</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-job/m-p/2809483#M656731</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;Go thru this Link &amp;amp; Forum,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="339200"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/fa/096d40543b11d1898e0000e8322d00/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/fa/096d40543b11d1898e0000e8322d00/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Padmam.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Sep 2007 16:30:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-job/m-p/2809483#M656731</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-24T16:30:07Z</dc:date>
    </item>
    <item>
      <title>Re: Create a JOB</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-job/m-p/2809484#M656732</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot for your helps Experts.!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gustavo Gil.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Sep 2007 19:45:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-a-job/m-p/2809484#M656732</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-26T19:45:42Z</dc:date>
    </item>
  </channel>
</rss>

