<?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 How to get the custom program generated in Background in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-the-custom-program-generated-in-background/m-p/4843600#M1132972</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Freinds,&lt;/P&gt;&lt;P&gt;I have written a below code in my submit program ( zreport) .&lt;/P&gt;&lt;P&gt;REPORT  ZHRRPCPRRU0_SUBMIT  NO STANDARD PAGE HEADING MESSAGE-ID zhr_msg.&lt;/P&gt;&lt;P&gt;SUBMIT RPTQTA00 VIA SELECTION-SCREEN&lt;/P&gt;&lt;P&gt;WITH pnpbegda = sy-datum&lt;/P&gt;&lt;P&gt;WITH pnpendda = lv_date&lt;/P&gt;&lt;P&gt;with pnppernr = '99007057'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As per your logic i have used the submit program and i am able to default the dates  in the Standard program RPTQTA00 , that is perfectly correct . Now if run the standard report it is giivng me the ouput ..so the foreground concept is working correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now if iam scheduling the Z report of the custom report (z program) where iam calling the submit program&lt;/P&gt;&lt;P&gt;it is just scheduling and further when i look at the sm37 i can see the  job getting finished . However , i dont  find any spool because the standard report has not been executed , with my custom report (using the logic with submit program above in zprogram ) i am calling the standard program (RPTQTA00).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so could you please let me know how the standard program will execute and get the spool genereated? in the case of background&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;because when  i have executed only the standard report in background i can see that it is being exceuted spool as well, however when iam calling from custom program no spool is created because my custom program only submiting the standard report and it is not executing the standard report in the case of backround ...because when iam running the custom program in the Foreground it is calling the standard program and getting the values defaulted based on the parameters which i passed , so it gets defaulted later iam running the standard program manually .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So please could you let me know how will the standard program also gets genereated in the backgroung along with my custom report.&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;madhuri,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Dec 2008 08:23:21 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-12-04T08:23:21Z</dc:date>
    <item>
      <title>How to get the custom program generated in Background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-the-custom-program-generated-in-background/m-p/4843600#M1132972</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Freinds,&lt;/P&gt;&lt;P&gt;I have written a below code in my submit program ( zreport) .&lt;/P&gt;&lt;P&gt;REPORT  ZHRRPCPRRU0_SUBMIT  NO STANDARD PAGE HEADING MESSAGE-ID zhr_msg.&lt;/P&gt;&lt;P&gt;SUBMIT RPTQTA00 VIA SELECTION-SCREEN&lt;/P&gt;&lt;P&gt;WITH pnpbegda = sy-datum&lt;/P&gt;&lt;P&gt;WITH pnpendda = lv_date&lt;/P&gt;&lt;P&gt;with pnppernr = '99007057'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As per your logic i have used the submit program and i am able to default the dates  in the Standard program RPTQTA00 , that is perfectly correct . Now if run the standard report it is giivng me the ouput ..so the foreground concept is working correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now if iam scheduling the Z report of the custom report (z program) where iam calling the submit program&lt;/P&gt;&lt;P&gt;it is just scheduling and further when i look at the sm37 i can see the  job getting finished . However , i dont  find any spool because the standard report has not been executed , with my custom report (using the logic with submit program above in zprogram ) i am calling the standard program (RPTQTA00).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so could you please let me know how the standard program will execute and get the spool genereated? in the case of background&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;because when  i have executed only the standard report in background i can see that it is being exceuted spool as well, however when iam calling from custom program no spool is created because my custom program only submiting the standard report and it is not executing the standard report in the case of backround ...because when iam running the custom program in the Foreground it is calling the standard program and getting the values defaulted based on the parameters which i passed , so it gets defaulted later iam running the standard program manually .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So please could you let me know how will the standard program also gets genereated in the backgroung along with my custom report.&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;madhuri,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Dec 2008 08:23:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-the-custom-program-generated-in-background/m-p/4843600#M1132972</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-04T08:23:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the custom program generated in Background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-the-custom-program-generated-in-background/m-p/4843601#M1132973</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Try SUBMIT statement with background options&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Madhan D&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Dec 2008 09:07:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-the-custom-program-generated-in-background/m-p/4843601#M1132973</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-04T09:07:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the custom program generated in Background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-the-custom-program-generated-in-background/m-p/4843602#M1132974</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;From your thread i understood that you are not able to execute thesubmit progrm through Z program.&lt;/P&gt;&lt;P&gt;Put a breakpoint before submit statement and see whether your program calling the standard program perfectly...&lt;/P&gt;&lt;P&gt;also you can write submit and return so that the control will be back to your Z program for the more analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Raghav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Dec 2008 09:08:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-the-custom-program-generated-in-background/m-p/4843602#M1132974</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-04T09:08:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the custom program generated in Background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-the-custom-program-generated-in-background/m-p/4843603#M1132975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Madhan,&lt;/P&gt;&lt;P&gt;            I have tried the options along the submi statment, could you please give me if you have&lt;/P&gt;&lt;P&gt;the logic with you , it would be great help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;madhuri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Dec 2008 09:35:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-the-custom-program-generated-in-background/m-p/4843603#M1132975</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-04T09:35:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the custom program generated in Background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-the-custom-program-generated-in-background/m-p/4843604#M1132976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Can you try the following?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps... (Taken from help)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example &lt;/P&gt;&lt;P&gt;Scheduling a submitable program as a background task with the number number in a background request name. After scheduling, the background task is completed by function module JOB_CLOSE and released immediately. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: number TYPE tbtcjob-jobcount, &lt;/P&gt;&lt;P&gt;      name TYPE tbtcjob-jobname VALUE 'JOB_TEST', &lt;/P&gt;&lt;P&gt;      print_parameters TYPE pri_params. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;... &lt;/P&gt;&lt;P&gt;&lt;/P&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 submitable 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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Dec 2008 10:10:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-the-custom-program-generated-in-background/m-p/4843604#M1132976</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-04T10:10:12Z</dc:date>
    </item>
  </channel>
</rss>

