Save ALV grid to local excel-file in background

Hi,
i want to save a alv grid to an excel-file on a local fileshare using an background job..
Does anybody know how this works?
Thanks ahead

DATA: file TYPE string VALUE `flights.dat`,
      wa   TYPE spfli.
FIELD-SYMBOLS TYPE x.
OPEN DATASET file FOR OUTPUT IN BINARY MODE.
SELECT *
       FROM spfli
       INTO wa.
  ASSIGN wa TO CASTING.
  TRANSFER TO file.
ENDSELECT.
CLOSE DATASET file.
<b>The binary data from database table SPFLI is transferred to a binary file flights.dat</b>

Similar Messages

  • Save ALV report output as excel file in background

    Hi all,
    As the no. of records is huge and the running time is long, I'd like to modify my program to be able to run in background mode with excel as output..
    Is there any method to generate the result list in ALV format and save it as an excel file while running the program in background mode?
    And any limitation?
    Thanks!

    Try to create ALV output to spool in background then try to use any of the below mentioned fm
    SAP_CONVERT_TO_XLS_FORMAT
    MS_EXCEL_OLE_STANDARD_DAT
    RSPO_DOWNLOAD_SPOOLJOB
    RH_START_EXCEL_WITH_DATA
    or
    create CSV using OPEN DATASET & TRANSFER

  • Download ALV result list as excel-file in background job

    Dear Experts,
    I am looking for a possibily to download the result of an ALV based report as excel-file in a background job. Surely there is a standard function which can be used or at least some hints how to implement this. I searched the forum but couldn't find a thread which was covering this problem exactly.
    Thanks in advance
    Benjamin

    Dear Mr. Krapf,
    it is possible to output an ALV list to an Excel file in the background but there are some limitations.
    Please consider the following notes:
    #7925  Graphics, Upload, Download do not work in backgrnd
    #65050 Data types and file formats in files (DATASET) 
    #145073 - FAQ Report Writer: Excel download 
    #569537 - Incorrect data during import into Excel
    #590126  Sending CSV documents up to Release 4.6
    Please be aware that they are all Basis notes. So for more information you might ask in the Basis SDN Forum.
    Best regards, Christin Angus

  • Runtime Error during export ALV Grid to Local File and Print Priview

    Hi all,
             While Exporting ALV grid to local file using menu List->export->local file , I m getting following runtime error,
             Field Symbol has not yet been assigned.
    Details of Errors:
    Program : SAPLKKBL
    Include :   LKKBLF99
    Module Type : (FORM)
    module name : GEN_FIELD_OUT2
    So. pls Suggest any good solution.
    Thanks & Regards,
    Sandip Sonar.

    hi
    this is happening just because you might have declared that your ALV list should have a checkbox, but defined no field as "checkbox" into your internal table.
    and one more thing to check up is that before you call the REUSE_ALV_GRID_DISPLAY, you need to fill a few parameters for instance is_layout. This one has a field box_fieldname, in which you have to enter the name of the field of the internal table that will store the 'X' as and when the checkbox is checked.
    hope this helps
    regards
    Aakash Banga

  • Export alv grid to local file

    Hi all,
             I m displaying records using ALV Grid , I want to export that ALV Grid to Local File ,
    using Menu->List->Export->Local File.
           I m able to export it in spreadsheet using option List-> Export->Spreadsheet, but while exporting to local file i m getting short dump with error  *Field Symbol Has not yet been Assigned*.
    Pls, Suggest any good Solution.
       Thanks & Regards ,
      Sandip Sonar.

    hi,,,,
    In your output are there any empty Columns, Because field Symbol Not assigned generally occurs if any one of your Internal table column is Blank, Just remove that Blank Column and then try it.
    Thanks
    Saurabh

  • 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

  • Leading Zeros Missing - When exporting data from ALV grid display to Excel

    Hi,
    Am exporting the data from ALV GRID DISPLAY to Excel sheet using standard toolbar icon 'Local file'
    the leading zeros displayed in the ALV output is missing in the EXCEL sheet.
    (eg)  in ALV o/p - 0029. 
            in Excel - Only 29 is appearing.
    As per the requiement i have to show the leading zeros in excel also.
    Pls help on this issue.
    Thanks in advance..

    Hi ,
      Please set the property  :
      wa_fieldcat-lzero = 'X' .
    when you are creating field catalog for display alv data .
    your prob will solved .
    Regards ,
    Nilesh Jain

  • 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

  • Saving Log in SM35 as local excel file

    Hi Experts,
    I want to save the log which is generated for a LSMW as a local excel file. If I am trying through menu System->List->Save->List, it's coming in disable mode. Is there any way to save the log?
    Thanks,
    Krishan

    Do you have the "Analyze erroneous transactions" option
    available to you on your LSMW menu ? If you don't, switch it on using the "Personal Menu" button.
    Execute this option (which allows you to choose which fields you would like to display from your LSMW load) and download the results into Excel. This option is good because it only shows you the failed
    transactions whereas the LSMW log shows you all transactions and you need to filter through them to find the failed ones.
    If this doesn't give you what you require,then just print the logs.When you press print, the system should take you to another screen, you can download this screen to Excel using the =>System =>List =>Save option, or you can press print and download the data from your spool file.
    Hope this helps.

  • How do I save a PDF as an excel file when the PDF is horizontal. Adobe tries to rotate the page, but the data is entered in an  horizontal format.

    How do I save a PDF as an excel file when the PDF is horizontal. Adobe tries to rotate the page, but the data is entered in an  horizontal format.

    Thanks for the quick reply.  I figured out how to get the desired results by using tagging.  For anyone who may reference this post in the future, I went to "Customize" in the top right corner of Adobe, then selected "Create new tool set...", looked under "accessiblity and found the "tag" option.  Hit ok, tag is added to the toolbar.  Then I highlighted the dataset in the PDF that was relevant to the output format, then clicked "tag", saved as spreadsheet.  Sorry I can't provide more details on how tagging works or if there's a more elegant solution available, but I'm sure one's out there.

  • Hi iam getting the alv grid data in excel format but iam facing one problem

    hi iam getting the alv grid data in excel format but iam facing one problem ,
    i.e., i want it read only  but iam getting it in edit mode i use layout default in excel iam getting in xl directly but in edit mode but i need it in read only mode
    what i have to do for that  and bdy knows reply me i need it urgently.

    there's always edit-mode if you choose excel-inplace - but noone can modify/rewrite the data
    A.

  • How can i read local excel file into internal table in webdynpro for abap a

    Could someone tell me how How can i read local excel file into an internal table in webdynpro for abap application.
    thank u for your reply

    Deep,
    File manuplations...............................
    1. At the presentation level:
    ->GUI_UPLOAD
    ->GUI_DOWNLOAD
    ->CL_GUI_FRONTEND
    2. At the application server level:
    ->OPEN DATASET : open a file in the application server for reading or writing.
    ->READ DATASET : used to read from a file on the application server that has been opened for reading
    -> TRANSFER DATASET : writing data to a file.
    -> CLOSE DATASET : closes the file
    -> DELETE DATASET : delete file
    If file is on the local PC,use the function module GUI_UPLOAD to upload it into an internal table by passing the given parameters......
    call function 'GUI_UPLOAD'
    exporting
    filename = p_file
    filetype = 'ASC'
    has_field_separator = '#'
    tables
    data_tab = t_data
    p_file : excel file path.
    t_data : internal table
    <b>reward points if useful.</b>
    regards,
    Vinod Samuel.

  • Facing problem while downloading ALV grid Output into Excel

    Hi Guys,
    I am facing problem while downloading ALV grid Output into Excel.
    It is downloading into excel, but all character columns first and next all quantity columns it is displaying. But I need columns order as it is in the grid.
    If I take all columns as characters it works fine. But it will be problem for calculating total, subtotals of quantity columns
    Can someone help me regarding this
    thanks for your help

    Hi,
    Open up Excel on your desktop. Goto Tools > Macro > Security.
    Make sure that your security is set to Medium (or less). SAP uses OLE automation to run the Excel instance and in Office 2003 (for example), Microsoft has increased their default security setting to High. With the High setting, the output to Excel fails.
    Was this your problem? Don't forget those points, either.
    check with this wetther it is solved or not.
    Regards,
    sana.

  • Trying to send the alv's information to excel file

    Hello iam trying to send the alv's information, when i execute my program sent an alv with that information that i have selected and then i would like to sent that information that the alv containe to an excel file, that why i press the button located top of alv, this sent an excel screen but this screen appears plain,without information but doesn't send an error.
    thanks a lot for you help

    Mr Heilman:
    I am really sorry for to many question and this troubles
      this is the segment fo code that i am using:
    *& Report  ZREPORTE_PA9011
    REPORT  zreporte_pa9011 NO STANDARD PAGE HEADING MESSAGE-ID 02.
    *Tables declaration
    TABLES pa9011.
    TYPES BEGIN OF prueba.
            INCLUDE STRUCTURE pa9011.
    TYPES END OF prueba.
    DATA prueba TYPE STANDARD TABLE OF prueba WITH HEADER LINE.
    *declaracion de las variables para el alv
    TYPE-POOLS: slis.
    DATA: repname  LIKE sy-repid,          "variables alv
          heading  TYPE slis_t_listheader,
          layout   TYPE slis_layout_alv,
          fieldtab TYPE slis_t_fieldcat_alv.
    *Sections parameters
    SELECTION-SCREEN: BEGIN OF BLOCK bi WITH FRAME TITLE text-001.
    SELECT-OPTIONS subtipo FOR pa9011-subty.
    PARAMETER:     pbegda LIKE pa9011-begda.
    SELECTION-SCREEN: END OF BLOCK bi.
    START-OF-SELECTION.
      repname = sy-repid.
      PERFORM selecciona_datos.
      PERFORM transfer_to_alv.
    *&      Form  selecciona_datos
          text
    FORM selecciona_datos.
      REFRESH prueba.
      SELECT * INTO CORRESPONDING FIELDS OF TABLE prueba FROM pa9011
      WHERE subty IN subtipo
      AND begda GT pbegda.
      IF sy-subrc NE 0.
        MESSAGE e000 WITH 'Aun no existen datos cargados'.
      ENDIF.
    ENDFORM.                    "selecciona_datos
    *&      Form  transfer_to_alv
    send the information from prueba into alv
    FORM transfer_to_alv.
      PERFORM initialize_fieldcat USING fieldtab[].
      PERFORM build_layouts USING layout.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
         EXPORTING
           i_callback_program      = repname
         i_callback_user_command = 'AT_USER_COMMAND'
          i_callback_top_of_page  = 'BUILD_COMMENT'
          i_structure_name        =
           is_layout               = layout
           it_fieldcat             = fieldtab[]
           i_default               = 'X'
         i_save                  = g_save
         is_variant              = g_variant
         TABLES
           t_outtab                = PRUEBA
         EXCEPTIONS
           program_error           = 1
           OTHERS                  = 2.
      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.                    "transfer_to_alv
    *&      Form  initialize_fieldcat
          text
         -->P_FIELDTAB text
    FORM initialize_fieldcat USING p_fieldtab TYPE slis_t_fieldcat_alv.
      DATA: l_fieldcat TYPE slis_fieldcat_alv.
      REFRESH p_fieldtab.
      CLEAR l_fieldcat.
      l_fieldcat-tabname = 'PRUEBA'.
      l_fieldcat-ref_tabname = 'PA9011'.
      l_fieldcat-sp_group = 'A'.
      l_fieldcat-fieldname = 'SUBTY'.
      l_fieldcat-seltext_m = text-t01.
      l_fieldcat-col_pos = 1.
      APPEND l_fieldcat TO p_fieldtab.
      l_fieldcat-fieldname = 'BEGDA'.
      l_fieldcat-seltext_m = text-t02.
      l_fieldcat-col_pos = 2.
      APPEND l_fieldcat TO p_fieldtab.
      l_fieldcat-fieldname = 'ENDDA'.
      l_fieldcat-seltext_m = text-t03.
      l_fieldcat-col_pos = 3.
      APPEND l_fieldcat TO p_fieldtab.
      l_fieldcat-fieldname = 'AEDTM'.
      l_fieldcat-seltext_m = text-t04.
      l_fieldcat-col_pos = 4.
      APPEND l_fieldcat TO p_fieldtab.
      l_fieldcat-fieldname = 'UNAME'.
      l_fieldcat-seltext_m = text-t05.
      l_fieldcat-col_pos = 5.
      APPEND l_fieldcat TO p_fieldtab.
      l_fieldcat-fieldname = 'PREAS'.
      l_fieldcat-seltext_m = text-t06.
      l_fieldcat-col_pos = 6.
      APPEND l_fieldcat TO p_fieldtab.
      l_fieldcat-fieldname = 'ZDESCRSEGURO'.
      l_fieldcat-seltext_m = text-t07.
      l_fieldcat-col_pos = 7.
      APPEND l_fieldcat TO p_fieldtab.
      l_fieldcat-fieldname = 'ZASEGURADORA'.
      l_fieldcat-seltext_m = text-t08.
      l_fieldcat-col_pos = 8.
      APPEND l_fieldcat TO p_fieldtab.
      l_fieldcat-fieldname = 'ZCOBERTURA'.
      l_fieldcat-seltext_m = text-t09.
      l_fieldcat-col_pos = 9.
      APPEND l_fieldcat TO p_fieldtab.
      ENDFORM.                    "initialize_fieldcat
    *&      Form  build_layouts
          text
    FORM build_layouts USING p_layout TYPE slis_layout_alv.
      p_layout-colwidth_optimize = 'X'.
      p_layout-zebra = 'X'.
      p_layout-f2code = '&amp;ETA'.
      p_layout-detail_popup = 'X'.
    ENDFORM.                    "build_layouts
    *&      Form  build_comment
          text
    FORM build_comment.
      DATA: hline TYPE slis_listheader,
            text(60) TYPE c.
      REFRESH heading.
      CLEAR: hline, text.
      hline-typ  = 'H'.
      text =  text-h01.
      hline-info = text.
      APPEND hline TO heading.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = heading.
    ENDFORM.                    "build_comment

  • How to Create Excel File in Background processing with different colors

    HI All
    I am trying to create Excel file in background & send it to user through e-mail, this i could acheive using fucntion module SO_DOCUMENT_SEND_API1, but here my requirement is i want to put different colors to columns of excel & this should happen in Background processing,
    Initially i completed above requirement by using HTML type of document with attachment type 'ALI'  & formatted output using write statement & used colors, after that i took this o/p using save_list function module & then table compress...etc.
    but i don't know how to achieve same if we need o/p in excel as size of object of excel file is less than that of HTML
    I am thankfull to everybody who will help me.
    Regards
    Lokesh

    Lokesh,
    Iam also trying to populate my text file with colors as an attachment . If you know this please let me know.

Maybe you are looking for

  • Upgrading to OS X v10.5 from OS X v10.3.9

    I just upgraded our G5 web server to OS X v10.5. The upgrade created an available server "TA-Web-Server.local. I has the 4-web sites I previously had along with the same services, AFP, FTP, NFS, Open Directory and Web. The first 4-services appear to

  • Getting warning sign when making calendar?

    Hello, I am new to iPhoto08, and making my 1st calendar. I have shot all my picutres for the calendar in either 3 or 6 megapix - all in my iPhoto library. I moved the pix into the calendar slot. I notice a few things. Each of the 3mp picutures all ha

  • Actiontec router port in use after software restart...​.need some help please

    I am using Windows Media Encoder to stream video from a web cam through my Actiontec M1424-WR RevC router. Problem I am having is when I shut down the camera for the evening and then start it back up in the morning, I get a message that says the port

  • Override 2.0 to Sync Calendars/Contacts Manually?

    Not all of my data are being pushed to/from my iPhone. How can I reset iTunes/iPhones sync preferences to allow me to sync manually and avoid Push?

  • Problems Dock

    When i plug in my ZEN Touch 20 gig, with updates firmware, the USB screen "Docked" will flash very quickly, The noise comes on my computer, and i go to back up my media, It won't stay docked, I have jiggled the cable, and plugged it in all different