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

Similar Messages

  • 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.

  • Hwo to get the spool number from report output

    Hi,
    I am displaying some output in the report using write statements and within my program I need to collect the output written by write statements and send it as an email.So for that I need to generate the spool number and I am using the below code to do that
    CONSTANTS:
        l_linsz TYPE sy-linsz VALUE 201, " Line size
        l_paart TYPE sy-paart VALUE 'X_65_132'.  " Paper Format
      l_uname = sy-uname .
      l_repid = sy-repid .
    *-- Setup the Print Parmaters
      CALL FUNCTION 'GET_PRINT_PARAMETERS'
        EXPORTING
          authority              = space
          copies                 = '1'
          cover_page             = space
          data_set               = space
          department             = space
          destination            = space
          expiration             = '1'
          immediately            = space
          new_list_id            = k_x
          no_dialog              = k_x
          user                   = l_uname
        IMPORTING
          out_parameters         = l_mstr_print_parms
          valid                  = l_mc_valid
        EXCEPTIONS
          archive_info_not_found = 1
          invalid_print_params   = 2
          invalid_archive_params = 3
          OTHERS                 = 4.
    *-- Make sure that a printer destination has been set up
    *-- If this is not done the PDF function module ABENDS
      IF l_mstr_print_parms-pdest = space.
        l_mstr_print_parms-pdest = k_lp01.
      ENDIF.
    *-- Explicitly set line width, and output format so that
    *-- the PDF conversion comes out OK
      l_mstr_print_parms-linsz = l_linsz.
      l_mstr_print_parms-paart = l_paart.
      l_variante = sy-slset.
    * submitting the spool request
      *SUBMIT (l_repid) TO SAP-SPOOL*
                       *SPOOL PARAMETERS l_mstr_print_parms*
                       *WITHOUT SPOOL DYNPRO*
                       *AND RETURN.*
    *Calculating the lenth of report name
      lv_len = STRLEN( l_repid ) .
    *consutrucing the database variable  rq2name to search the spool
    *request
      IF lv_len >= 9 .
        CONCATENATE l_repid+0(9)
                    l_uname+0(3) INTO lc_rq2name .
      ELSE.
        lv_len = 9 - lv_len .
        DO lv_len TIMES .
          CONCATENATE lv_temp '_' INTO lv_temp .
        ENDDO.
        CONCATENATE l_repid lv_temp
                    l_uname INTO lc_rq2name .
      ENDIF.
    *selecting the spool request using the above consructed varibale
      SELECT   * FROM tsp01 INTO TABLE lt_tsp01
              WHERE rq2name = lc_rq2name .
    *sorting the interbla table
      SORT  lt_tsp01 BY rqcretime DESCENDING .
    *reading the first spool request
      READ TABLE lt_tsp01 INTO ls_tsp01 INDEX 1.
    but the problem with the above code is I am using variants to execute the report but when the above piece of code is getting executed it is clearing all the variant values on the selection screen and it is defaulting the values on the selection screen.
    Is there any way i can execute the above code without any problem in the selection screen.
    Thanks
    Bala Duvvuri

    Hello Bala,
    I wouldn't SUBMIT the same program to get the Spool number. You can achieve the same by [NEW-PAGE PRINT ON|http://help.sap.com/abapdocu_702/en/abapnew-page_print.htm#!ABAP_ADDITION_1@1@] command.
    Check the code snippet i've provided below:
    DATA: spfli_wa         TYPE spfli,
          print_parameters TYPE pri_params,
          valid_flag       TYPE c LENGTH 1.
    START-OF-SELECTION.
      CALL FUNCTION 'GET_PRINT_PARAMETERS'
        EXPORTING
          no_dialog            = 'X'
        IMPORTING
          out_parameters       = print_parameters
          valid                = valid_flag
        EXCEPTIONS
          invalid_print_params = 2
          OTHERS               = 4.
      IF valid_flag = 'X' AND sy-subrc = 0.
    *   1. Write the output to the output list(no spool is generated)
        SELECT carrid connid
               FROM spfli
               INTO CORRESPONDING FIELDS OF spfli_wa.
          WRITE: / spfli_wa-carrid, spfli_wa-connid.
        ENDSELECT.
    *   2. Write the output to SAP spool(no list is displayed)
        NEW-PAGE PRINT ON PARAMETERS print_parameters NO DIALOG.
        SELECT carrid connid
               FROM spfli
               INTO CORRESPONDING FIELDS OF spfli_wa.
          WRITE: / spfli_wa-carrid, spfli_wa-connid.
        ENDSELECT.
        NEW-PAGE PRINT OFF.
        MESSAGE i000(zibi027) WITH 'Spool' sy-spono 'is generated!!!'.
        "You can use the spool number (SY-SPONO) to email the list output
      ENDIF.
    Hope this helps.
    BR,
    Suhas

  • Using the submit report

    Hi,
    can any one help me out how to get the output from a report by using the submit report . with out disturbing the report sequence of the calling programme
    ie need to capture the output of a report in back ground and use the output in the calling report with out any calling screens or stopping the report sequence,,,,,,,,,,,,
    ThankX in advance...............

    Hi Siva
    do it like this
    Construct job name
    PERFORM job_name USING v_text
    v_vsg
    CHANGING v_jobname.
    Open job
    PERFORM job_open USING v_jobname
    CHANGING p_jobcnt.
    Submit Job
    SUBMIT RLKOMM40
    WITH p_warehno = warehouse number
    WITH p_group = group
    VIA
    JOB v_jobname NUMBER p_jobcnt
    TO SAP-SPOOL WITHOUT SPOOL DYNPRO
    WITH immediately = space
    WITH keep_in_spool = 'X' AND RETURN.
    *& Form job_name
    text
    FORM job_name USING p_v_text
    p_v_vsg
    CHANGING p_v_jobname.
    CONCATENATE p_v_text p_v_vsg INTO p_v_jobname.
    CONDENSE p_v_jobname.
    ENDFORM. " job_name
    *& Form job_open
    text
    FORM job_open USING p_v_jobname
    CHANGING p_p_jobcnt.
    CALL FUNCTION 'JOB_OPEN'
    EXPORTING
    jobname = p_v_jobname
    IMPORTING
    jobcount = p_p_jobcnt
    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.
    ENDFORM. " job_open
    Do Reward if helpful.
    Regards
    Azad.

  • 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

  • Smartforms: Appending Spool o/p(report)  to  PDF generated by SSF

    Dear Murugesh
    I have attached the code for Appending Spool o/p(report)  to  PDF generated by SSF below
      Please suggest as i will have 2 finish by this SAT.
    (Hint : Under 1 SOrdr there may be several line items==>
      The material with ref 2 every line-item either may be configurable(ZPL3) or nonconfigurable(ZA3C)) .
    *ENCLOSER TO PACKING LIST
    SELECT VBELN POSNR INTO CORRESPONDING FIELDS OF TABLE T_VBAP
                        FROM  VBAP
                        WHERE VBELN = SSORD.
    *For capturing the o/p pages from ZPL3 and consolidating into table
    *T_OTF to get single PDF
      LOOP AT T_VBAP INTO T_VBAP.
        ITNO = T_VBAP-POSNR.
      SELECT SINGLE * FROM ZPP_PLCMH WHERE VBELN = SSORD
                                     AND   POSNR = ITNO.
       IF SY-SUBRC EQ 0.
         SET PARAMETER  ID: 'AUN' FIELD SSORD ,
                            'APO' FIELD ITNO.
         CALL TRANSACTION 'ZPCE' AND SKIP FIRST SCREEN.
         IMPORT A = T_OTF2 FROM  MEMORY ID 'MEMID'.
         LOOP AT T_OTF2  INTO T_OTF2.
           APPEND T_OTF2 TO T_OTF.
         ENDLOOP.
         REFRESH T_OTF2.
       ELSE.
    *For capturing the o/p pages from ZA3C and Appending
    *at the end of the PDF file just created by the above code
        SELECT SINGLE * FROM ZPLH WHERE VBELN = SSORD
                                  AND   POSNR = ITNO.
         IF SY-SUBRC EQ 0.
           SET PARAMETER  ID: 'AUN' FIELD SSORD,
                            : 'APO' FIELD ITNO.
           CALL TRANSACTION 'ZPNE' AND SKIP FIRST SCREEN.
           IMPORT B = SPOOL_ID  FROM  MEMORY ID 'MEMID2'.
           CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
             EXPORTING
               SRC_SPOOLID                    = SPOOL_ID
               NO_DIALOG                      = ''
               DST_DEVICE                     = E_DEVTYPE
              PDF_DESTINATION                = 'LOHP'
            IMPORTING
               PDF_BYTECOUNT                  = BTC
             PDF_SPOOLID                    =
             LIST_PAGECOUNT                 =
             BTC_JOBNAME                    =
             BTC_JOBCOUNT                   =
            TABLES
               PDF                            = T_SPOOL_2_PDF
           EXCEPTIONS
             ERR_NO_ABAP_SPOOLJOB           = 1
             ERR_NO_SPOOLJOB                = 2
             ERR_NO_PERMISSION              = 3
             ERR_CONV_NOT_POSSIBLE          = 4
             ERR_BAD_DESTDEVICE             = 5
             USER_CANCELLED                 = 6
             ERR_SPOOLERROR                 = 7
             ERR_TEMSEERROR                 = 8
             ERR_BTCJOB_OPEN_FAILED         = 9
             ERR_BTCJOB_SUBMIT_FAILED       = 10
             ERR_BTCJOB_CLOSE_FAILED        = 11
             OTHERS                         = 12
           IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
           ENDIF.
    ELSE.
           TEXT02 = ITNO.
           MESSAGE I014(ZQOTBANK) WITH TEXT02.
       ENDIF.
    ENDIF.
    ENDLOOP.
    CALL FUNCTION 'CONVERT_OTF_2_PDF'
      EXPORTING
        USE_OTF_MC_CMD               = 'X'
      ARCHIVE_INDEX                =
    IMPORTING
        BIN_FILESIZE                 = BIN_FILESIZE
    TABLES
        OTF                          = T_OTF
        DOCTAB_ARCHIVE               = T_DOC
        LINES                        = T_LINES
    EXCEPTIONS
       ERR_CONV_NOT_POSSIBLE        = 1
       ERR_OTF_MC_NOENDMARKER       = 2
       OTHERS                       = 3.
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        BIN_FILESIZE                    = BIN_FILESIZE
        FILENAME                        = 'C:\SD6.pdf'
        FILETYPE                        = 'BIN'
        APPEND                          = 'X'
      WRITE_FIELD_SEPARATOR           = ' '
      HEADER                          = '00'
      TRUNC_TRAILING_BLANKS           = ' '
      WRITE_LF                        = 'X'
      COL_SELECT                      = ' '
      COL_SELECT_MASK                 = ' '
      DAT_MODE                        = ' '
      CONFIRM_OVERWRITE               = ' '
      NO_AUTH_CHECK                   = ' '
      CODEPAGE                        = ' '
      IGNORE_CERR                     = ABAP_TRUE
      REPLACEMENT                     = '#'
      WRITE_BOM                       = ' '
      TRUNC_TRAILING_BLANKS_EOL       = 'X'
    IMPORTING
        FILELENGTH                      = BIN_FILESIZE
      TABLES
        DATA_TAB                        = T_LINES
      FIELDNAMES                      =
    EXCEPTIONS
      FILE_WRITE_ERROR                = 1
      NO_BATCH                        = 2
      GUI_REFUSE_FILETRANSFER         = 3
      INVALID_TYPE                    = 4
      NO_AUTHORITY                    = 5
      UNKNOWN_ERROR                   = 6
      HEADER_NOT_ALLOWED              = 7
      SEPARATOR_NOT_ALLOWED           = 8
      FILESIZE_NOT_ALLOWED            = 9
      HEADER_TOO_LONG                 = 10
      DP_ERROR_CREATE                 = 11
      DP_ERROR_SEND                   = 12
      DP_ERROR_WRITE                  = 13
      UNKNOWN_DP_ERROR                = 14
      ACCESS_DENIED                   = 15
      DP_OUT_OF_MEMORY                = 16
      DISK_FULL                       = 17
      DP_TIMEOUT                      = 18
      FILE_NOT_FOUND                  = 19
      DATAPROVIDER_EXCEPTION          = 20
      CONTROL_FLUSH_ERROR             = 21
      OTHERS                          = 22
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Thanx
    Moni
    Message was edited by: md monirujjaman

    Hello,
    Can you explain the problem in detail plz.
    I do see that the logic which was proposed is implemented in code.
    please check at various places, in run time the following points:
    1. Spool ID exported into ABAP Memory.
    2. Contents of the Main OTF IntTab.
    3. Conversion of the Spool to PFD.Check whether SUBRC = 0. <b>Un-comment all the Exceptions in your FMs where-ever you make a call in your program.</b>
       If this conversion of Spool to PDF is successful, you can choose "Append" option from the popup.
    Hope this helps you. Or if you have any specific query let me know.
    Regards, Murugesh AS

  • Submit report using internal table

    Hi Experts!!,
    REPORT 1
    TYPES:   BEGIN OF ty_out_table,
             partner LIKE /sapsll/pntbp-partner,
             bpvsy   LIKE /sapsll/pntbp-bpvsy,
             country LIKE adrc-country,
            END OF ty_out_table.
    internal table declaration & definition
    DATA:  gt_out_table TYPE STANDARD TABLE OF ty_out_table
                   WITH KEY partner
                            bpvsy.
    I have data in internal table gt_out_table.
    I want to pass data gt_out_table in report 2. using SUBMIT REPORT.
    How to do that ?
    REPORT 2
    select-options: s_partnr  for  /sapsll/pntbp-bpvsy.
    parameters: p_upd,
                      p_value .
    please suggest.
    Thanks
    Anee

    hai,
    ... WITH SELECTION-TABLE rspar
    Effect
    If you specify this addition, parameters and selection criteria on the selection screen are supplied from an internal table rspar. You must specify an internal table with the row type RSPARAMS for rspar. The structured data type RSPARAMS is defined in the ABAP Dictionary and has the following components, all of which are data type CHAR:
    SELNAME (length 8),
    KIND (length 1),
    SIGN (length 1),
    OPTION (length 2),
    LOW (length 45),
    HIGH (length 45).
    To supply parameters and selection criteria for the selection screen with specific values, the lines in the internal table rspar must contain the following values:
    SELNAME must contain the name of a parameter or selection criterion for the selection screen in block capitals
    KIND must contain the type of selection screen component (P for parameters, S for selection criteria)
    SIGN, OPTION, LOW, and HIGH must contain the values specified for the selection table columns that have the same names as the selection criteria; in the case of parameters, the value must be specified in LOW and all other components are ignored.
    If the name of a selection criterion is repeated in rspar, this defines a selection table containing several lines and passes it on to the selection criterion. If parameter names occur several times, the last value is passed on to the parameter.
    The contents of the parameters or selection tables for the current program can be entered in the table by the function module RS_REFRESH_FROM_SELECTOPTIONS.
    Notes
    In contrast to selection tables, the data types of the components LOW and HIGH in table rspar are always of type CHAR and are converted to the type of the parameter or selection criterion during transfer, if necessary.
    When entering values, you must ensure that these are entered in the internal format of the ABAP values, and not in the output format of the screen display.

  • Submit report to get output list

    Hi friends,
       I have one requirement to take output list of a transaction in one internal table.
    As the transaction is very much interactive , that perticular internal table gets populated somewhere in the middle of the standard program...later on that table undergoes further processing  to cope up with he interaction...
    using  SUBMIT report ,  we can export it to memory
    and using  FM  'LIST_FROM_MEMORY' we can get it back as following.
    list_tab contains data in two fields RFCSIZE  and RFCRECORD in numbers only...
    Submit   report_name  with SELECTION-TABLE SELTAB
            exporting list to Memory and return.
    CALL FUNCTION 'LIST_FROM_MEMORY'
      TABLES
        listobject = list_tab
      EXCEPTIONS
        not_found  = 1
        OTHERS     = 2.
       BUT , Can we get the same output list (i.e before interaction) in one internal table...
    thanks

    Hi,
    You can check whether the list is exported in between before the submit.
    Supposed it is exported before the interaction den you can import it ..Just check the value is fetched and stored in a temporary table.
    Is it a csutom program or standard SAP one..?
    Hope this helps.
    Regards,
    Navin.

  • Submit report with dynamic selections

    Hi All,
    I am trying to Submit a report with dynamic selections. I am using the option SUBMIT REPORT WITH FREE SELECTIONS.
    But the dynamic selections are not getting passed.
    Request you to kindly provide some inputs
    My code is
    DATA: trange TYPE rsds_trange,
          trange_line LIKE LINE OF trange,
          trange_frange_t_line LIKE LINE OF trange_line-frange_t,
          trange_frange_t_selopt_t_line LIKE LINE OF trange_frange_t_line-selopt_t,
          texpr TYPE rsds_texpr.
    trange_line-tablename = 'PA0002'.
    *trange_frange_t_line-tablename = 'PA0002'.
    trange_frange_t_line-fieldname = 'GBJHR'.
    trange_frange_t_selopt_t_line-sign   = 'I'.
    trange_frange_t_selopt_t_line-option = 'EQ'.
    trange_frange_t_selopt_t_line-low    = '1987'.
    trange_frange_t_selopt_t_line-high   = '1987'.
    APPEND trange_frange_t_selopt_t_line TO   trange_frange_t_line-selopt_t.
    APPEND trange_frange_t_line TO trange_line-frange_t.
    APPEND trange_line TO trange.
    CALL FUNCTION 'FREE_SELECTIONS_RANGE_2_EX'
      EXPORTING
        field_ranges = trange
      IMPORTING
        expressions  = texpr.
    submit RPCADVQ0
    VIA SELECTION-SCREEN
                    WITH SELECTION-TABLE rspar_tab
                    WITH FREE SELECTIONS it_texpr
                    and returN.
    Kindly provide your inputs
    Regards
    Reshma

    Hi Reshma,
    Use the FM - RS_REFRESH_FROM_DYNAMICAL_SEL before FREE_SELECTIONS_RANGE_2_EX.
      data: trange  type rsds_trange,
              g_repid type sy-repid.
    g_repid = 'RPCADVQ0'.
      call function 'RS_REFRESH_FROM_DYNAMICAL_SEL'
        exporting
          curr_report        = g_repid
          mode_write_or_move = 'M'
        importing
          p_trange           = trange
        exceptions
          not_found          = 1
          wrong_type         = 2
          others             = 3.
      if sy-subrc eq 0.
    " Do the changes to the trange
    CALL FUNCTION 'FREE_SELECTIONS_RANGE_2_EX'
    EXPORTING
    field_ranges = trange
    IMPORTING
    expressions = texpr.
    submit RPCADVQ0
    VIA SELECTION-SCREEN
    WITH SELECTION-TABLE rspar_tab
    WITH FREE SELECTIONS it_texpr
    and returN.
    endif.
    Cheers,
    Kothand

  • Submit report in BAPI

    Hi all,
    Is there is any restriction in using <b>submit report and return</b> statement in BAPI function modules ?
    Thanks ,
    Joby

    hi,
    the below guidelines has to be followed while developing BAPIs.
    1.BAPI must not contain CALL TRANSACTION or SUBMIT REPORT.
    2.BAPI must not invoke a COMMIT WORK.instead use the BAPI.transaction commit to execute the commit after the BAPI has executed.
    3.BAPI structures must not use includes.
    4.There should be no Functional dependencies b/w two BAPIs.
    <b>if helpful reward some points.</b>

  • SUBMIT report probs

    when I submitted the report RM06BA00 in other program using
      SUBMIT (REPORT)
        USING SELECTION-SET VARIANT
        EXPORTING LIST TO MEMORY AND RETURN.
    It's not coming to program from where I called...it's displaying the report
    so when I used FM LIST_FROM_MEMORY for further process like emailing this report...I am not getting any data.
    Could you pls. let me know why this is displaying report instead of coming back to the program from where it's submitted?
    Reply ASAP.
    Regards,
    Sreedevi P

    Hi Sreedevi,
    Refer to the codes in this link.
    Re: Submit Statement
    Regards,
    Arun Sambargi.

  • SUBMIT REPORT statement issue in abap

    Hi Experts,
    I am facing issue while doing SUBMIT REPORT statement.
    Below are the details for the Issue:
    1. We want to execute another report ZTEST2 from one report , so we have written code in report ZTEST1 as below:
                          SUBMIT ZTEST2 AND RETURN.
    2. It goes to ZTEST2 successfully but when we execute ZTEST2 and click on BACK buttton , it directly goes to ZTEST1 selection screen.
    Instead we want to go ZTEST2 program's selection screen. As this back button is standard ALV button is there any way we can handle this without creating new PF-STATUS.
    Regards,
    Sanjana

    That's very limiting.
    It depends, there are some things you can do if you ztest2 does something that is traceable.
    Without any more info I suggest to check time-lapse between submit calls. If it's inferior to 2 seconds I'd suppose user want's to leave.
    mind you the syntax is wrong:
    do.
    g_initial = get time.
    SUBMIT ZTEST2 AND RETURN.
    g_final = get time.
    if g_final - g_initial <= 2.
         exit.
    endif.
    enddo.
    For the user is in most cases transparent, only if he remains a lot of time in selection screen he'll remain there.
    regards,
    Edgar

  • Submit report and export to memory

    Hi
    I am using this code to submit report
    submit ZM005REP
    WITH S_BLEND IN R2
    WITH S_GROUP IN R3
    WITH S_WERKS IN r1
    exporting list to memory and return.
    I am using LIST_FROM_MEMORY to read the list.
    I want to further use the values from this list for calculations , but when I saw the list its just an array of strings.
    I want to read the opening bal field which is returned in this list.
    Any advice on this ?
    Thanks,
    Shital

    Hi,
    DATA  BEGIN OF itab_list OCCURS 0.
            INCLUDE STRUCTURE abaplist.
    DATA  END OF itab_list.
    DATA: BEGIN OF vlist OCCURS 0,
            filler1(01)   TYPE c,
            field1(06)    TYPE c,
            filler(08)    TYPE c,
            field2(10)    TYPE c,
            filler3(01)   TYPE c,
            field3(10)    TYPE c,
            filler4(01)   TYPE c,
            field4(3)     TYPE c,
            filler5(02)   TYPE c,
            field5(15)    TYPE c,
            filler6(02)   TYPE c,
            field6(30)    TYPE c,
            filler7(43)   TYPE c,
            field7(10)    TYPE c,
          END OF vlist.
    SUBMIT zreport EXPORTING LIST TO MEMORY.
    CALL FUNCTION 'LIST_FROM_MEMORY'
      TABLES
        listobject = itab_list
      EXCEPTIONS
        not_found  = 4
        OTHERS     = 8.
    CALL FUNCTION 'LIST_TO_ASCI'
      EXPORTING
        list_index         = -1
      TABLES
        listasci           = vlist
        listobject         = itab_list
      EXCEPTIONS
        empty_list         = 1
        list_index_invalid = 2
        OTHERS             = 3.
    Then you can use the ITAB_LIST for caliculation which is having all the values.
    Thanks
    Sudheer

  • Submit report repeatedly through loop

    Hi Experts,
    I need to submit report in loop. For that i have used SUBMIT as follows
    loop at itab into wa_it.
    SUBMIT ('ABC') VIA SELECTION-SCREEN
            WITH s_item = wa_it-item
            AND RETURN.
    endloop.
    The above statement works fine. But i want next item no (wa_it-item) to be filled automatically as soon called report executes for current item number instead of pressing 'BACK' button.
    If anybody worked on this please help me.
    Thanks and regards,
    Shivanand Kalagi.

    > I need to submit report in loop. For that i have used SUBMIT as follows
    > loop at itab into wa_it.
    > SUBMIT ('ABC') VIA SELECTION-SCREEN
    >         WITH s_item = wa_it-item
    >         AND RETURN.
    > endloop.
    >
    > The above statement works fine. But i want next item no (wa_it-item) to be filled automatically as soon called report executes for current item number instead of pressing 'BACK' button.
    >
    Just take out the selection-screen option since you dont want to go through the selection screen.
    You can write as follows
    loop at itab into wa_it.
    submit abc with with s_item = wa_it-item and return. <<< This will call the program without selection screen but passes the
    clear: wa_it.                                                                        parameters required to the program .
    endloop.
    Try this.... Sure it works

Maybe you are looking for