<?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: Program Run at Server in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-run-at-server/m-p/6150508#M1368469</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can do this way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
If sy-ucomm eq 'START'.
  call function JOB_OPEN . " So background job will created
  ..
  ..
  call function SUBMIT_JOB
...
..
  call function JOB_CLOSE
..
..
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Then store the job name in a custom table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you switch on your PC again&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
if sy-ucomm eq 'STOP'
CALL FUNCTION 'BP_JOB_ABORT' " with job name from custom table
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 Sep 2009 03:43:15 GMT</pubDate>
    <dc:creator>former_member194669</dc:creator>
    <dc:date>2009-09-18T03:43:15Z</dc:date>
    <item>
      <title>Program Run at Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-run-at-server/m-p/6150507#M1368468</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All experts, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Do anyone  know any ideas how to we set the program run at server ? Even though we close our pc ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let take a simple example ..... i got program with a screen ,which creat at se80 with two button , "Start " n "Stop". When i press the star button , the time start couting .... after i off my pc , but the program is running with couting  at server without stop counting ... Next day , i open back this program .. the couting still running , it will STOP when i press stop button  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Normally the program will terminate when we close our pc rite ? Now i want to make my program continue running when I close my pc.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for help...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Sep 2009 03:15:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-run-at-server/m-p/6150507#M1368468</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-18T03:15:40Z</dc:date>
    </item>
    <item>
      <title>Re: Program Run at Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-run-at-server/m-p/6150508#M1368469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can do this way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
If sy-ucomm eq 'START'.
  call function JOB_OPEN . " So background job will created
  ..
  ..
  call function SUBMIT_JOB
...
..
  call function JOB_CLOSE
..
..
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Then store the job name in a custom table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you switch on your PC again&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
if sy-ucomm eq 'STOP'
CALL FUNCTION 'BP_JOB_ABORT' " with job name from custom table
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Sep 2009 03:43:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-run-at-server/m-p/6150508#M1368469</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2009-09-18T03:43:15Z</dc:date>
    </item>
    <item>
      <title>Re: Program Run at Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-run-at-server/m-p/6150509#M1368470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if possible you will run the program in background mode... in any selection screen give your values and hit F9 to execute in background.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Sep 2009 03:44:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-run-at-server/m-p/6150509#M1368470</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2009-09-18T03:44:52Z</dc:date>
    </item>
    <item>
      <title>Re: Program Run at Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/program-run-at-server/m-p/6150510#M1368471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;first thing about running at server we call it as background program scheduled... so create a back ground job we use tcode SM36. and SM37 to display it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and from your program, where you have that start and stop button you can trigger a background job which will start counting&lt;/P&gt;&lt;P&gt;and on press of stop you can close the background job and see the result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;though i think its easy to calculate time by storing it in some ztable when you press start and when you press stop just retrieve that value and calculate the time difference... &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;case sy-ucomm.
  when 'START'.
     ztable-time = sy-datum.
     insert ztable.
   when 'STOP'.
     select time from ztable up to 1 rows.
           timediff = sy-datum - ztable-time.
           write : timediff.
      endselect.
      delete ztable. "-&amp;gt;the database table is free again to start a new time,
endcase.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Sep 2009 04:30:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/program-run-at-server/m-p/6150510#M1368471</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-18T04:30:52Z</dc:date>
    </item>
  </channel>
</rss>

