<?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 Wrapper program to check status and call another program in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/wrapper-program-to-check-status-and-call-another-program/m-p/9612170#M1759815</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a requirement in which I want to check the status of a job at regular intervals. Once it is finished I wanted to call another ABAP program named Zxyz through submit code. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. I think the status of the job can be retrieved from TBTCO table from field STATUS. If it equals to 'F', which indicates that this successful execution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;DO &lt;/P&gt;&lt;P&gt;select single status into l_status from TBTCO where JOBNAME = myjob1.&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if l_status == 'F'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *Job has been successfully executed, call the second program with the help of submit&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; submit Zxyz.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *exit the loop&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exit.&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; *if the job is not yet executed&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wait 5.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I have the following questions with my coding:-)&lt;/P&gt;&lt;P&gt;If the status of the job is F, I want to exit the loop and call the second program(Zxyz) through submit. Will this cod eexit the loop?&lt;/P&gt;&lt;P&gt;If the job has n't been executed i wanted to wait for some time and chek the status. Will wait 5 serves my purpose.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone correct the code for me.?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 Aug 2013 07:55:13 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2013-08-01T07:55:13Z</dc:date>
    <item>
      <title>Wrapper program to check status and call another program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wrapper-program-to-check-status-and-call-another-program/m-p/9612170#M1759815</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a requirement in which I want to check the status of a job at regular intervals. Once it is finished I wanted to call another ABAP program named Zxyz through submit code. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. I think the status of the job can be retrieved from TBTCO table from field STATUS. If it equals to 'F', which indicates that this successful execution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;DO &lt;/P&gt;&lt;P&gt;select single status into l_status from TBTCO where JOBNAME = myjob1.&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if l_status == 'F'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *Job has been successfully executed, call the second program with the help of submit&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; submit Zxyz.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *exit the loop&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exit.&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; *if the job is not yet executed&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wait 5.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I have the following questions with my coding:-)&lt;/P&gt;&lt;P&gt;If the status of the job is F, I want to exit the loop and call the second program(Zxyz) through submit. Will this cod eexit the loop?&lt;/P&gt;&lt;P&gt;If the job has n't been executed i wanted to wait for some time and chek the status. Will wait 5 serves my purpose.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone correct the code for me.?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Aug 2013 07:55:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wrapper-program-to-check-status-and-call-another-program/m-p/9612170#M1759815</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-08-01T07:55:13Z</dc:date>
    </item>
    <item>
      <title>Re: Wrapper program to check status and call another program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wrapper-program-to-check-status-and-call-another-program/m-p/9612171#M1759816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kiran,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Make use of SUBMIT Zxyz &lt;STRONG&gt;AND RETURN&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WAIT N will wait for N seconds and repeat the process.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Aug 2013 11:16:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wrapper-program-to-check-status-and-call-another-program/m-p/9612171#M1759816</guid>
      <dc:creator>Arun_Prabhu_K</dc:creator>
      <dc:date>2013-08-01T11:16:45Z</dc:date>
    </item>
    <item>
      <title>Re: Wrapper program to check status and call another program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/wrapper-program-to-check-status-and-call-another-program/m-p/9612172#M1759817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why not just add the ABAP program to be submitted as another step in the job that you are status checking? This way it will start whenever the previous step has finished successfully.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Aug 2013 11:33:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/wrapper-program-to-check-status-and-call-another-program/m-p/9612172#M1759817</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2013-08-01T11:33:30Z</dc:date>
    </item>
  </channel>
</rss>

