<?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: Problem with SUBMIT in Background in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-submit-in-background/m-p/466547#M14868</link>
    <description>&lt;P&gt;Use some logging mechanism, e.g. logpoints, to see what happens.&lt;/P&gt;&lt;P&gt;You even might place some temporary WRITE statements around the update and check the list output in the job overview.&lt;/P&gt;</description>
    <pubDate>Mon, 26 Jun 2017 16:12:33 GMT</pubDate>
    <dc:creator>retired_member</dc:creator>
    <dc:date>2017-06-26T16:12:33Z</dc:date>
    <item>
      <title>Problem with SUBMIT in Background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-submit-in-background/m-p/466546#M14867</link>
      <description>&lt;P&gt;I have requirement to update a data base table in background job. As per my requirement i cannot use update task. to achieve this i have created one report and in that report i wrote code to update my table. in foreground program i am submitting background job program. If i will execute background submitted program individually it's working fine but if i will submit program via background same record appending two times in data base table. i wrote the code like below. Please help me on this issue&lt;/P&gt;&lt;P&gt;** Open job without dialog&lt;BR /&gt;
 CALL FUNCTION 'JOB_OPEN'&lt;BR /&gt;
 EXPORTING&lt;BR /&gt;
 jobname = lv_jobname&lt;BR /&gt;
 IMPORTING&lt;BR /&gt;
 jobcount = lv_jobcount&lt;BR /&gt;
 EXCEPTIONS&lt;BR /&gt;
 cant_create_job = 1&lt;BR /&gt;
 invalid_job_data = 2&lt;BR /&gt;
 jobname_missing = 3&lt;BR /&gt;
 OTHERS = 4.&lt;BR /&gt;
 IF sy-subrc IS NOT INITIAL.&lt;BR /&gt;
 RAISE job_not_scheduled.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;*-- Submit the program&lt;BR /&gt;
 SUBMIT /zupdate/c_pp_pplist_snapshot USER lv_uname&lt;BR /&gt;
 VIA JOB lv_jobname NUMBER lv_jobcount &lt;BR /&gt;
 AND RETURN.&lt;/P&gt;&lt;P&gt;
 ENDIF.&lt;/P&gt;&lt;P&gt;*-- Job close.&lt;BR /&gt;
 CALL FUNCTION 'JOB_CLOSE'&lt;BR /&gt;
 EXPORTING&lt;BR /&gt;
 jobcount = lv_jobcount&lt;BR /&gt;
 jobname = lv_jobname&lt;BR /&gt;strtimmed = abap_true&lt;BR /&gt;
 EXCEPTIONS&lt;BR /&gt;
 cant_start_immediate = 1&lt;BR /&gt;
 invalid_startdate = 2&lt;BR /&gt;
 jobname_missing = 3&lt;BR /&gt;
 job_close_failed = 4&lt;BR /&gt;
 job_nosteps = 5&lt;BR /&gt;
 job_notex = 6&lt;BR /&gt;
 lock_failed = 7&lt;BR /&gt;
 OTHERS = 8.&lt;BR /&gt;
 IF sy-subrc &amp;lt;&amp;gt; 0.&lt;BR /&gt;
 RAISE job_not_scheduled.&lt;BR /&gt;
 ENDIF.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2017 15:58:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-submit-in-background/m-p/466546#M14867</guid>
      <dc:creator>former_member573132</dc:creator>
      <dc:date>2017-06-26T15:58:40Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with SUBMIT in Background</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-submit-in-background/m-p/466547#M14868</link>
      <description>&lt;P&gt;Use some logging mechanism, e.g. logpoints, to see what happens.&lt;/P&gt;&lt;P&gt;You even might place some temporary WRITE statements around the update and check the list output in the job overview.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2017 16:12:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-submit-in-background/m-p/466547#M14868</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2017-06-26T16:12:33Z</dc:date>
    </item>
  </channel>
</rss>

