Submit report in background

Hai friends,
Requirement is " I need to submit the report in background and program should execute only on every monday of the week.
Pl do the needful and clarify with hard coding.
Good answers expect good points.
Regards,
Vamsykrishna.

Hi Vamshy,
Execute Program with some values in selection-screen and save the selection screen values as some variant.
Goto SM36 tcode and give some job name,job class ..etc.Then Press
Start_Conidtion Button in Application tool bar.Here you choose Date/Time button and select Period_Values button in the same screen after choosing some coming Monday's date selected_start option.
here you can provide Weekly option in period_values option.
dont forget to save all those values you entered.
Execute the job in SM37 tcode
If its not solved your problem feel free to ask further.
You can achieve the same thing thru function modules like job_submit,job_close..
Reward if it useful to you
Thanks
Sivaparvathi

Similar Messages

  • Submit Report (Regarding Background Processing)

    Hi Guru's,
    I want help regarding Background Processing.
    I have developed a program which is running fine in forground but in Background mode no values are comming.
    All values are becomig Zero.
    Plz help.
    *--- Submit Report for 'COGI' (Postprocessing of Error Records from Automatic Goods Movements)
      SUBMIT coruaffw USING SELECTION-SCREEN '1000'
                      WITH  r_cumul = 'X'
                      EXPORTING LIST TO MEMORY
                    AND RETURN.
    *---- Get the List
      CALL FUNCTION 'LIST_FROM_MEMORY'
        TABLES
          listobject = it_list_tab
        EXCEPTIONS
          not_found  = 1
          OTHERS     = 2.
      IF sy-subrc = 0.
    *--- Convert to Ascii
        CALL FUNCTION 'LIST_TO_ASCI'
          TABLES
            listobject         = it_list_tab
            listasci           = it_asci_tab
          EXCEPTIONS
            empty_list         = 1
            list_index_invalid = 2
            OTHERS             = 3.
        IF sy-subrc <> 0.
    *      MESSAGE i000 WITH 'Problem in converting LIST to ASCII'.
        ENDIF.
        DESCRIBE TABLE it_asci_tab LINES w_cogi.
        w_cogi = w_cogi - 5.
      CALL FUNCTION 'LIST_FREE_MEMORY'
        TABLES
          listobject = it_list_tab.

    Hi Arbind,
                  You have used return you need to add the addition with.Try this way hope it works
    SUBMIT zreport EXPORTING LIST TO MEMORY
                    AND RETURN
                    WITH P_1 = P_1
                    WITH P_2 = P_2
                    WITH P_3 = P_3
                    WITH S_4  IN S_4
                    WITH S_5 IN S_5
                    WITH S_6 IN S_6.

  • Submit report in background on specific server

    Hi,
    I like to execute a report on a specific server in background. Is there a FM to do this. I know I can use SM36, but that's not the way I want it.
    Regards,
    GJ van Holland

    Hi,
    Here is a sample code.
    Report bkgnd.
    Perform dobackground.
    FORM dobackground.
    Local parameters declaration
      DATA : jobname    LIKE tbtcjob-jobname,
             jobcount   LIKE tbtcjob-jobcount.
      DATA : ws_spld    LIKE pri_params-pdest,
             ws_lstname LIKE pri_params-plist,
             ws_listext LIKE pri_params-prtxt.
      DATA : params     LIKE pri_params,
             arparams   LIKE arc_params,
             days(1)    TYPE n VALUE 2,
             valid      TYPE c.
      jobname    = 'job_name'.
      ws_lstname = 'list_name'.
      ws_listext = 'List_text'.
    Create a job
      CALL FUNCTION 'JOB_OPEN'
           EXPORTING
                jobname          = jobname
           IMPORTING
                jobcount         = jobcount
           EXCEPTIONS
                cant_create_job  = 1
                invalid_job_data = 2
                jobname_missing  = 3
                OTHERS           = 4.
    Set print parameters
      SELECT SINGLE spld INTO ws_spld FROM usr01 WHERE bname = sy-uname.
      CALL FUNCTION 'GET_PRINT_PARAMETERS'
        EXPORTING destination       = ws_spld
                  list_name         = ws_lstname
                  list_text         = ws_listext
                  immediately       = ' '
                  line_size         = 200
                  line_count        = 65
                  no_dialog         = c_true
        IMPORTING out_parameters         = params
                  out_archive_parameters = arparams
                  valid                  = valid.
    Submit the report to create spool with retreived print parameters
      SUBMIT your_program
        WITH    parameters_if_any
        TO      SAP-SPOOL
        SPOOL   PARAMETERS params
        ARCHIVE PARAMETERS arparams
        WITHOUT SPOOL DYNPRO
        VIA     JOB jobname NUMBER jobcount
        AND     RETURN.
    Close job
      CALL FUNCTION 'JOB_CLOSE'
           EXPORTING
                jobcount             = jobcount
                jobname              = jobname
                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
                invalid_target       = 8
                OTHERS               = 9.
    ENDFORM.
    Hope this was of use to you.
    Thanks,
    Susmitha

  • Submit report in background and get result into calling program

    Hi,
    I want to call the standard SAP program from Zprogram to create invoice using Submit. here the code
    SUBMIT RV60SBT1  TO SAP-SPOOL
                        SPOOL PARAMETERS print_parameters
                        WITHOUT SPOOL DYNPRO
                        VIA JOB name NUMBER number
                        WITH VKOR1 eq TVKO-VKORG
                        with X_VBELN eq gv_vbeln_so
                        with ALLEA eq 'X'
                        with ALLEL eq ''
                        AND RETURN.
    the standard SAP program creates invoice (billing document number). I want to get the billing document number which created using the above statement into the calling program.  ......could anyone pls tell me how to do this? ie how to read the billing document number in the calling program.
    Regrds
    shan
    Edited by: Shankar Raju Devadoss on Mar 21, 2011 9:00 AM

    Hi Shankar,
    You can try it in both ways.
    1.   By using the parameter ID VF. (GET PARAMETE ID)
    2.   Select the invoice numbers from the table VBRK for the current date (SY-DATUM) and
           sort it by time and get the latest invoice.
    Regards
    Hareesh Menon

  • Suppress spool in Submit Report

    Hi All
    I am doing a Submit Report in background in loop.
    I can check from the background job if the Submit was successful or not. But if it is successful I dont want any output in spool.
    By default it is creating a spool request for every Submit.
    But dont want any spool to be created as the submit will be executed no. of times.
    Kindly let me know if and how we can suppress the spool request. The code I have written is attached below.
    LOOP AT lt_t320a INTO ls_t320a.
               SUBMIT XYZ
                      WITH matnr   IN matnr
                      WITH werks   =  ls_t320a-werks
                      TO SAP-SPOOL SPOOL PARAMETERS print_parameters
                      WITHOUT SPOOL DYNPRO
                      VIA JOB job NUMBER jno
                      AND RETURN .
      ENDLOOP.
    Thanks in advance.
    Regards
    Prafulla

    Hi Narinder,
    I have tried without TO SAP-SPOOL but it doesn't work.
    Submit is automatically creating the spool request when run in background mode.
    Kind Regards
    Prafulla

  • Will SUBMIT report EXPORTING LIST TO MEMORY work, when Run in Background?

    You can use SUBMIT <report> EXPORTING LIST TO MEMORY, and then Call the FM LIST_FROM_MEMORY to get the Data.
    This works fine, when the Program is Run in Foreground. My question is, will it work when I Run the Program in Background? i.e. When I Run the Program in Background, will the SUBMIT Statement, Export the List to Memory? Because only then the FM LIST_FROM_MEMORY will get the Data.
    Any alternate solution to meet the same requirement will be appreciated.

    It works for me... my spool output looked like:
    11.01.2008          JC: Calling program - test list to memory                  1                                                                               
    ZLOCAL_JC_SDN_CALLING_PROGRAM                started at 12:54:29                        
    ZLOCAL_JC_SDN_CALLING_PROGRAM                call complete 12:54:30                     
    ZLOCAL_JC_SDN_CALLING_PROGRAM                started at 12:54:30                                                                               
    11.01.2008           JC: Called program - testing list to memory                                                                               
    ZLOCAL_JC_SDN_CALLED_PROGRAM                 was called at: 12:54:29                    
    for the following code:
    report zlocal_jc_sdn_calling_program.
    parameters:
      p_start(1)            type c.
    start-of-selection.
      perform testcase.
    *&      Form  testcase
    form testcase.
      data:
       lt_list              type table of abaplist.
      write: / sy-repid, 'started at', sy-uzeit.
      submit zlocal_jc_sdn_called_program
        exporting list to memory
        and return.
      write: / sy-repid, 'call complete', sy-uzeit.
      call function 'LIST_FROM_MEMORY'
        tables
          listobject = lt_list.
      write: / sy-repid, 'started at', sy-uzeit.
      call function 'WRITE_LIST'
        tables
          listobject = lt_list.
    endform.                    "testcase
    and
    report zlocal_jc_sdn_called_program.
    start-of-selection.
      write: / sy-repid, 'was called at:', sy-uzeit.

  • Submit in report in Background job.

    Hi, In a report trasaction MCBE is submitted. When this report is executed in back ground there is no spool list generated but in job log a selection version ID is shown. As a result submit ....exporting list to memory is failing.
    Is there any way to export the data during background execution of the report to ABAp memory??
    Thanks, Kapil,

    Hi,
    use submit to spool
    Refer to the code below
    CALL FUNCTION 'JOB_OPEN'
        EXPORTING
          jobname          = v_jobname
        IMPORTING
          jobcount         = v_jobcount
        EXCEPTIONS
          cant_create_job  = 1
          invalid_job_data = 2
          jobname_missing  = 3
          OTHERS           = 4.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    Submit Report
      SUBMIT rkaep000   TO SAP-SPOOL
                        VIA
                        JOB         v_jobname              " JOBNAME
                        NUMBER      v_jobcount             " UNIQUE ID OF JOB
                        IMMEDIATELY ' '
                        WITHOUT SPOOL DYNPRO               "SKIP PRINT DIALOG SCREEN
                        USING SELECTION-SCREEN 0100
                        WITH p_tcode = 'KSB1'
                        WITH kostl IN s_kostl
                        WITH kstgr = p_ksgru
                        WITH kstar IN s_kstar
                        WITH koagr = p_kagru
                        WITH r_budat IN s_budat
                        WITH p_disvar = v_layout
                        AND RETURN.
      COMMIT WORK.
    CLOSE THE JOB
      CALL FUNCTION 'JOB_CLOSE'
        EXPORTING
      AT_OPMODE                         = ' '
      AT_OPMODE_PERIODIC                = ' '
      CALENDAR_ID                       = ' '
      EVENT_ID                          = ' '
      EVENT_PARAM                       = ' '
      EVENT_PERIODIC                    = ' '
          jobcount                          = v_jobcount
          jobname                           = v_jobname
      LASTSTRTDT                        = NO_DATE
      LASTSTRTTM                        = NO_TIME
      PRDDAYS                           = 0
      PRDHOURS                          = 0
      PRDMINS                           = 0
      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                  =
    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 <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    regards
    Pankaj

  • SUBMIT REPORT AS A BACKGROUND JOB

    Hi all,
       I am executing one report in foreground in that report i want to submit one report which should be executed in background only. how it is possible to execute 2nd report in <b>background mode</b> only.
    Regards
    deepak

    This is the Basic code to Achieve that.
    Call Function 'JOB_OPEN'
    SUBMIT RSBDCBTC
    via background Job <Job info>
    With QIE = <QID Returned by BDC_OPEN_Group FM>
    AND RETURN.
    Call Function 'JOB_CLOSE'
    2) Also go through this
    DATA: lv_job_name         LIKE tbtco-jobname,
    lv_job_nr           LIKE tbtco-jobcount,
    lv_job_released     TYPE c,
    lv_job_start_sofort TYPE c,
    lv_print_parameters TYPE pri_params.
    lv_job_name = 'Z_BGPROGRAM'.
      CALL FUNCTION 'JOB_OPEN'
        EXPORTING
          jobname          = lv_job_name
        IMPORTING
          jobcount         = lv_job_nr
        EXCEPTIONS
          cant_create_job  = 1
          invalid_job_data = 2
          jobname_missing  = 3
          OTHERS           = 4.
      IF syst-subrc = 0.
    " submit job with all the selection screen params...
        SUBMIT (lv_job_name)
            WITH applfile = applfile " these are the parameters of the background program
            WITH p_lines = p_lines
            USER syst-uname " you must use this
           VIA JOB lv_job_name NUMBER lv_job_nr AND RETURN.
        IF sy-subrc = 0.
          CALL FUNCTION 'JOB_CLOSE'
            EXPORTING
              jobcount             = lv_job_nr
              jobname              = lv_job_name
              strtimmed            = 'X'
            IMPORTING
              job_was_released     = lv_job_released
            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.
          IF syst-subrc <> 0.
            MESSAGE i162(00) WITH
            'An error occured while closing the background job.'.
            STOP.
          ENDIF.
        ENDIF.
      ENDIF.
      SKIP 1.
      WRITE: / 'Background process', lv_job_name , 'called successfully' NO-GAP.
      WRITE: / 'You can check the job in transaction SM37'.
    Thanks

  • How to submit a ALV report in background

    Can you provide a peice of code to submit an ALV report in background?
    and is it possible to provide a  header information  dynmically, (changing when we say page down) in ALV?

    Hello,
    you can submit in background as a normal report.
    If you want to get the header informations. Handle through events. Events can be handle through registring the Event handler method.
    Eg:
    Events
        CREATE OBJECT eventhandler_object.
    register eventhandler
        SET HANDLER  eventhandler_object->handle_print_top_of_list
         FOR g_o_grid.
    CALL METHOD g_o_grid->set_table_for_first_display
    Reward if helps.
    Thanks,
    KrishnaKumar

  • Not able to Submit CJI5 report in background using Variant

    Hi Experts,
    Is it possible to fill the multiple screens through FM rs_create_variant.
    Reagrds,
    Nava

    Hi Ramesh,
    I am trying to submit the CJI5 report in back ground through variant. The varaint was created using FM RS_CREATE_VARIANT. it's throughing an error .
    IF I create variant directly via selectin screen then it's working fine.
    FYI.
    REPORT z_co99_cji5
           NO STANDARD PAGE HEADING
           MESSAGE-ID 00
           LINE-SIZE 290.
    PROGRAM      : Z_CO99_CJI5                                           *
    TITLE        : CJI5 In Background                                    *
    AUTHOR.      : Raja Nesanoor                                         *
    DATE WRITTEN : 27-Feb_2007                                           *
    REVTRAC      : xxxxxx                                                *
    PROGRAM FUNCTION:                                                    *
    To DISPLAY CJI5 Report in background                                 *
    PROGRAM TYPE : Executable  program                                   *
    DEV. CLASS   : XXXXXX                                                *
    LOGICAL DB   : NA                                                    *
    AUHTORIZATION CHECKS                                                 *
    Object           Authorization Fields             ABAP Fields        *
    S_TCODE                                                              *
                        BUKRS                          v_BUKRS           *
    CHANGE HISTORY                                                       *
    Date         Id        Name      Indicator   Description             *
    DATA : v_repid LIKE sy-repid VALUE 'ZRKPEP005' ,
    v_variant LIKE varid-variant VALUE 'V_CJI5' .
    DATA: BEGIN OF w_varid.
            INCLUDE STRUCTURE varid.
    DATA: END OF w_varid.
    DATA: BEGIN OF i_rsparams OCCURS 10.
            INCLUDE STRUCTURE rsparams.
    DATA: END OF i_rsparams.
    DATA: BEGIN OF i_rsparams1 OCCURS 10.
            INCLUDE STRUCTURE rsparams.
    DATA: END OF i_rsparams1.
    DATA: BEGIN OF i_varit OCCURS 2.
            INCLUDE STRUCTURE varit.
    DATA: END OF i_varit.
    DATA: BEGIN OF i_vscreens OCCURS 2.
            INCLUDE STRUCTURE rsdynnr.
    DATA: END OF i_vscreens.
    start-of-Selection
    START-OF-SELECTION.
      SET PARAMETER ID 'CAC' FIELD 'GC10'.
      SET PARAMETER ID 'PDB' FIELD '000000000001'.
      PERFORM populate_var_table.
      PERFORM create_variant.
      PERFORM submit_cji5.
    *& Form POPULATE_VAR_TABLE
    text
    --> p1 text
    <-- p2 text
    FORM populate_var_table .
      CLEAR w_varid .
      REFRESH i_varit .
      REFRESH i_rsparams .
      i_rsparams-selname = 'CN_NETNR'.
      i_rsparams-kind = 'S'.
      i_rsparams-sign = 'I'.
      i_rsparams-option = 'EQ'.
      i_rsparams-low = '90273536'.
      i_rsparams-high = space.
      APPEND i_rsparams.
      CLEAR : i_rsparams .
      i_rsparams-selname = 'CN_NETNR'.
      i_rsparams-kind = 'S'.
      i_rsparams-sign = 'I'.
      i_rsparams-option = 'EQ'.
      i_rsparams-low = '90274010'.
      i_rsparams-high = space.
      APPEND i_rsparams.
      CLEAR : i_rsparams .
      i_rsparams-selname = 'R_OBDAT'.
      i_rsparams-kind = 'S'.
      i_rsparams-sign = 'I'.
      i_rsparams-option = 'BT'.
      i_rsparams-low = space .
      i_rsparams-high = space.
      APPEND i_rsparams.
      CLEAR : i_rsparams .
      i_rsparams-selname = 'P_DISVAR'.
      i_rsparams-kind = 'P'.
      i_rsparams-sign = 'I'.
      i_rsparams-option = 'EQ'.
      i_rsparams-low = '1SAP' .
      APPEND i_rsparams.
      CLEAR : i_rsparams .
      i_rsparams-selname = 'P_USEDB'.
      i_rsparams-kind = 'P'.
      i_rsparams-sign = 'I'.
      i_rsparams-option = 'EQ'.
      i_rsparams-low = SPACE.
      APPEND i_rsparams.
      w_varid-mandt = sy-mandt.
      w_varid-report = v_repid.
      w_varid-variant = v_variant.
      w_varid-flag1 = space.
      w_varid-flag2 = space.
      w_varid-transport = space.
      w_varid-environmnt = 'A'. "Variant for batch and online
      w_varid-protected = space.
      w_varid-secu = space.
      w_varid-version = '0'.
      w_varid-ename = sy-uname.
      w_varid-edat = sy-datum.
      w_varid-etime = sy-uzeit.
      w_varid-aename = space.
      w_varid-aedat = space.
      w_varid-aetime = space.
      w_varid-mlangu = sy-langu.
      i_varit-mandt = sy-mandt.
      i_varit-langu = sy-langu.
      i_varit-report = w_varid-report.
      i_varit-variant = w_varid-variant.
      i_varit-vtext = 'CO99-OUTPUT'.
      APPEND i_varit.
    ENDFORM. " POPULATE_VAR_TABLE
    *& Form CREATE_VARIANT
    text
    --> p1 text
    <-- p2 text
    FORM create_variant .
    data: h_rc like sy-subrc.
    *Check variant exists.
      CALL FUNCTION 'RS_VARIANT_EXISTS'
           EXPORTING
                report              = v_repid
                variant             = v_variant
           IMPORTING
                R_C                 = h_rc
             EXCEPTIONS
                not_authorized      = 01
                no_report           = 02
                report_not_existent = 03
                report_not_supplied = 04.
      IF h_rc = 0.
        CALL FUNCTION 'RS_CHANGE_CREATED_VARIANT'
             EXPORTING
                  curr_report               = v_repid
                  curr_variant              = v_variant
                  vari_desc                 = w_varid
             TABLES
                  vari_contents             = i_rsparams
                  vari_text                 = i_varit
             EXCEPTIONS
                  illegal_report_or_variant = 01
                  illegal_variantname       = 02
                  not_authorized            = 03
                  not_executed              = 04
                  report_not_existent       = 05
                  report_not_supplied       = 06
                  variant_doesnt_exist      = 07
                  variant_locked            = 08
                  selections_no_match       = 09.
        COMMIT WORK.
      ELSE.
        CALL FUNCTION 'RS_CREATE_VARIANT'
             EXPORTING
                  curr_report               = v_repid
                  curr_variant              = v_variant
                  vari_desc                 = w_varid
             TABLES
                  vari_contents             = i_rsparams
                  vari_text                 = i_varit
             EXCEPTIONS
                  illegal_report_or_variant = 1
                  illegal_variantname       = 2
                  not_authorized            = 3
                  not_executed              = 4
                  report_not_existent       = 5
                  report_not_supplied       = 6
                  variant_exists            = 7
                  variant_locked            = 8
                  OTHERS                    = 9.
        COMMIT WORK.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
      ENDIF.
    ENDFORM. " CREATE_VARIANT
    *& Form submit_cji5
    text
    --> p1 text
    <-- p2 text
    FORM submit_cji5 .
      CALL FUNCTION 'SUBST_START_REPORT_IN_BATCH'
           EXPORTING
                iv_jobname                    = 'TEST_JOB'
                iv_repname                    = v_repid
                iv_varname                    = v_variant
                iv_authcknam                  = sy-uname
                iv_language                   = sy-langu
                iv_varianttext                = 'CO99-OUTPUT'
           TABLES
                tt_reportparam                = i_rsparams
           EXCEPTIONS
                variant_exist_check_failed    = 1
                variant_update_failed         = 2
                variant_update_not_authorized = 3
                variant_update_no_report      = 4
                variant_update_no_variant     = 5
                variant_update_variant_locked = 6
                variant_insert_failed         = 7
                variant_insert_not_authorized = 8
                variant_insert_no_report      = 9
                variant_insert_variant_exists = 10
                variant_insert_variant_locked = 11
                variant_write_failed          = 12
                no_batch_service              = 13
                no_server_list                = 14
                batch_scheduling_failed       = 15
                OTHERS                        = 16.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.
    Thanks
    Nava

  • Submit report background ------ problem

    Hi Friends,
    This is regarding submit program in background.
    I am calling program  like this..
              SUBMIT   ZXXXX
         VIA JOB name NUMBER number
         WITH P_MODE    EQ 'N'
         TO SAP-SPOOL
         SPOOL PARAMETERS print_parameters
         WITHOUT SPOOL DYNPRO
         AND RETURN.
    With this Job is creating successfully and status showing finished. But it seems program was not executed. no action has performed. time taken is 0 seconds
    the same code I tested in debug mode by commenting 
    *     VIA JOB name NUMBER number
    in the above statement.
    it is working fine. could you pls help me I want submit my program in background.
    for your information. Before submit I am using function module JOB_OPEN.
    and after submit I am using JOB_CLOSE.
    Pls help me. very urgent.
    Thanks in advance.
    Raghunath

    You can check the job status in SM37. Here is a working example, see what's different in your code:
    CONCATENATE 'Z' p_vkorg '_POST_RETURNS' INTO jobname.
      CLEAR jobcount.
      CALL FUNCTION 'JOB_OPEN'
        EXPORTING
          jobname  = jobname
        IMPORTING
          jobcount = jobcount.
      IF sy-subrc <> 0.
      ENDIF.
      SUBMIT ...
              WITH p...
              VIA JOB jobname
              NUMBER jobcount
              USER user_name
           AND RETURN.
    * Close the job and run immediately
      CALL FUNCTION 'JOB_CLOSE'
        EXPORTING
          jobcount  = jobcount
          jobname   = jobname
          strtimmed = 'X'.            " Start immediately

  • Skip Error message in submit report

    Hello Gurus,
    I am using SUBMIT <REPORT> command inside a loop of my calling report. For one record the SUBMIT <report> is throwing an eror message due to which my report is getting stopped by displaying the error message.
    My requirement is to skip the record if there is any error in SUBMIT <report> and process rest of the records.
    Please help me out.

    Hi,
    Vasanth's idea regarding doing a CALL FUNCTION IN BACKGRUOND TASK does work, unless you need to get back some information from the SUBMIT, as export parameters can't be set when using IN BACKGRUOND TASK.
    As i need to get data from the SUBMIT, i'll keep looking for other alternatives, so other ideas are still welcome...
    Regards,
    mr.
    Hi Manuel,
    Try calling report in background task like below:
        CALL FUNCTION 'JOB_OPEN'
          EXPORTING
            jobname          = c_name                    "this name can be any name defined in constants(you do not have to create a job name anywhere in system or SM36)
          IMPORTING
            jobcount         = w_number
          EXCEPTIONS
            cant_create_job  = 1
            invalid_job_data = 2
            jobname_missing  = 3
            OTHERS           = 4.
    *" Job opened successfully
        IF sy-subrc EQ c_0.
    *" Call program to process IDoc
          SUBMIT ZSubmit WITH <any value>                                                      " e.g. p_field1 EQ <value>
                          VIA JOB c_name NUMBER w_number
                          AND RETURN.
    [Note: In ZSubmit report you can send the data to calling program through ABAP memory i.e. Use EXPORT parameter to export data
    Ex: constants: c_memory(7) type c value 'MEMORY1'.
    At the end of ZSubmit report, before returning to the calling program write below statement:
    EXPORT i_message TO MEMORY ID c_memory1.]
    *" Successful processing of IDoc
          IF sy-subrc EQ c_0.
    "Here you can import data from ZSubmit report
    import i_message from memory id c_memory1.
    After retrieving the data, free the memory otherwise it will affect the performance of your report:
    Free memory id c_memory1.
    *" Close the job
            CALL FUNCTION 'JOB_CLOSE'
              EXPORTING
                jobcount             = w_number
                jobname              = c_name
                strtimmed            = c_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.
    Hope this helps!
    Regards,
    Saba

  • JOB_OPEN, SUBMIT REPORT VIA JOB, JOB_CLOSE, How to get result?

    Hi Friends,
    I am calling reports using jobs as calling job_open, submit report via job.., and job_close. But I want to the output/result of the report. How can I do this?
    Thanks.

    Hello nkara,
    Welcome to SDN!!!
    Check this thread:
    background grid
    REgards,
    Vasanth

  • How to get data from the called program using SUBMIT in a background job?

    Hi Experts,
    I've a program which creates a background job using JOB_OPEN and JOB_CLOSE function modules.
    Between the above function modules I need to call a program using SUBMIT VIA JOB statement.
    My problem is, How do I fetch some data in an internal table in the called program to the calling program after the SUBMIT statement?
    I tried to EXPORT and IMPORT the data, but they are giving a failed sy-subrc when using this background job.
    Kindly let me know your inputs and valuable suggestions.

    Kumar,
    When we execute a program as a background job then the output will be sent to Spool which needs to be fetched again.I guess we need to use Submit via spool as mentioned by Rajat.
    Check these threads to get some idea
    submit report to spool & import spool id
    Re: Generate Spool for a report
    K.Kiran.

  • SUBMIT issue in background

    Hi experts,
           I am submitting the other program which is using the LDB in my program. When i execute the program in foreground it is working properly. But when i execute the same program in background, the job is getting cancelled by giving the error message as 'fill in all required entry fields'. But there are no mandatory fields in calling program. I have been strugling with this from last one week. please help me regarding this issue

    u have to enter job name.
    SUBMIT <REPORT>
           USER <USER> VIA JOB <JOB NAME> NUMBER <JOB NUMBER>
           WITH PARAM1 =
           WITH PARAM2 =
              AND RETURN
    Refer this Thread:
    how to pass parameters to a background job?

Maybe you are looking for

  • HT1420 if you deortherize all 5 registered computers do you loose your music library

    Apparently i have registered my phone and 2 ipods to 5 computers over the years.  I have my old laptop which i have tried to deothorize but says it was never authorized.  I am wondering if i opt to  deothorize all computers, do i loose all of my musi

  • Trying to use Message Signing with Webservices and getting exception!

    Here is the exception I'm getting.... java.rmi.RemoteException: SOAP Fault:javax.xml.rpc.soap.SOAPFaultException: [Security:090377]Identity Assertion Failed, weblogic.security.spi.IdentityAssertionException: [Security:090245]No mapping for Identity U

  • Printing Problems with Lightroom 5

    I cannot get Lightroom 5 to print to my Epson 3880 in Mac OS X 10.8.4.  Lightroom 4 works just fine.  However, from Lightroom 5, it starts spooling and then nothing happens. I've tried reinstalling drivers, restarting CUPS, rebooting, restarting Ligh

  • Remove duplicates items in List

    I created a WebAPI and its calling an SQL Server to get my data. I created a List<> to populate and get those items back to UI. However, in my output there are duplicates due to the data. Is there a way to remove the duplicate strings before passing

  • Repeating Header from the Second Page

    Hi All, i want to Repeat the Header from the Second page but it is not repeat. i tried in the following ways 1.I have given "Repeat as a header row" in the table properties 2. I Tried with Start Body and End Body(here i am using a this from first pag