<?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 sumbit wait until in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sumbit-wait-until/m-p/4452076#M1055609</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using JOB_OPEN , SUBMIT and JOB_CLOSE for a report1 to create a spool in background processing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; After the JOB_CLOSE i am calling  a fm for display the spool list.&lt;/P&gt;&lt;P&gt;My problem is after submitting the report1  in background how to hold the fm unless the background process for report1 is complete . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question how to use submit statement wait for submit report1 is finished and then only call &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call function 'LIST_FROM_MEMORY'.&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          = v_jobname&lt;/P&gt;&lt;P&gt;      importing&lt;/P&gt;&lt;P&gt;        jobcount         = v_jobcount&lt;/P&gt;&lt;P&gt;      exceptions&lt;/P&gt;&lt;P&gt;        cant_create_job  = 01&lt;/P&gt;&lt;P&gt;        invalid_job_data = 02&lt;/P&gt;&lt;P&gt;        jobname_missing  = 03&lt;/P&gt;&lt;P&gt;        others           = 99.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;    submit report1&lt;/P&gt;&lt;P&gt;                    via job v_jobname&lt;/P&gt;&lt;P&gt;                    number v_jobcount&lt;/P&gt;&lt;P&gt;                    to sap-spool without spool dynpro&lt;/P&gt;&lt;P&gt;                    spool parameters wa_params&lt;/P&gt;&lt;P&gt;                    and return.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;    call function 'JOB_CLOSE'&lt;/P&gt;&lt;P&gt;      exporting&lt;/P&gt;&lt;P&gt;        jobcount          = v_jobcount&lt;/P&gt;&lt;P&gt;        jobname           = v_jobname&lt;/P&gt;&lt;P&gt;        strtimmed         = 'X'&lt;/P&gt;&lt;P&gt;      importing&lt;/P&gt;&lt;P&gt;        job_was_released  = v_job_released&lt;/P&gt;&lt;P&gt;      exceptions&lt;/P&gt;&lt;P&gt;        invalid_startdate = 01&lt;/P&gt;&lt;P&gt;        jobname_missing   = 02&lt;/P&gt;&lt;P&gt;        job_close_failed  = 03&lt;/P&gt;&lt;P&gt;        job_nosteps       = 04&lt;/P&gt;&lt;P&gt;        job_notex         = 05&lt;/P&gt;&lt;P&gt;        lock_failed       = 06&lt;/P&gt;&lt;P&gt;        others            = 99.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  call function 'LIST_FROM_MEMORY'&lt;/P&gt;&lt;P&gt;       tables&lt;/P&gt;&lt;P&gt;            listobject = ilist..&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;anuj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Sep 2008 19:10:49 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-09-18T19:10:49Z</dc:date>
    <item>
      <title>sumbit wait until</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sumbit-wait-until/m-p/4452076#M1055609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using JOB_OPEN , SUBMIT and JOB_CLOSE for a report1 to create a spool in background processing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; After the JOB_CLOSE i am calling  a fm for display the spool list.&lt;/P&gt;&lt;P&gt;My problem is after submitting the report1  in background how to hold the fm unless the background process for report1 is complete . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question how to use submit statement wait for submit report1 is finished and then only call &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call function 'LIST_FROM_MEMORY'.&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          = v_jobname&lt;/P&gt;&lt;P&gt;      importing&lt;/P&gt;&lt;P&gt;        jobcount         = v_jobcount&lt;/P&gt;&lt;P&gt;      exceptions&lt;/P&gt;&lt;P&gt;        cant_create_job  = 01&lt;/P&gt;&lt;P&gt;        invalid_job_data = 02&lt;/P&gt;&lt;P&gt;        jobname_missing  = 03&lt;/P&gt;&lt;P&gt;        others           = 99.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;    submit report1&lt;/P&gt;&lt;P&gt;                    via job v_jobname&lt;/P&gt;&lt;P&gt;                    number v_jobcount&lt;/P&gt;&lt;P&gt;                    to sap-spool without spool dynpro&lt;/P&gt;&lt;P&gt;                    spool parameters wa_params&lt;/P&gt;&lt;P&gt;                    and return.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;    call function 'JOB_CLOSE'&lt;/P&gt;&lt;P&gt;      exporting&lt;/P&gt;&lt;P&gt;        jobcount          = v_jobcount&lt;/P&gt;&lt;P&gt;        jobname           = v_jobname&lt;/P&gt;&lt;P&gt;        strtimmed         = 'X'&lt;/P&gt;&lt;P&gt;      importing&lt;/P&gt;&lt;P&gt;        job_was_released  = v_job_released&lt;/P&gt;&lt;P&gt;      exceptions&lt;/P&gt;&lt;P&gt;        invalid_startdate = 01&lt;/P&gt;&lt;P&gt;        jobname_missing   = 02&lt;/P&gt;&lt;P&gt;        job_close_failed  = 03&lt;/P&gt;&lt;P&gt;        job_nosteps       = 04&lt;/P&gt;&lt;P&gt;        job_notex         = 05&lt;/P&gt;&lt;P&gt;        lock_failed       = 06&lt;/P&gt;&lt;P&gt;        others            = 99.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  call function 'LIST_FROM_MEMORY'&lt;/P&gt;&lt;P&gt;       tables&lt;/P&gt;&lt;P&gt;            listobject = ilist..&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;anuj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Sep 2008 19:10:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sumbit-wait-until/m-p/4452076#M1055609</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-18T19:10:49Z</dc:date>
    </item>
    <item>
      <title>Re: sumbit wait until</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sumbit-wait-until/m-p/4452077#M1055610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;before calling LIST_FROM_MEMORY you need to something this way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  do.
    call function 'SHOW_JOBSTATE'
      exporting
        jobcount         = p_jobc
        jobname          = p_jobn
      importing
        aborted          = v_aborted
        finished         = v_finished
        ready            = v_ready
        running          = v_running
        scheduled        = v_scheduled
      exceptions
        jobcount_missing = 1
        jobname_missing  = 2
        job_notex        = 3
        others           = 4.
    if v_aborted eq 'X'.
      exit.
    endif.
    if v_finished eq 'X'.
      select single * from tbtcp into wa_tbtcp1
                 where jobname eq p_jobn
                   and jobcount eq p_jobc.

      if sy-subrc eq 0.
        move wa_tbtcp1-listident to p_spono.
      endif.
      exit.
    endif.
    if v_count le 60.
      call function 'ENQUE_SLEEP'
        exporting
          seconds = 90.
      v_count = v_count + 1.
    endif.
  enddo.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Sep 2008 19:15:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sumbit-wait-until/m-p/4452077#M1055610</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2008-09-18T19:15:35Z</dc:date>
    </item>
    <item>
      <title>Re: sumbit wait until</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sumbit-wait-until/m-p/4452078#M1055611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks all.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Oct 2009 06:43:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sumbit-wait-until/m-p/4452078#M1055611</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-13T06:43:20Z</dc:date>
    </item>
  </channel>
</rss>

