<?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 SUBMIT in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit/m-p/3966078#M947279</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 have one requirement i.e.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;while executing one program, in the middle of its execution i want to submit one more report that one has selection screen and i want to execute and return to the main program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for this i can use SUBMIT prgname VIA SELECTION SCREEEN using SLECTION_SET 'Variant' and return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but it will execute the program in the foreground now my requirement is i want to submit that prg in the back ground and it should return to the prg from where it called for this what i have to do....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Jun 2008 10:04:29 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-18T10:04:29Z</dc:date>
    <item>
      <title>SUBMIT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit/m-p/3966078#M947279</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 have one requirement i.e.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;while executing one program, in the middle of its execution i want to submit one more report that one has selection screen and i want to execute and return to the main program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for this i can use SUBMIT prgname VIA SELECTION SCREEEN using SLECTION_SET 'Variant' and return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but it will execute the program in the foreground now my requirement is i want to submit that prg in the back ground and it should return to the prg from where it called for this what i have to do....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2008 10:04:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit/m-p/3966078#M947279</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-18T10:04:29Z</dc:date>
    </item>
    <item>
      <title>Re: SUBMIT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit/m-p/3966079#M947280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use the submit statement between the function modules..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function  job_open &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;submit..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function  job_close..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2008 10:08:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit/m-p/3966079#M947280</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-18T10:08:03Z</dc:date>
    </item>
    <item>
      <title>Re: SUBMIT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit/m-p/3966080#M947281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&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>Wed, 18 Jun 2008 10:11:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit/m-p/3966080#M947281</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-18T10:11:35Z</dc:date>
    </item>
    <item>
      <title>Re: SUBMIT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit/m-p/3966081#M947282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in my code i have written like this but it is not working wht might be the reason&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA:
    lw_name LIKE tbtcjob-jobname .

  lw_name = 'USBANK_INVOICES'.


  CALL FUNCTION 'JOB_OPEN'
    EXPORTING
      jobname          = lw_name
    IMPORTING
      jobcount         = w_jobcount
    EXCEPTIONS
      cant_create_job  = 1
      invalid_job_data = 2
      jobname_missing  = 3
      OTHERS           = 4.


  IF sy-subrc = 0.
    SUBMIT rfbibl00
           VIA JOB lw_name NUMBER w_jobcount
           USING SELECTION-SET 'USBANK_INV'
           AND RETURN.
    IF sy-subrc EQ 0.
      CALL FUNCTION 'JOB_CLOSE'
        EXPORTING
          jobcount             = w_jobcount
          jobname              = lw_name
          strtimmed            = 'X'
        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.
    ENDIF.
  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2008 10:15:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit/m-p/3966081#M947282</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-18T10:15:31Z</dc:date>
    </item>
    <item>
      <title>Re: SUBMIT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit/m-p/3966082#M947283</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;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: gv_jobcount TYPE tbtcjob-jobcount,
          gv_jobname TYPE tbtcjob-jobname,
          gs_spool TYPE pri_params.


FORM background_job .

  gs_spool-pdest = 'SPOOL'.
  gv_jobname = 'ZZ'.

  CALL FUNCTION 'JOB_OPEN'
    EXPORTING
*   DELANFREP              = ' '
*   JOBGROUP               = ' '
      jobname                = 'ZE016'
*   SDLSTRTDT              = NO_DATE
*   SDLSTRTTM              = NO_TIME
*   JOBCLASS               =
   IMPORTING
     jobcount               = gv_jobcount
* CHANGING
*   RET                    =
 EXCEPTIONS
   cant_create_job        = 1
   invalid_job_data       = 2
   jobname_missing        = 3
   OTHERS                 = 4
            .
  IF sy-subrc &amp;lt;&amp;gt; 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.

  CALL FUNCTION 'JOB_SUBMIT'
    EXPORTING
*   ARCPARAMS                        =
      authcknam                      = sy-uname
   commandname                       = ' '
   operatingsystem                   = ' '
   extpgm_name                       = ' '
   extpgm_param                      = ' '
   extpgm_set_trace_on               = ' '
   extpgm_stderr_in_joblog           = 'X'
   extpgm_stdout_in_joblog           = 'X'
   extpgm_system                     = ' '
   extpgm_rfcdest                    = ' '
   extpgm_wait_for_termination       = 'X'
      jobcount                       = gv_jobcount
      jobname                        = gv_jobname
   language                          = sy-langu
   priparams                         = gs_spool
     report                          = sy-repid
     variant                         = p_var1
* IMPORTING
*   STEP_NUMBER                      =
 EXCEPTIONS
   bad_priparams                     = 1
   bad_xpgflags                      = 2
   invalid_jobdata                   = 3
   jobname_missing                   = 4
   job_notex                         = 5
   job_submit_failed                 = 6
   lock_failed                       = 7
   program_missing                   = 8
   prog_abap_and_extpg_set           = 9
   OTHERS                            = 10
            .
  IF sy-subrc &amp;lt;&amp;gt; 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.

  gs_bckg_entrylog-jobname = gv_jobname.
  gs_bckg_entrylog-jobcount = gv_jobcount.
  gs_bckg_entrylog-report = sy-repid.
  gs_bckg_entrylog-variant = p_var1.

  IF sy-msgty EQ 'E'.
    gs_bckg_entrylog-ricon = icon_led_red.
  ELSEIF sy-msgty EQ 'S'.
    gs_bckg_entrylog-ricon = icon_led_green.
  ELSEIF sy-msgty EQ 'W'.
    gs_bckg_entrylog-ricon = icon_led_yellow.
  ELSE.
    gs_bckg_entrylog-ricon = icon_led_yellow.
  ENDIF.

  APPEND gs_bckg_entrylog TO gt_bckg_entrylog.
  CLEAR gs_bckg_entrylog.

  PERFORM bckg_log.

  CALL FUNCTION 'JOB_CLOSE'
    EXPORTING
   at_opmode                         = ' '
   at_opmode_periodic                = ' '
   calendar_id                       = ' '
   event_id                          = ' '
   event_param                       = ' '
   event_periodic                    = ' '
      jobcount                       = gv_jobcount
      jobname                        = 'ZZ'
*   LASTSTRTDT                       = NO_DATE
*   LASTSTRTTM                       = NO_TIME
   prddays                           = 0
   prdhours                          = 0
   prdmins                           = 15
   prdmonths                         = 0
   prdweeks                          = 0
   predjob_checkstat                 = ' '
   pred_jobcount                     = ' '
   pred_jobname                      = ' '
*   SDLSTRTDT                        = NO_DATE
*   SDLSTRTTM                        = NO_TIME
*   STARTDATE_RESTRICTION            = BTC_PROCESS_ALWAYS
   strtimmed                         = 'X'
   targetsystem                      = ' '
   start_on_workday_not_before       = sy-datum
   start_on_workday_nr               = 0
   workday_count_direction           = 0
*   RECIPIENT_OBJ                    =
   targetserver                      = ' '
   dont_release                      = ' '
   targetgroup                       = ' '
*   DIRECT_START                     =
* IMPORTING
*   job_was_released                 = gv_released
* CHANGING
*   RET                              =
 EXCEPTIONS
   cant_start_immediate              = 1
   invalid_startdate                 = 2
   jobname_missing                   = 3
   job_close_failed                  = 4
   job_nosteps                       = 5
   job_notex                         = 6
   lock_failed                       = 7
   invalid_target                    = 8
   OTHERS                            = 9
            .
  IF sy-subrc &amp;lt;&amp;gt; 0.
*    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
*            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.



ENDFORM.                    " background_job&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help you,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Plz reward if useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Dhanashri.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Dhanashri Pawar on Jun 18, 2008 12:18 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2008 10:17:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit/m-p/3966082#M947283</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-18T10:17:36Z</dc:date>
    </item>
    <item>
      <title>Re: SUBMIT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit/m-p/3966083#M947284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in your program in submit statement you didnt specify the jobname&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUBMIT zmio_manu_dmd_fcst_unit_extr WITH SELECTION-TABLE it_seltab2 VIA &lt;STRONG&gt;JOB jobname&lt;/STRONG&gt;  NUMBER jobnum AND RETURN.&lt;/P&gt;&lt;P&gt;  IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;    WRITE: /5 'Error when submitting', jobname.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2008 10:19:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit/m-p/3966083#M947284</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-18T10:19:36Z</dc:date>
    </item>
  </channel>
</rss>

