<?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 Foreground and Background in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/foreground-and-background/m-p/3353817#M804538</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In my application a program can executed either in foreground or in background. when the program is executed in &lt;/P&gt;&lt;P&gt;the foreground , I dont want to execute certain portion of the code. Similaly, when the job is executed as a background job,&lt;/P&gt;&lt;P&gt;I dont want to execute certain portion of the code. Is it possible? If yes, please share the details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Feb 2008 10:18:56 GMT</pubDate>
    <dc:creator>raja_ksravankumarreddy</dc:creator>
    <dc:date>2008-02-07T10:18:56Z</dc:date>
    <item>
      <title>Foreground and Background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/foreground-and-background/m-p/3353817#M804538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In my application a program can executed either in foreground or in background. when the program is executed in &lt;/P&gt;&lt;P&gt;the foreground , I dont want to execute certain portion of the code. Similaly, when the job is executed as a background job,&lt;/P&gt;&lt;P&gt;I dont want to execute certain portion of the code. Is it possible? If yes, please share the details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Feb 2008 10:18:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/foreground-and-background/m-p/3353817#M804538</guid>
      <dc:creator>raja_ksravankumarreddy</dc:creator>
      <dc:date>2008-02-07T10:18:56Z</dc:date>
    </item>
    <item>
      <title>Re: Foreground and Background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/foreground-and-background/m-p/3353818#M804539</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Raja,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can check sy-batch during runtime. If it is 'X' it means the program wuns in background.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;ec&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Feb 2008 10:20:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/foreground-and-background/m-p/3353818#M804539</guid>
      <dc:creator>JozsefSzikszai</dc:creator>
      <dc:date>2008-02-07T10:20:55Z</dc:date>
    </item>
    <item>
      <title>Re: Foreground and Background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/foreground-and-background/m-p/3353819#M804540</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;IF syst-batch = 'X'.&lt;/P&gt;&lt;P&gt;.....&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;Regards,&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Feb 2008 10:20:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/foreground-and-background/m-p/3353819#M804540</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-07T10:20:57Z</dc:date>
    </item>
    <item>
      <title>Re: Foreground and Background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/foreground-and-background/m-p/3353820#M804541</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;Check the portion with the system variable "sy-batch" .&lt;/P&gt;&lt;P&gt;This variable is 'X' when executing in background.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jayant Sahu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Feb 2008 10:20:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/foreground-and-background/m-p/3353820#M804541</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-07T10:20:57Z</dc:date>
    </item>
    <item>
      <title>Re: Foreground and Background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/foreground-and-background/m-p/3353821#M804542</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;Possible. When a program is run in the background the system variable &lt;STRONG&gt;SY-BATCH&lt;/STRONG&gt; is set to 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hence by checking this variable you can segregate the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Aditya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Feb 2008 10:21:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/foreground-and-background/m-p/3353821#M804542</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-07T10:21:49Z</dc:date>
    </item>
    <item>
      <title>Re: Foreground and Background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/foreground-and-background/m-p/3353822#M804543</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Raja,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could do as per your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is a system table field known as sy-batch. this field is initial if the program is getting executed in foreground. if sy-batch is not initial then, it means that the program is getting executed in background.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so use a simple if condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-batch is initial.&lt;/P&gt;&lt;P&gt;&amp;lt;portion of code to be run in foreground&amp;gt;.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;&amp;lt;portion of code to be executed in background&amp;gt;.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Reward points if this helps,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Kiran&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Feb 2008 10:24:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/foreground-and-background/m-p/3353822#M804543</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-07T10:24:13Z</dc:date>
    </item>
    <item>
      <title>Re: Foreground and Background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/foreground-and-background/m-p/3353823#M804544</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;   Check the below code...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-batch = 'X'.&lt;/P&gt;&lt;P&gt;  Do back ground processing.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;  Do foreground processing.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Bujji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Feb 2008 10:24:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/foreground-and-background/m-p/3353823#M804544</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-07T10:24:47Z</dc:date>
    </item>
    <item>
      <title>Re: Foreground and Background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/foreground-and-background/m-p/3353824#M804545</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;also Func modules for uploading/downloading to/from appli server dosent work in background...........&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Feb 2008 10:28:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/foreground-and-background/m-p/3353824#M804545</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-07T10:28:46Z</dc:date>
    </item>
  </channel>
</rss>

