ALV List export to Excel when program is run in background

Hello,
I am running into an issue with a custom ALV report which contains an export to Excel option on the input screen. However, when I attempt to run the report in background due to high volume of records/expected performance constraints, the job fails to produce a spool when the "export to Excel" option is selected. When I deselect that option, the background job successfully generates a spool, which I can then export to Excel (albeit the formatting will not look the same).
Is the above an accurate statement or does anyone know of a way where either;
1) The background job can create and store the Excel output into a cached directory?
2) The spool generated, when exported to Excel, can match the format of the foreground Excel output?
Thanks in advancce.

Check out the sample program of the provided link ..
http://www.sap-img.com/abap/download-in-background-in-excel-format.htm

Similar Messages

  • Download Excel when program is run in background

    Hi all,
    I need help urgently in downloading my report into an excel file automatically when my report is has completed its run in background.
    Appreciate if help can be provided.
    Many thanks in advance.

    Check out the sample program of the provided link ..
    http://www.sap-img.com/abap/download-in-background-in-excel-format.htm

  • Is it possible to download to excel when a report running in background

    Dear All,
    I tried to execute one ALV report in foreground and background. In foreground the report is giving excel download but in background no excel download is coming. Is there any specific reason for that?
    Thanks and regards,
    Atanu

    Atanu dey,
    If you wnat to download excel in back ground
    You have to download in application server only.
    EX:
    DATA :  v_filepath(80)     VALUE '/data/sapdata/inc/error_log/pme_br/',
      c_coma     VALUE ',' .
    OPEN DATASET v_filepath FOR OUTPUT IN TEXT MODE.
        IF sy-subrc EQ 0.
         LOOP AT i_errors_bat.
         CONCATENATE i_errors_bat-plant c_coma
                                 i_errors_bat-zzvendor c_coma
                           INTO v_string.
            TRANSFER v_string TO v_filepath.
          ENDLOOP.
       CLOSE DATASET v_filepath.
    Note : you can download in presentation server also.
    but it requires lot of authorizations and have to use
    FTP commands.
    Reason is Apllication server in back ground has to
    recognize the from which system request came.
    Better go for OPEN DATA sets.
    Don't forget to reward if useful.....

  • ALV grid export to Excel 2003-f.01

    Hi all,
    I have an issue with ALV grid export to excel 2003 ,when i tried to download with the option as local file > xls file ,the report downloads with page breaks which the user does not want , each break comeswith header .
    With the option of list>export>xml sheet - the report downloads with out page break but with no header information like the name of the report and reporting period .The tcode is f.01 and the system is ECC6.
    Can any one suggest  how to download the report with tiltle of the report with no page break ?
    Thanks
    ske

    Hi
    What happens if you use the export/local file option - does that help at all or can you change the layout? Haven't got access to your release to check.
    Cheers
    David
    Edited by: David Berry on Oct 28, 2010 9:38 PM

  • ALV List only 80 Columns when runinning as background job

    Hello Guys,
    I have a Problem with an ALV List.
    We use the FM REUSE_ALV_HIERSEQ_LIST_DISPLAY for a Document Journal.
    When I run it in foreground it works fine. But when I view the spool in background the list makes a break at excactly 80 signs, but the line size should be about 120.
    In the report the Line-Size is set correctly, even the print parameters seem to be ok. We are running it with X_65_255.
    I saw that there are some SAP Notes to this topic, but on our release (SAP_BASIS 700) the notes are already implemented.
    Has anyone a solution to this topic?
    Thanks and regards
    Roland

    Try this.
    [ALV List only 80 Columns when running in background job|https://forums.sdn.sap.com/click.jspa?searchID=25735042&messageID=5686003]

  • Getting the variant name when the report program is run in background

    Hi All,
    How to get the variant name for the report program when run in background? My requirement is to create an email attachement with the name 'variant.XLS', where variant = selection screen variant, when the report program is run in background. The system field SY-SLSET holds the variant name only when run online.
    Any pointers to this will be highly appreciated.
    Thanks and regards,
    Nilesh.

    Hello Nilesh,
    Please find the algo:
    1. Call the FM: GET_JOB_RUNTIME_INFO to get the background job details.
    2. Select data from TBTCP using these details:
    DATA:
    FP_EVENTID   TYPE BTCEVENTID
    FP_EVTPARM   TYPE BTCEVTPARM
    FP_ACTIVE    TYPE BTCXPGFLAG
    FP_JOBCNT    TYPE BTCJOBCNT
    FP_JOBNM     TYPE BTCJOB
    FP_STEPCNT   TYPE BTCSTEPCNT.
      CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
        IMPORTING
          EVENTID                 = FP_EVENTID
          EVENTPARM               = FP_EVTPARM
          EXTERNAL_PROGRAM_ACTIVE = FP_ACTIVE
          JOBCOUNT                = FP_JOBCNT
          JOBNAME                 = FP_JOBNM
          STEPCOUNT               = FP_STEPCNT
        EXCEPTIONS
          NO_RUNTIME_INFO         = 1
          OTHERS                  = 2.
      IF SY-SUBRC <> 0.
    *   Error calling FM: GET_JOB_RUNTIME_INFO
      ENDIF.
    DATA: FP_VARIANT TYPE BTCVARIANT.
      SELECT JOBNAME JOBCOUNT STEPCOUNT VARIANT
      FROM   TBTCP
      INTO TABLE L_IT_TBTCP
      WHERE  JOBNAME   = FP_JOBNM
      AND    JOBCOUNT  = FP_JOBCNT
      AND    STEPCOUNT = FP_STEPCNT.
      IF SY-SUBRC = 0.
        SORT L_IT_TBTCP BY JOBNM JOBCNT STEPCNT.
        READ TABLE L_IT_TBTCP INTO L_WA_TBTCP INDEX 1.
        IF SY-SUBRC = 0.
          FP_VARIANT = L_WA_TBTCP-VARIANT.
        ENDIF.
      ENDIF.
    Hope this helps.
    BR,
    Suhas

  • How can I read the EXCEL file while Program is running in background.

    Hi all Expert,
    How can I read the EXCEL file while Program is running in background.
    Thanks

    you need to place ur excel file on application server and follow this thread: Reading an Excel file from the application server?
    loots of information if you can search forum.. thanks

  • How to download file to local system when report is run in background?

    Hello all,
    Can anybody tell me how can we donwload file into local machin when the program is running in background?
    thanks

    Hi,
    We can't communicate with presentation server while processing in background.
    if needed we can do this by creating RFC destination and doing some setting in Desktop system.
    [Reference document|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/9831750a-0801-0010-1d9e-f8c64efb2bd2]
    Regards,
    Amal

  • ALV Grid Exporting to Excel - Columns out of order

    Hi,
    In my ALV grid everything is in order as it is in the structure. When however I export to excel from ALV grid, the columns are out of order. First it lists the string columns, then number columns and lastly date columns. Is there a way to make excel keep the same order as it is in ALV grid?
    Thanks,
    Sergiy

    I am not much of an ABAPer but I was able to set the column position during data declaration with
    gs_fcat_line-col_pos = 1, for example.
    That would put the column in the first position in ALV as well as the excel export.
    Thanks for your inputs.
    Sergiy

  • Using Change Layout Tab on ALV to Export to Excel

    Hi Forms!
    I have an ALV grid that I export to excel to allow users to manipulate the data exported further.
    i do this by clicking change layout -> View -> 'Microsoft Excel' -> click on the template you want to use and click the check mark to export.
    My problem is I have a header on the ALV that display's the user selection screen options... all my data shows in excel correctly except that my selection screen header which I would expect in the 'Raw Header' Tab in excel.
    If I export to excel using excel export button the header shows up, however this does not help as we like using the pivot table setup from the change layout option.
    thank you,
    Here is my code for producing the header...
    ATA: lo_header  TYPE REF TO cl_salv_form_layout_grid,
            lo_h_label TYPE REF TO cl_salv_form_label,
            lo_h_flow  TYPE REF TO cl_salv_form_layout_flow,
            lv_i TYPE i,
            lv_mtart LIKE LINE OF s_mtart,
            lv_auart LIKE LINE OF s_auart,
            lv_bkbez LIKE LINE OF s_bkbez,
            lv_lines TYPE i.
    *   header object
      CREATE OBJECT lo_header.
      lo_header->set_column_count( 10 ).
      lo_h_label = lo_header->create_label( row = 1 column = 1 ).
      lo_h_label->set_text( 'Selection Screen Values' ).
    *   information in tabular format
      CONCATENATE 'Dates: ' s_date-low  ' ' ' to ' s_date-high ' ' INTO l_text RESPECTING BLANKS.
      lo_h_flow = lo_header->create_flow( row = 2  column = 1 ).
      lo_h_flow->create_text( text = l_text ).
      CONCATENATE 'Plant: ' p_werks ' ' INTO l_text RESPECTING BLANKS.
      lo_h_flow = lo_header->create_flow( row = 3  column = 1 ).
      lo_h_flow->create_text( text = l_text ).
      CONCATENATE 'Costing Variant: ' p_klvar INTO l_text RESPECTING BLANKS.
      lo_h_flow = lo_header->create_flow( row = 4  column = 1 ).
      lo_h_flow->create_text( text = l_text ).
      CONCATENATE 'Costing Version: ' p_tvers INTO l_text RESPECTING BLANKS.
      lo_h_flow = lo_header->create_flow( row = 5  column = 1 ).
      lo_h_flow->create_text( text = l_text ).
    *there can be 1 or many Material Types need to check
      DESCRIBE TABLE s_mtart LINES lv_i.
      IF lv_i > 1.
        lv_lines = 1.
        CONCATENATE 'Material Type(s): ' s_mtart-low INTO l_text RESPECTING BLANKS.
        lo_h_flow = lo_header->create_flow( row = 6  column = lv_lines ).
        lo_h_flow->create_text( text = l_text ).
        LOOP AT s_mtart INTO lv_mtart .
          IF lv_lines > 1.
            lo_h_flow = lo_header->create_flow( row = 6  column = lv_lines ).
            lo_h_flow->create_text( text = lv_mtart-low ).
          ENDIF.
          lv_lines = lv_lines + 1.
        ENDLOOP.
      ELSE.
        CONCATENATE 'Material Type(s): ' s_mtart-low INTO l_text RESPECTING BLANKS.
        lo_h_flow = lo_header->create_flow( row = 6  column = 1 ).
        lo_h_flow->create_text( text = l_text ).
      ENDIF.
    *   set the top of list using the header for Online.
      cr_content = lo_header.

    Hello Re_flex....thanks again but I am missing a step here as I was able to hide the column by right-clicking but when I click on the layout there is no layout that I can select. Do you know if these layouts are set in config or not as my layout setting displays 'X' user specific or 'A' ALL but when I select these nothing is displays and when I save I get a message back 'No selection'

  • ALV Report Export to Excel

    Hi experts,
    I generated ALV report with proper data information but when I export it to excel with this path List->Export->Local File->Spreadsheet.
    All the data I get perfectly expecting the Mobile no. filed. In my ALV report I got mobile no field with 91(Mob. No). wx.919876543210. But when I export it to excel then I got 919876543210, not able to get +.
    So kindly suggest me if any option is there.!!!!

    Hi,
    Declare the Mobile number field as a Character field and append it to the Final output table and download it using 'GUI_DOWNLOAD' and make sure that the file type is 'DBF'.
    Below is the sample code to save the output as a local file in your system.
    TYPES: BEGIN OF ty_output,
            mob(20) TYPE c,
           END OF ty_output.
    DATA: BEGIN OF it_title OCCURS 2,
          title(100),
          END OF it_title,
          gt_output TYPE TABLE OF ty_output WITH HEADER LINE,
          wa_layout TYPE slis_layout_alv,
          wa_fldcat TYPE slis_fieldcat_alv,
          gt_fldcat TYPE TABLE OF slis_fieldcat_alv,
          ofname TYPE string.
    gt_output-mob = '+919876543210'.
    APPEND gt_output.
    gt_output-mob = '+91123456789'.
    APPEND gt_output.
    CONCATENATE 'D:\temp\' 'MOBILE_' sy-uzeit '.xls' INTO OFNAME.
    it_title-title = 'Mobile Num'.
    APPEND it_title.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        filename              = ofname
        filetype              = 'DBF'
        write_field_separator = 'X'
      TABLES
        data_tab              = gt_output
        fieldnames            = it_title.
    IF sy-subrc = 0.
    ENDIF.
    Please reward if the solution is useful.

  • ALV GRID Export to Excel button Missing

    HI All,
    I am facing some problem with ALV GRID. When excuting the report with my user id I am able to see the 'Export to Local file' button in the ALV GRID where as if i am excuting with another user id which is having less authorisations than the button is greyed out.  I checked by giving all authorisation than we are able to see the button.
    Could anyone please tell me which authorisation object we have to assign to see the buttons.
    Thanks & Regards,
    Murali.

    Hi,
    Before clicking on the Export to Excel button, start the debugging session by placing the command /H in the command prompt.
    Now, put the break point at statement AUTHORITY-CHECK. Now it will trigger all the authorization objects relevant to this.
    check the sy-subrc value gets failed.
    Regards,
    Santhosh.

  • Problem in ALV Data Exported to Excel

    Dear all,
    When an ALV data is exported to Excel i see that the data is shown in 2 lines
    and a blank line is inserted between each data.
    Can any body please help.
    with rgds
    Ranjith Singh

    Hi Ranjith,
    How many columns that you extracted to excel from ALV?
    Would you give more specific to your case?
    As I remember, ALV has its limits for extracting number length of column to excel.
    Regards,
    Dondi.

  • ALV List output to Excel file

    Hi Friends,
      I want to save the ALV output as a excel file on local drive.
    From the ALV output, I am using menu path :  Views  --> Microsoft Excel (Ctrl + Shift + F7) to switch  from ALV to Excel mode.
    It is switched to excel mode but not showing any data in the columns?
    If I use the Path: List --> Export  --> Local File --> Spread Sheet --> Gave excel file name.
    Here, I am not able get data for all columns. Some columns are not being displayed.
    What is the problem in this? Is this coding error? Do we need to apply any OSS notes?
    Thanks in advance,
    Sreeni

    Hi soumya,
    I want to download from standard functionality only, that means I want to download using standard menu paths only.
    I have tried giving .csv file also, but not able to download all fields. It is missing first 4 fields and downloading all the remaining
    fields.
    Please try to through some light on it.
    Thanks in advance,
    Sreenivas reddy

  • Why was formatting removed from Export to Excel when exporting from PWA 2013?

    We have recently moved from using Project Server 2007 to Project Server 2013 and one thing that we have noticed is that when we Export to Excel all the formatting has been removed and all the task grouping and alignment has been flatted. 
    Why did Microsoft remove this feature from the Project Server 2013?
    Is there an easy way for anywhere there is an Export to Excel option on the Ribbon to add the formatting back?
    What is the best solution to still retain the indents, bolding, and grouping?

    Jason --
    I can confirm your findings with exporting PWA pages in Project Server 2013 to Excel.  As to why Microsoft removed the feature previously found in Project Server 2007, I have no idea, as I do not work for Microsoft.  I do not believe there is any
    way to force the Export to Excel feature to work the same in 2013 as it did in 2007.  I think it will be up to the user to format the exported Excel workbook as needed.  Hope this helps.
    Dale A. Howard [MVP]

Maybe you are looking for

  • Opening stock for meterial monthwise

    hi experts ... I m developing a report , in which i need any of opening  stock or closing stock. plz tell me from which table i can get any of this two fields. if there is any calculation to done ,plz give me the formula for this stocks. thank you.

  • Define event to repeat on the last day of each month?

    (I've searched the forum and can't find this question addressed) I want to create a repeating event for the last day of each month. Is this possible?

  • How to create payment term?

    Hello Experts, Payment term should be: Payable with next payment run, max 14 days from Document Date. Can you please let me know the possibility of creating such a payment term? Thanks in advance.

  • AC Adapter for Palm m500 cradle

    Wanting to reactivate my older m500, I am confused which of several of my AC chargers is the proper one.  Is it the one with an output of 9V AC 1000mA??  Other information on this charger is ENG Direct Plug-in Class 2 transformer, model 41A-9-1000 EI

  • How should I approach

    In an Oracle Financial Application 11.0.3, If i have to do any customization using the custom library and a form call another form and i have to use the values in the fields on the form then how should i approach in solving the problem. I mean whethe