Query download to CSV format

I need help setting up a query to download the results to a CSV format file.   The query will be setup run in a batch job.  The file will be stored on the application server.

FM GUI_DOWNLOAD downloads to the presentation server only, not the ap server. And it woks only in the foreground.
Rob

Similar Messages

  • Query - Download as CSV file

    Hi,
    By using Query (SQ01), we are able to download data in Excel format, Text format, etc. But... is there an option that I can download in CSV format.
    Thanks.....
    Rgds,
    Kian

    Hi Kian,
    you could save the Excel file in CSV format, couldn't you?
    Regards
    Bernd

  • Issue with downloading in CSV Format

    Hi SDN,
    i used the FM's SAP_CONVERT_TO_CSV_FORMAT - to convert 2 CSV Format  and
                            GUI_DOWNLOAD  - to download the data 2 presentation server.
    i'm able 2 open the file in CSV format,but the data is displayed in single column only.
    how 2 display in different columns ?
    for example the ITAB contains empno, empname and designation.
    I want it 2 display as :
       EMPNO      EMPNAME     DESIGNATION
         1                xxxxx              Developer
         2                 yyyy               TL
    with tab delimiter.
    now the values are displaying as:
    EMPNO;EMPNAME;DESIGNATION
    1;xxxx;Developer
    2;yyyy;TL
    pls suggest.
    awaiting ur early response.
    Regards,
    Suman.

    Hi Max,
    the issue is when opening the CSV file.
    all the contents are coming in a single column. for ex.,
                    Col 1                                                 Col2          Col3
    Row1      Heading1,Heading2,Heading3
    Row2      a1,b1,c1
    Row3      a2,b2,c2
    Row4      a3,b3,c3
    I'm not sure whether this format is correct  ?
    what I'm expecting is  like the one below, with a tab delimiter.because after runing the ALV report when I export 2 Excel in CSV format it is displaying like this.
                        Col1                Col2               Col3
    Row1          Heading1      Heading2          Heading3
    Row2             a1                    b1                c1
    Row3             a2                     b2               c2
    Row4             a3                     b3                c3
    Regards,
    Suman.

  • Saving a report with two  query providers into .csv format

    Hi,
    I have developed a webi report which has two query providers. I have linked the objects from these two queries at the report level using merged dimensions. the report is running fine. When I save it in EXCEL or PDF it saves the same report, but when I try to save the report in .CSV format, the output of the second query provided is getting appened at the bottom of the report.
    Has anyone encountered similar problem is so whats the solution for it.
    For me business wants the report to be saved as .csv only as it acts as a source file to other application.

    Hi
    please take a look at the explanation area in the following note
    https://css.wdf.sap.corp/sap/support/notes/1417382
    When saving Web Intelligence document as Excel format, the result is saved based on the report design.
    When saving Web Intelligence document as CSV format, all data in the Data Provider are saved.
    I believe that the behaviour you described is by design so there is not much to do about it. You can open a case by SAP support though asking if this changed in a later service pack (actual service pack version for XI R2 is SP 6).
    Regards,
    Stratos

  • Function to download in  csv format

    Hi Every Body,
    am using asp.net as a front end and oracle 11g as back end am wondering if there is a way to download data in an csv format and merge them into a table.
    i.e i need to provide a button for this functionality.
    Regards
    Nii Moi

    Nii Moi wrote:
    Hi Every Body,
    am using asp.net as a front end and oracle 11g as back end am wondering if there is a way to download data in an csv format and merge them into a table.How is this related to Application Express ? Please explain

  • Obiee 11g hierarchy columns download into csv format.

    When using hierarchical columns, Is there a way to download the results as the user see it on the view (be it table or pivot view) into a CSV format.
    Excel format works, but if the user drill down on the hierarchy column and then export in CSV format... the data gets exported to the level the report was originally set.
    Is there any way to change this behavior?
    One option we can recommend to users is to download in excel format and then convert to CSV....if needed.
    FYI, we just starting looking into 11g 11.1.1.5 version... planning to migrate from 10g to 11g...
    Thanks
    Sundar

    Nii Moi wrote:
    Hi Every Body,
    am using asp.net as a front end and oracle 11g as back end am wondering if there is a way to download data in an csv format and merge them into a table.How is this related to Application Express ? Please explain

  • Download to CSV format

    Hi guys,
    What is the best way to download an internal table data to CSV format?
    Thanks!

    Hi,
       Follow the below logic.
    TYPES:
    BEGIN OF TY_FILE,
    DATA TYPE STRING,
    END OF TY_FILE.
    DATA: IT_FILE TYPE STANDARD TABLE OF TY_FILE,
    WA_FILE TYPE TY_FILE.
    LOOP AT ITAB INTO WA.
    CONCATENATE WA-F1 WA-F2 ... WA-FN SEPARATED BY ',' INTO WA_FILE.
    APPEND WA_FILE TO IT_FILE.
    CLEAR WA_FILE.
    ENDLOOP.
    "Use IT_FILE to download using GUI_DOWNLOAD.
    Thanks,
    Asit Purbey.

  • Link to download in csv format and display in pdf

    Hi
    i have oracle 10.1.2 portal and as part of application i have a page which results various columns in tabular format, i need to provide the user a link on the same page which which will allow the user to download the result page content in csv format. how can we do it?
    i have another a HTML page which gets generated dynamically, i need to show the same content in pdf format. guide me how can i do it?
    help is requested because this is an urgency..

    Hi,
    I did it once - however, I am not sure if Portal 10.1.2 has support for MIME types other than text/plain. I implemented a JSP solution and this is what I did :
    1. I have a Servlet that checks the choice of output i.e, html or Excel.
    2. The Servlet first renders the page in HTML, with a link that invites the user to "Export" the report to Excel. The Servlet forwards the rendering to a JSP ( which is a Portlet ).
    3. If the link is click, the same Servlet is invoked - thsi time, I made the Servlet to render the output as Excel using the usual code: response.setContentType("application/vnd.ms-excel");
    4. The same output is rendered in Excel.
    The Servlet was not a Portlet - I had to do this workaround as Oracle Portal 9.0.4 wouldn't support the content-type application/vnd.ms-excel
    Thus, the HTML rendering was done via a JSP, which is a Portlet. THe PDF / Excel redering was done by a Servlet, which is not a Portlet.
    I would be interested to know if 10.1.2 ( & the later verions ) support the Excel / PDF MIME Types.
    Regards,
    Sandeep

  • Download into CSV format from internal table

    Hi,
      I would like to download my internal table records in CSV format without any manual formating.
    It is easy to concatenate internal table fields into a string with ',' seperator. But I would like to do in a better way that this becasue of more number of fields in my internal table.
    Could you someone help me in this, I have searched in this form for help I found few function modules which did not help me.
    SAP_CONVERT_TO_CSV_FORMAT / LIST_DOWNLOAD .
    Prabhu Rajesh.

    Sravan,
    type-pools: truxs.
    DATA : BEGIN OF itab OCCURS 0,
    name1(10),
    name2(10),
    END OF itab.
    DATA : itab1 TYPE truxs_t_text_data.
    DO 10 TIMES.
      itab-name1 = 'Prabhu'.
      itab-name2 = 'Rajesh'.
      APPEND itab.
      CLEAR : itab.
    ENDDO.
    LOOP AT itab.
      WRITE:/ itab-name1, itab-name2.
    ENDLOOP.
    CALL FUNCTION 'SAP_CONVERT_TO_TEX_FORMAT'
      EXPORTING
        i_field_seperator          = ';'
      I_LINE_HEADER              =
      i_filename                 =
      I_APPL_KEEP                = ' '
      TABLES
        i_tab_sap_data             = itab
    CHANGING
       I_TAB_CONVERTED_DATA       = itab1
    EXCEPTIONS
      CONVERSION_FAILED          = 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.

  • Download in CSV format with Clear Cache After Regions

    Hi,
    I am trying to download Apex report in CSV format, but, as I have Clear cache After Region data gets cleared and nothing the saved in CSV file. If I remove Clear Cache option I am able to download report in CSV format, but, as cache entries are not cleard it is fetching all records related to previous entry which is not intended. This is all happening in single session. If I logout and login again, then cache is cleard. But in single session when I move from one report to another cache entries are not cleared.
    Appreciate your help.

    Hi,
    I am trying to download Apex report in CSV format, but, as I have Clear cache After Region data gets cleared and nothing the saved in CSV file. If I remove Clear Cache option I am able to download report in CSV format, but, as cache entries are not cleard it is fetching all records related to previous entry which is not intended. This is all happening in single session. If I logout and login again, then cache is cleard. But in single session when I move from one report to another cache entries are not cleared.
    Appreciate your help.

  • Automate several table download in csv format from Oracle database

    Hi All,  I am new to Oracle database usage and currently using SQL Developer and PL/SQL for my day to day work.  Please help me with the below.
    Currently I am querying a table for few columns and using EXPORT facility from Query Result tab.  However, I want to do this for several tables.  If possible I would like to keep all these table downloads as overnight job.  Is there a way to do this?
    Thanks in advance.

    I guess you should post this in the SQL Developer forums. However; if you don't mind using other tools I have an idea: recently a feature has been added to the free mod_owa module to output a ref cursor in various formats; e.g. in CSV:
    https://oss.oracle.com/projects/mod_owa/dist/documentation/modowa.htm#_refcur
    so in essence you'd need a stored procedure returning ref cursors and an apache with the module configured. You'd simply have to do HTTP Requests and store the response in a file.
    cheers

  • Download to CSV format in Interactive report

    Hi all,
    We have APEX 4.2. We have created Interactive report on a table. When we download that report to csv, everything is fine except for loan number which is a varchar2(50 Byte) (e.g. 210568900000000012). It is shown as 2.10569E+15. When we try to format the cell as text, it rounds off the number (e.g 210568900000000000).
    Please advice.
    Regards,
    Andy

    I encountered this issue previously, but regarding leading zeroes. It was really a battle with Excel - not APEX.
    Although I'd be interested to see if anyone has found a workaround that made Excel interpret it as a character instead of a number. We tried a few leads but to no avail.

  • Issue while downloading file in .CSV format

    Hi,
    I need to download the file in .CSV format.
    I hade used FM SAP_CONVERT_TO_CSV_FORMAT  and then used GUI_Download.
    Now when I am opening file which is downloaded, it gives all the data in a single column. If there are 5 fields in my table, the generated file gives the data of all the 5 fields in a single column.
    Could you please help?

    Hi try wi th the following code.
    TYPE-POOLS : truxs.
    DATA: t_file TYPE STANDARD TABLE OF type_file.
    data:t_conv_data TYPE truxs_t_text_data.
    CALL FUNCTION 'SAP_CONVERT_TO_TEX_FORMAT'
      EXPORTING
        i_field_seperator          = ', '
      TABLES
        i_tab_sap_data             = t_file
    CHANGING
       i_tab_converted_data       = t_conv_data
    EXCEPTIONS
       conversion_failed          = 1
       OTHERS                     = 2.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        filename                = 'C:\TESTCSV.CSV'
        filetype                = 'ASC'
        write_field_separator   = '  '
      TABLES
        data_tab                = t_file
       fieldnames              = names
      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.

  • Exporting report as PDF and CSV formats same time with out executing DB query twice

    Post Author: cpriyanka
    CA Forum: Exporting
    I am using Crystal Report 9.0 version and Java.
    I am getting "PrintOutputController" from "ReportClientDocument"
    And then by calling export(ReportExportFormat.PDF) generating PDF format report.
    Now I need to generate both PDF and CSV format files same time. How can it be done?
    My understanding is when we call "export" it does the DB query execution and other functionality.
    In that case, if I call "export" two times with two different formats, then DB query will be executed twice and that takes lot of time.
    To avoid, is there a way I can all some API so DB query executed once, but I can export report in to multiple formats?
    I appreciate your help.
    Thanks.

    Post Author: cjmorris1201
    CA Forum: Exporting
    Hello,
    Are you using the "pull" or "push" method for your crystal reports?  If you are using the "pull" method (the report itself executes the sql) then I believe there is no way around having the query execute twice since it is fired off each time you open and export the report.
    If you use the "push" method, however, then you can just create the recordset/dataset and then set the datasouce once for the report.
    Here's a broad overview of push and pull though the Crystal Report Viewer is used.  The viewer may or may not be applicable in your case:
    http://aspalliance.com/265_Crystal_Report_for_Visual_Studio_NET#Page5
    Regards, Carl

  • Download Internal Table in CSV format it gets downloaded in single column

    Hi All
    I am converting Internal Table in CSV format using the FM CONVERT TO CSV FORMAT and then downloading data using GUI_DOWNLOAD FM.
    I have given separator as ','.
    However when I download the data the file is opened in Excel and first 2 to 3 column are merged in to single column and there was separator shown ';'.
    How to overcome this problem.
    Amol

    hI..,
    Check this code..
    <b>
    It first downloads the data in internal table to a CSV format file..
    and then uploads the same data into another internal table and prints it..</b>
    analyze this and use accordingly..
    tables:
      spfli.
    field-symbols : <fs>, <fs1>.
    data:
      w_line(1000),
      w_field(20) type c,
      wa_spfli type spfli.
    data:
      begin of fs_spfli,
        carrid    type spfli-carrid,
        connid    type spfli-connid,
        countryfr type spfli-countryfr,
        countryto type spfli-countryto,
        fltime    type spfli-fltime,
      end of fs_spfli.
    data :
      t_file like standard table
               of w_line
          initial size 0.
    data:
      t_spfli like
    standard table
           of fs_spfli
      initial size 0.
    data:
      t_spfli_up like
        standard table
              of fs_spfli
         initial size 0.
    select carrid
           connid
           countryfr
           countryto
           fltime
      into corresponding fields of table t_spfli
      from spfli.
    loop at t_spfli into fs_spfli.
      do.
        assign component sy-index of structure fs_spfli to <fs>.
        if sy-subrc ne 0.
          exit.
        endif.
        w_field = <fs>.
        condense w_field no-gaps.
        if sy-index eq 1.
          w_line = w_field.
        else.
          concatenate w_line ',' w_field into w_line.
        endif.
      enddo.
      append w_line to t_file.
    endloop.
    call function 'GUI_DOWNLOAD'
      exporting
         BIN_FILESIZE                    =
           filename                        = 'D:\file.txt'
           filetype                        = 'ASC'
         APPEND                          = ' '
         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'
         WK1_N_FORMAT                    = ' '
         WK1_N_SIZE                      = ' '
         WK1_T_FORMAT                    = ' '
         WK1_T_SIZE                      = ' '
       IMPORTING
         FILELENGTH                      =
      tables
        data_tab                           = t_FILE
         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.
    clear t_FILE.
    call function 'GUI_UPLOAD'
      exporting
        filename                      = 'D:\file.txt'
       FILETYPE                       = 'ASC'
      HAS_FIELD_SEPARATOR            = 'X'
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
      CODEPAGE                      = ' '
      IGNORE_CERR                   = ABAP_TRUE
      REPLACEMENT                   = '#'
      CHECK_BOM                     = ' '
      VIRUS_SCAN_PROFILE            =
    IMPORTING
      FILELENGTH                    =
      HEADER                        =
      tables
        data_tab                      = t_FILE
    EXCEPTIONS
       FILE_OPEN_ERROR               = 1
       FILE_READ_ERROR               = 2
       NO_BATCH                      = 3
       GUI_REFUSE_FILETRANSFER       = 4
       INVALID_TYPE                  = 5
       NO_AUTHORITY                  = 6
       UNKNOWN_ERROR                 = 7
       BAD_DATA_FORMAT               = 8
       HEADER_NOT_ALLOWED            = 9
       SEPARATOR_NOT_ALLOWED         = 10
       HEADER_TOO_LONG               = 11
       UNKNOWN_DP_ERROR              = 12
       ACCESS_DENIED                 = 13
       DP_OUT_OF_MEMORY              = 14
       DISK_FULL                     = 15
       DP_TIMEOUT                    = 16
       OTHERS                        = 17
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    clear fs_spfli.
    *constants :
    *C_HTAB value CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB.
    loop at t_file into w_line.
      do.
        if w_line eq space.
          exit.
        endif.
        split w_line at ',' into w_field w_line.
        condense w_field no-gaps.
        assign component sy-index of structure fs_spfli to <fs>.
        <fs> = w_field.
      enddo.
      append fs_spfli to t_spfli_up.
    endloop.
    loop at t_spfli_up into fs_spfli.
      do.
        assign component sy-index of structure fs_spfli to <fs>.
        if sy-subrc ne 0.
          exit.
        endif.
        write <fs>.
      enddo.
      skip.
    endloop.
    reward if it helps u..
    sai ramesh

Maybe you are looking for

  • Time stamp off by two hours - in file name

    When I import, I rename my files to include date and time in the filename, like so: [IMG NR] - [YYYY]-[MM]-[DD] [HH].[MM].cr2 Here's the strange thing: If I do the renaming on import, LR3 consistently adds +2 to the hours. So an image that was taken

  • Using Standart text on mail via SO10

    Hi experts, I got notification  creating an change of IT0019.everything dinamic action Feature m0001 is OK. Now I have anathor problem. in the mail box there is no subcect or mail body.empty notification mail. how I can create standart text via SO10?

  • Resizing every page of a large iWeb website

    I've got a website built in iWeb with well over 100 distinct pages, each auto-formatted as 700 pixels wide. I'm now trying to reset every page to 750 pixels.... anybody know of a quick way to reformat every page to the new size, without having to man

  • Substitution Variable Capacity

    Does anyone remember if there is a substitution variable capacity (how many can exist per database) and what that number is?I've got some nasty reporting requirements for Analyzer which require 72 new variables be added and managed.Bill HodgsonMen's

  • Ical on won't sync

    Not sure when but recently it stopped syncing with my calendar on my imac...it says there's no calendar to sync with'  then...."error was encountered while syncing calendar". Calendar is there and syncs fine with mobile me.... I thought I would unins