<?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: Copying the background job in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/copying-the-background-job/m-p/1019756#M80886</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; As mentioned earlier, I am able to copy the job using the function module BP_JOB_COPY, but i was not able to copy the start conditions. How to copy the start conditions of one job to another?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Sep 2005 13:40:12 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-09-28T13:40:12Z</dc:date>
    <item>
      <title>Copying the background job</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copying-the-background-job/m-p/1019752#M80882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a background job with has a start condition after execution of a particular event. &lt;/P&gt;&lt;P&gt;Now i need to copy this background job to another name and execute it. I tried using the function module BP_JOB_COPY, but that copied the background job without the job start conditions. How can i copy the background job along with start conditions.&lt;/P&gt;&lt;P&gt;Thank you in anticipation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2005 11:54:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copying-the-background-job/m-p/1019752#M80882</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-28T11:54:25Z</dc:date>
    </item>
    <item>
      <title>Re: Copying the background job</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copying-the-background-job/m-p/1019753#M80883</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;The FM is only for the Copy of the BG job. &lt;/P&gt;&lt;P&gt;The same way BP_JOB_CREATE will create a job and will not specify the job start conditions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The copy of the job includes job steps and associated attributes such as the user for authorizations and printing/archiving specifications. However, the copy has no start specifications. These you must specify yourself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;User has to manually specify the parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Amit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2005 12:09:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copying-the-background-job/m-p/1019753#M80883</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-28T12:09:02Z</dc:date>
    </item>
    <item>
      <title>Re: Copying the background job</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copying-the-background-job/m-p/1019754#M80884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Amit,&lt;/P&gt;&lt;P&gt;Could you please let me know how to do this programmatically?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2005 12:46:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copying-the-background-job/m-p/1019754#M80884</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-28T12:46:13Z</dc:date>
    </item>
    <item>
      <title>Re: Copying the background job</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copying-the-background-job/m-p/1019755#M80885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nikhil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the follwoing code schedules 2 jobs from a source job (which is maintaned in the system). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: s_tbtcjob1 like tbtcjob,         "target job #1"
      s_tbtcjob2 like tbtcjob.         "target job #1"

data: h_1 like tbtco-jobcount,         "jobcount"
      h_2 like tbtco-jobcount,         "jobcount"
      h_1s like tbtco-jobname,         "jobname source"
      h_2s like tbtco-jobname,         "jobname source"
      h_1t like tbtco-jobname,         "jobname target"
      h_2t like tbtco-jobname.         "jobname target"

selection-screen begin of line.
selection-screen position 2.
parameters ra radiobutton group rad1.
selection-screen comment 4(70) text-001.
selection-screen end of line.
selection-screen begin of block block1 with frame.
parameters: p_a1 like h_1,
            p_a1s like h_1s,
            p_a1t like h_1t,
            p_a2 like h_2,
            p_a2s like h_2s,
            p_a2t like h_2t.
selection-screen end of block block1.

start-of-selection.
  perform create_jobs using p_a1 p_a1s p_a1t p_a2 p_a2s p_a2t.

*---------------------------------------------------------------------*
*       FORM CREATE_JOBS                                              *
*---------------------------------------------------------------------*
*       ........                                                      *
*---------------------------------------------------------------------*
form create_jobs using h_1 h_1s h_1t h_2 h_2s h_2t.
  call function 'BP_JOB_COPY'
       exporting
            dialog                  = 'N'
            source_jobcount         = h_1
            source_jobname          = h_1s
            target_jobname          = h_1t
       importing
            new_jobhead             = s_tbtcjob1
       exceptions
            cant_create_new_job     = 1
            cant_enq_job            = 2
            cant_read_sourcedata    = 3
            invalid_opcode          = 4
            jobname_missing         = 5
            job_copy_canceled       = 6
            no_copy_privilege_given = 7
            no_plan_privilege_given = 8
            others                  = 9.

  call function 'BP_JOB_COPY'
       exporting
            dialog                  = 'N'
            source_jobcount         = h_2
            source_jobname          = h_2s
            target_jobname          = h_2t
       importing
            new_jobhead             = s_tbtcjob2
       exceptions
            cant_create_new_job     = 1
            cant_enq_job            = 2
            cant_read_sourcedata    = 3
            invalid_opcode          = 4
            jobname_missing         = 5
            job_copy_canceled       = 6
            no_copy_privilege_given = 7
            no_plan_privilege_given = 8
            others                  = 9.

  call function 'JOB_CLOSE'
       exporting
            jobcount                    = s_tbtcjob2-jobcount
            jobname                     = s_tbtcjob2-jobname
            pred_jobcount               = s_tbtcjob1-jobcount
            pred_jobname                = s_tbtcjob1-jobname
          targetsystem                = '&amp;lt;&amp;lt;SYSTEM IN CASE OF MULTIPLE SERVERS&amp;gt;&amp;gt;'
       exceptions
            cant_start_immediate        = 1
            invalid_startdate           = 2
            jobname_missing             = 3
            job_close_failed            = 4
            job_nosteps                 = 5
            job_notex                   = 6
            lock_failed                 = 7
            others                      = 8.


  call function 'JOB_CLOSE'
       exporting
            jobcount                    = s_tbtcjob1-jobcount
            jobname                     = s_tbtcjob1-jobname
            strtimmed                   = 'X'
          targetsystem                = '&amp;lt;&amp;lt;SYSTEM IN CASE OF MULTIPLE SERVERS&amp;gt;&amp;gt;'
       exceptions
            cant_start_immediate        = 1
            invalid_startdate           = 2
            jobname_missing             = 3
            job_close_failed            = 4
            job_nosteps                 = 5
            job_notex                   = 6
            lock_failed                 = 7
            others                      = 8.

endform.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2005 13:16:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copying-the-background-job/m-p/1019755#M80885</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-28T13:16:00Z</dc:date>
    </item>
    <item>
      <title>Re: Copying the background job</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copying-the-background-job/m-p/1019756#M80886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; As mentioned earlier, I am able to copy the job using the function module BP_JOB_COPY, but i was not able to copy the start conditions. How to copy the start conditions of one job to another?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2005 13:40:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copying-the-background-job/m-p/1019756#M80886</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-09-28T13:40:12Z</dc:date>
    </item>
  </channel>
</rss>

