Executing Report in Background

Dear All,
I have a report with more than 400 characters in width. If it is executed in foreground the report is properly displayed but if the report is executed in background, the generated spool only displays upto 255 characters.
Is there a way to execute the report in background and make sure that the spool is generated with required width?
Regards,
Anosh

Hi Sharabh,
I have tried printing it after unchecking the "spool request max 255 characters width" option. Still the generated report does not show the report upto 400 characters.
Can you please suggest some other solution or maybe provide a way to define our own printing format?
Regards,
Anosh

Similar Messages

  • Restrict 'Executing report in background' from selection screen

    I want user to not to select option for executing report in background from Selection Screen of the program.
    i.e. 'Execute Program in Background' option in 1st menu bar tab should either be disabled OR if user clicks on it then he should get error message on selection screen itself.
    Thanks,
    Falguni

    Hi Falguni,
    Write the code based on function code SJOB in the event AT SELECTION-SCREEN. Write the following code :
    AT SELECTION-SCREEN
    CASE SY-UCOMM.
    WHEN 'SJOB'.
    MESSAGE E000 WITH 'You cannot schedule background job'.
    ENDCASE.
    Thanks & Regards,
    Faheem.

  • Execute report in background

    hi
    we have one requirement for execute report in background
    we want to run the report ME5A for a large date range and at plant level.
    Due to this, transaction data selected is large and so reportis taking very long time when executed in foreground.
    so requirement is
    execute report in background (i know possible in SAP)
    download the report output on desktop automatically
    can you pl suggest how to do this without customisation
    regards
    sara

    Hi Sara,
    Go to ME5A then enter the required field then go to Programme and then select the option execute in background

  • Error when executing report in background

    Hi experts,
    I developed a new report. In that report I am getting data from KRMI transaction. For getting data from KRMI I have all the program and transaction and function modules under KRMI transaction to Z program, transcation and function modules and by using Call Transaction on ZKRMI and using Import and export parameters I am fetching data from KRMI transaction.
    By doing this I dont have any problem while executing report online and when I am executing this report in back ground I am not getting in the above mentioned case.
    Can anyone advise me in solving the issue

    As already said....the import and export wont work in background...however what you can do is import and export in shared buffer
    Please refer this below thread for how to proceed on this...
    Re: Problem with export/import in back ground
    Check the below link for information on shared buffers
    http://help.sap.com/saphelp_webas630/helpdata/en/c4/3a6dbb505211d189550000e829fbbd/frameset.htm

  • Problem to spool when Executing reports in background

    Hi experts,
    I  executed  reports in backgroud , but when i checked in SM37 the generated spool not given proper layout format.
    This problem occurs when report having more columns.
    plz help me earliest.
    Regards,
    jyotsna

    Hi jyotsna,
    this happens with ALV output because the output format is determined at runtime.
    You can control the print format used: Just fromyour reports list in online mode, choose PRINT. A Popup should come up letting you specify the printer, number of copies, pages to be printed and so on.
    At the bottom of the popup you have the Properties button. This button opens the overview sceen for all the available print parameters. Double-Click the Format section, choose a format you want to use.The the Specifications button takes you to another screen. Here you can choose 'Valid for this report only' and Check the Background checkbox.The push the 'Copy settings' button. Then Enter to close all the popups. This should help. Additionally you can set a default layout variant for your list to be used.
    For this, in the ALV list, use Menu Settings-Layout-Layout Management. Here yu can set a default variant.
    Regards,
    Clemens

  • Change in Normal list when i execute Report in Background.

    Hi all ,
    When we execute the Report in background a normal list will be displayed in the spool. In that Normal
    list is it possible to shift the columns that are displayed at the last to be displayed at the beginning.
    Regards ,
    Murthy

    Hi,
    Yes you can do that.
    You can determine the program is runing in background mode by using system variable SY-BATCH = 'X'.
    If SY-BATCH = 'X'.
    Then you can shift the column of internal table.
    Endif.

  • How to execute report in Background from Dialog process?

    How, or what is the best way, to lauch an executable program (report) into the background from a dialog program (dynpro)?
    <b>Example:</b>  The SUBMIT...AND RETURN still executes the called program before it returns control to the calling program.  I just want the report to be kicked off and the dialog to continue as normal.  I do not want the report execution time to affect the dialog process.
    Thanks in advance for your time.

    Hi Nablan, I'm also trying to do parallel processing and created a function module that kicks of another report program.
    However, the process doesn't seem to work. The Main program runs from start to finish but the called program in the function module doesn't seem to run. When I used the option STARTING NEW TASK task name the code ran but in the foreground. I don't want to use this option as it runs in the foreground and SAP limits one to six sessions. Is there something I'm missing in the attributes of the function module I created. Currently the attributes are: Processing type Remote enable module and it's set to start immediately. I had used Normal function module initially but this did not work with the STARTING NEW TASK task name option.
    Below are the codes segements I used.
    In my main program I have the following code segement
    CALL FUNCTION 'Z_CA_PROG_CALL'
      IN BACKGROUND TASK
      EXPORTING
        zprogram            = 'ZCA_TEST1'
      EXCEPTIONS
        program_call_failed = 1
        invalid             = 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.
    COMMIT WORK.
    In the function module I have the following code.
    FUNCTION z_ca_prog_call.
    ""Local interface:
    *"  IMPORTING
    *"     VALUE(ZPROGRAM) LIKE  ZCA_INTERFPROG-ZPROGRAM
    *"  EXCEPTIONS
    *"      PROGRAM_CALL_FAILED
    *"      INVALID
      SUBMIT (zprogram).
      IF sy-subrc <> 0.
        CASE sy-subrc.
          WHEN 1.
            RAISE program_call_failed.
          WHEN OTHERS.
            RAISE invalid.
        ENDCASE.
      ENDIF.
    ENDFUNCTION.

  • EXCEL attachment as EMAIL to USER - When USER executes REPORT in BACKGROUND

    Hi Friends,
    I have 10 records in Internal Table. In BACK GROUND execution, I have to send this 10 records as EXCEL attachment through EMAIL to the USER who executed in background.
    How to do this? Thanks in advance.
    Regards,
    Viji.

    hi,
    the following excerpt converts to excel:
    REPORT ZEX_DATATOEXCEL .
    Parameters: P_file like RLGRAP-FILENAME.
    data : begin of int_head occurs 0,
    Filed1(20) type c,                     " Header Data
    end of int_head.
    data : begin of int_data occurs 0,
    Field1(20) type c,                     " Data
    Field2(20) type c,
    Field3(20) type c,
    Field4(20) type c,
    end of int_data.
    int_head-Filed1 = 'Sales Ord'.
    APPEND int_head.
    CLEAR  int_head.
    int_head-Filed1 = 'Sold-to-Party'.
    APPEND int_head.
    CLEAR  int_head.
    int_head-Filed1 = 'Purchase Ord'.
    APPEND int_head.
    CLEAR  int_head.
    int_head-Filed1 = 'Ship-to-Party'.
    APPEND int_head.
    CLEAR  int_head.
    int_data-field1 = '1JOHN'.
    int_data-field2 = '2TOM'.
    int_data-field3 = '3BRAD'.
    int_data-field4 = '4PETER'.
    Append int_data.
    Clear int_data.
    CALL FUNCTION 'MS_EXCEL_OLE_STANDARD_DAT'
    EXPORTING
    file_name = p_file " path offile where u need to download
    * CREATE_PIVOT = 0
    * DATA_SHEET_NAME = ' '
    * PIVOT_SHEET_NAME = ' '
    * PASSWORD = ' '
    * PASSWORD_OPTION = 0
    TABLES
    * PIVOT_FIELD_TAB =
    data_tab = int_data "internal table with data
    fieldnames = int_head "internal table with header
    EXCEPTIONS
    file_not_exist = 1
    filename_expected = 2
    communication_error = 3
    ole_object_method_error = 4
    ole_object_property_error = 5
    invalid_filename = 6
    invalid_pivot_fields = 7
    download_problem = 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.
    got it from
    http://abaplovers.blogspot.com/2008/05/abap-internal-table-to-excel-sheet.html.
    then you can export to spool and mail it.
    ags.

  • Problem in executing report in background in CS workflow

    Hi All,
    I am using ECC 6.0 version.
              In my scenario , Once notification is closed , workflow should trigger. and along with this , one report should execute in background with input parameter as a Notification no. from workflow . Report  should pick up input parameter dynamically.As I know instead of function module we can choose report option in business object .
               My question is how that report will get input parameter as notification no.& How I do the binding for this (Between report & workflow)?
                Valuable suggestions are excepted.
    Regards,
    Sheetal

    Hi Sheetal,
    As I had mentioned earlier (you have already implemented), add the report to your BO as a method. Then click on method and then click 'Parameters'. Create the required parameters, which is 'Notification No.' and go to the system generated 'Program'. Here you will have to do a bit of macro coding. Obtain the No. (once you add as parameter, you will get it through binding) and pass to report.
    You might also retrieve (only if required or only in certainb cases) values, for that observe how the attributes are retrieved on the basis of key field.
    Best regards,
    Abir.

  • Execute report painter report in background

    Hi All,
    I have created new library, report group and a new report in report painter, the report is working fine if we execute in foreground, but if we execute in background then the values are blank.
    Please help me how to get the values if we execute the report in background.
    Regards,
    Raj

    Hi,
    I have created a new report for balance sheet which displays for whole year by a break up of periods from 1 to 16,
    because if extracting the data for whole year i am getting ABAP short dump as runtime exceeded.
    Now i want to run the report in background, but when i run the report in background the values are not appearing in the report.
    I am using T.code GRR3.
    Regards,
    Raj

  • BackGround Task to execute report is 'IN PROCESS'

    Hello Experts,
    I have developd a workflow where i have added a task which will execute a report in background as code below -
    SUBMIT rhakti00
         USING SELECTION-SCREEN 1000
        WITH SELECTION-TABLE rspar
          AND RETURN.
    The output of the report is not relevant for my req so i dnt need to display the output of report after thts y i want to run this report in background.
    Now,while executing the task ,the report has started executing in background perfectly but tht task remain in 'IN PROCESS' status. When i checked the tRFC for that task so its showing me mesaage that - "Screen output without connection to user."
    Plz suggest how to complete my background task.
    Regards
    Nitin

    thnks for the reply Kiran,
    regarding ur point to send report output to many users....i want to make it clear tht i dont need to send or display the output of the report. I just need to execute the report in background and task shud get complete.
    Also,Can u plz explain it further abt writing code in FM and thn get the output in export or table parameter.......i mean which field or which table of which type shud i use in export or table paramenters of FM. if u can tell me somethg in coding also..tht will ne helpful...
    Regards
    Nitin

  • 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

  • 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

  • Running report in background

    Hi,
    1.  I am running a report in background, while running if system encounters any error then i want to download this error log to the presentation server, is there any function module to do this if not please suggest another possible solution to download the error log to presentation server.
    2. In the above scenario when we are running a program in background, is it necessary to save the error log file on application server or we can download the error log directly to presentation server.
    please suggest the possible solutions.
    Regards,
    Amol

    Hi,
    While running your program in backgorund mode genrally you can not download any data to prsentation server
    there r 2 ways you can solve your problem.
    1. Populate the error log and upload it to application server file Download the error log file from the appplication server by Using the command CG3Y.
    2. Populate the error log and display it, doing so will create a spool when executed in backgoround now you can go to spool display it and download it to your local system.
    These are the simplest ways to do it.
    But if you still want your system to transfer error log to local system at the time it is executing in background you can do it by configuring RFC destination in SM59 detail documentation for RFC configuration can be found in the SDN.
    Hope this helps.
    Regards
    Bikas

  • Regarding running a report in background and generate spool

    Hi,
    I am developing a report [<b>REPORT1</b>].
    It is taking long to execute if data is more.
    Now i want to schedule this report in background and generate spool along with.
    So once i execute REPORT1 it should run in background & generate spool?
    Can anybody give inputs for the same!
    Thanks,
    Deep.

    Hi,
              to generate spool, use below code
    FORM create_spool .
    CONSTANTS : l_c_device(4) VALUE 'LOCL'.
    Create Spool Request
    NEW-PAGE PRINT ON
    LINE-SIZE 120
    DESTINATION l_c_device
    IMMEDIATELY ' '
    KEEP IN SPOOL 'X'
    NEW LIST IDENTIFICATION 'X'
    NO DIALOG.
    ENDFORM. " create_spool
    And after createing spool to get the spool number use below code,
    FORM obtain_spool_id .
    TYPES : BEGIN OF t_tsp01,
    rqident TYPE tsp01-rqident,
    rqowner TYPE tsp01-rqowner,
    END OF t_tsp01.
    DATA : it_tsp01 TYPE STANDARD TABLE OF t_tsp01,
    wa_tsp01 LIKE LINE OF it_tsp01.
    SELECT rqident
    rqowner
    FROM tsp01
    INTO TABLE it_tsp01
    WHERE rqowner = sy-uname.
    SORT it_tsp01 BY rqident DESCENDING.
    READ TABLE it_tsp01 INTO wa_tsp01 INDEX 1.
    IF sy-subrc = 0 .
    v_spool_nr = wa_tsp01-rqident.
    ENDIF.
    Capture the immediate spool created for this report
    v_spool_nr = sy-spono.
    ENDFORM. " obtain_spool_id
    <b>Reward points</b>
    Regards

Maybe you are looking for