<?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: Report Background Scheduling in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/report-background-scheduling/m-p/3962596#M946566</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 can try this. In your report have a parameter PA_BKGND with NO-DISPLAY addition.The last 20 line of your code should get executed when this parametere is filled and first 80 should get executed when its blank. in the First 80 line , Do your stuff and then submit your report in Background with the PA_BKGND Set. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Report Ztest&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If PA_BKGND is INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;First 80 lines&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SUBMIT ZTEST with PA_BKGND = 'X'&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Last 20 lines.&lt;/P&gt;&lt;P&gt;&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;Another way can be to put the last 20 lines in an FM call the FM in BACKGROUND  Task.&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;&lt;/P&gt;&lt;P&gt;Saket Sharma&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Saket Sharma on Jun 15, 2008 6:48 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 15 Jun 2008 04:46:48 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-15T04:46:48Z</dc:date>
    <item>
      <title>Report Background Scheduling</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/report-background-scheduling/m-p/3962595#M946565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      I got a requirement that when ever we execute a program. say suppose there are total 100 lines in the program, the first 80 lines should execute in foreground and rest of the lines shold execute in Background.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any reply will be encouraged&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;NSK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Jun 2008 04:40:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/report-background-scheduling/m-p/3962595#M946565</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-15T04:40:55Z</dc:date>
    </item>
    <item>
      <title>Re: Report Background Scheduling</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/report-background-scheduling/m-p/3962596#M946566</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 can try this. In your report have a parameter PA_BKGND with NO-DISPLAY addition.The last 20 line of your code should get executed when this parametere is filled and first 80 should get executed when its blank. in the First 80 line , Do your stuff and then submit your report in Background with the PA_BKGND Set. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Report Ztest&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If PA_BKGND is INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;First 80 lines&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SUBMIT ZTEST with PA_BKGND = 'X'&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Last 20 lines.&lt;/P&gt;&lt;P&gt;&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;Another way can be to put the last 20 lines in an FM call the FM in BACKGROUND  Task.&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;&lt;/P&gt;&lt;P&gt;Saket Sharma&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Saket Sharma on Jun 15, 2008 6:48 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Jun 2008 04:46:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/report-background-scheduling/m-p/3962596#M946566</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-15T04:46:48Z</dc:date>
    </item>
    <item>
      <title>Re: Report Background Scheduling</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/report-background-scheduling/m-p/3962597#M946567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If i understand ur requirement correctly then you want to execute 80 lines of ur code in online mode and 20 lines in background mode. You can achieve it by following way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Report z_example.&lt;/P&gt;&lt;P&gt;if sy-batch = space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Put 80 lines of ur code (need to be executed in online mode)&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Execute prog. in background&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;    jobname          = name &lt;/P&gt;&lt;P&gt;  IMPORTING &lt;/P&gt;&lt;P&gt;    jobcount         = number &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 = 0. &lt;/P&gt;&lt;P&gt;  SUBMIT z_example TO SAP-SPOOL &lt;/P&gt;&lt;P&gt;                    SPOOL PARAMETERS print_parameters &lt;/P&gt;&lt;P&gt;                    WITHOUT SPOOL DYNPRO &lt;/P&gt;&lt;P&gt;                    VIA JOB name NUMBER number &lt;/P&gt;&lt;P&gt;                    AND RETURN. &lt;/P&gt;&lt;P&gt;  IF sy-subrc = 0. &lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'JOB_CLOSE' &lt;/P&gt;&lt;P&gt;      EXPORTING &lt;/P&gt;&lt;P&gt;        jobcount             = number &lt;/P&gt;&lt;P&gt;        jobname              = name &lt;/P&gt;&lt;P&gt;        strtimmed            = 'X' &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;        OTHERS               = 8. &lt;/P&gt;&lt;P&gt;    IF sy-subrc &amp;lt;&amp;gt; 0. &lt;/P&gt;&lt;P&gt;      ... &lt;/P&gt;&lt;P&gt;    ENDIF. &lt;/P&gt;&lt;P&gt;  ENDIF. &lt;/P&gt;&lt;P&gt;ENDIF. &lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Put rest 20 lines of code (need to be executed in background mode)&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;Regards,&lt;/P&gt;&lt;P&gt;Joy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Jun 2008 14:24:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/report-background-scheduling/m-p/3962597#M946567</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-15T14:24:36Z</dc:date>
    </item>
  </channel>
</rss>

