<?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: Running program in the background in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/running-program-in-the-background/m-p/1319812#M164993</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;You usually run a report program by pressing F9 on the selection screen and then it will be scheduled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Other wise you can schedule the job using SM36.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The system variable sy-batch will be set to X, when the program runs in background. But by setting the variable, the program will NOT be executed in background.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note : Please mark the helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 Apr 2006 09:53:25 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-04-27T09:53:25Z</dc:date>
    <item>
      <title>Running program in the background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/running-program-in-the-background/m-p/1319809#M164990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everybody!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to run  program in the background.&lt;/P&gt;&lt;P&gt;So I need only to change the sy-batch status to 'X'?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Apr 2006 09:48:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/running-program-in-the-background/m-p/1319809#M164990</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-27T09:48:06Z</dc:date>
    </item>
    <item>
      <title>Re: Running program in the background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/running-program-in-the-background/m-p/1319810#M164991</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;Yes when sy-batch = 'X' the program is executed in the background.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sameena&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Apr 2006 09:50:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/running-program-in-the-background/m-p/1319810#M164991</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-27T09:50:58Z</dc:date>
    </item>
    <item>
      <title>Re: Running program in the background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/running-program-in-the-background/m-p/1319811#M164992</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;U can create variant to ur selection screen and &lt;/P&gt;&lt;P&gt;SE38-&amp;gt;Program-&amp;gt;excute-&amp;gt;backgound&lt;/P&gt;&lt;P&gt;or u can do it by sy-batch = 'X'&lt;/P&gt;&lt;P&gt;and also check other parameter of &amp;lt;b&amp;gt;syst&amp;lt;/b&amp;gt; structure&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;vinod&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Apr 2006 09:53:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/running-program-in-the-background/m-p/1319811#M164992</guid>
      <dc:creator>vinod_gunaware2</dc:creator>
      <dc:date>2006-04-27T09:53:00Z</dc:date>
    </item>
    <item>
      <title>Re: Running program in the background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/running-program-in-the-background/m-p/1319812#M164993</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;You usually run a report program by pressing F9 on the selection screen and then it will be scheduled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Other wise you can schedule the job using SM36.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The system variable sy-batch will be set to X, when the program runs in background. But by setting the variable, the program will NOT be executed in background.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note : Please mark the helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Apr 2006 09:53:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/running-program-in-the-background/m-p/1319812#M164993</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-27T09:53:25Z</dc:date>
    </item>
    <item>
      <title>Re: Running program in the background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/running-program-in-the-background/m-p/1319813#M164994</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;    Yes ur correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds,&lt;/P&gt;&lt;P&gt;Latheesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Apr 2006 09:54:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/running-program-in-the-background/m-p/1319813#M164994</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-27T09:54:41Z</dc:date>
    </item>
    <item>
      <title>Re: Running program in the background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/running-program-in-the-background/m-p/1319814#M164995</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi LOS,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  If you want to schedule the program in background mode &lt;/P&gt;&lt;P&gt;  programitically then ned to do dome steps and submit &lt;/P&gt;&lt;P&gt;  the program in background. If you are manually running&lt;/P&gt;&lt;P&gt;  it in bj then some of the statements need to be &lt;/P&gt;&lt;P&gt;  executed in bj tehn put SY-BATCH = 'X'. Then in &lt;/P&gt;&lt;P&gt;  Backgroung mode only it will consider those statements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&amp;amp;Regards,&lt;/P&gt;&lt;P&gt;Siri.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Apr 2006 09:57:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/running-program-in-the-background/m-p/1319814#M164995</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-27T09:57:16Z</dc:date>
    </item>
    <item>
      <title>Re: Running program in the background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/running-program-in-the-background/m-p/1319815#M164996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;if your program is runninn in the Background then the System field SY-BATCH will become 'X' otherwise it will have space ...... &lt;/P&gt;&lt;P&gt;it will not execute the job in the background if you put SY-BATCH = 'X'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you need to use: Job_open , Job_submit and job_close function modules&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;example: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Submit report as job(i.e. in background)  &lt;/P&gt;&lt;P&gt;data: jobname like tbtcjob-jobname value&lt;/P&gt;&lt;P&gt;                             ' TRANSFER TRANSLATION'.&lt;/P&gt;&lt;P&gt;data: jobcount like tbtcjob-jobcount,&lt;/P&gt;&lt;P&gt;      host like msxxlist-host.&lt;/P&gt;&lt;P&gt;data: begin of starttime.&lt;/P&gt;&lt;P&gt;        include structure tbtcstrt.&lt;/P&gt;&lt;P&gt;data: end of starttime.&lt;/P&gt;&lt;P&gt;data: starttimeimmediate like btch0000-char1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Job open &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  call function 'JOB_OPEN'&lt;/P&gt;&lt;P&gt;       exporting&lt;/P&gt;&lt;P&gt;            delanfrep        = ' '&lt;/P&gt;&lt;P&gt;            jobgroup         = ' '&lt;/P&gt;&lt;P&gt;            jobname          = jobname&lt;/P&gt;&lt;P&gt;            sdlstrtdt        = sy-datum&lt;/P&gt;&lt;P&gt;            sdlstrttm        = sy-uzeit&lt;/P&gt;&lt;P&gt;       importing&lt;/P&gt;&lt;P&gt;            jobcount         = jobcount&lt;/P&gt;&lt;P&gt;       exceptions&lt;/P&gt;&lt;P&gt;            cant_create_job  = 01&lt;/P&gt;&lt;P&gt;            invalid_job_data = 02&lt;/P&gt;&lt;P&gt;            jobname_missing  = 03.&lt;/P&gt;&lt;P&gt;  if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;                                       "error processing&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Insert process into job&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; SUBMIT zreport and return &lt;/P&gt;&lt;P&gt;                with p_param1 = 'value'&lt;/P&gt;&lt;P&gt;                with p_param2 = 'value'&lt;/P&gt;&lt;P&gt;                user sy-uname&lt;/P&gt;&lt;P&gt;                via job jobname&lt;/P&gt;&lt;P&gt;                number jobcount.&lt;/P&gt;&lt;P&gt;  if sy-subrc &amp;gt; 0.&lt;/P&gt;&lt;P&gt;                                       "error processing&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Close job&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  starttime-sdlstrtdt = sy-datum + 1.&lt;/P&gt;&lt;P&gt;  starttime-sdlstrttm = '220000'.&lt;/P&gt;&lt;P&gt;  call function 'JOB_CLOSE'&lt;/P&gt;&lt;P&gt;       exporting&lt;/P&gt;&lt;P&gt;            event_id             = starttime-eventid&lt;/P&gt;&lt;P&gt;            event_param          = starttime-eventparm&lt;/P&gt;&lt;P&gt;            event_periodic       = starttime-periodic&lt;/P&gt;&lt;P&gt;            jobcount             = jobcount&lt;/P&gt;&lt;P&gt;            jobname              = jobname&lt;/P&gt;&lt;P&gt;            laststrtdt           = starttime-laststrtdt&lt;/P&gt;&lt;P&gt;            laststrttm           = starttime-laststrttm&lt;/P&gt;&lt;P&gt;            prddays              = 1&lt;/P&gt;&lt;P&gt;            prdhours             = 0&lt;/P&gt;&lt;P&gt;            prdmins              = 0&lt;/P&gt;&lt;P&gt;            prdmonths            = 0&lt;/P&gt;&lt;P&gt;            prdweeks             = 0&lt;/P&gt;&lt;P&gt;            sdlstrtdt            = starttime-sdlstrtdt&lt;/P&gt;&lt;P&gt;            sdlstrttm            = starttime-sdlstrttm&lt;/P&gt;&lt;P&gt;            strtimmed            = starttimeimmediate&lt;/P&gt;&lt;P&gt;            targetsystem         = host&lt;/P&gt;&lt;P&gt;       exceptions&lt;/P&gt;&lt;P&gt;            cant_start_immediate = 01&lt;/P&gt;&lt;P&gt;            invalid_startdate    = 02&lt;/P&gt;&lt;P&gt;            jobname_missing      = 03&lt;/P&gt;&lt;P&gt;            job_close_failed     = 04&lt;/P&gt;&lt;P&gt;            job_nosteps          = 05&lt;/P&gt;&lt;P&gt;            job_notex            = 06&lt;/P&gt;&lt;P&gt;            lock_failed          = 07&lt;/P&gt;&lt;P&gt;            others               = 99.&lt;/P&gt;&lt;P&gt;  if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;                                       "error processing&lt;/P&gt;&lt;P&gt;  endif.&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;Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Apr 2006 10:01:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/running-program-in-the-background/m-p/1319815#M164996</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-27T10:01:07Z</dc:date>
    </item>
  </channel>
</rss>

