Translating Excel query into flat file(.CSV)

Hi,
I have a requirement where i need the Excel Queries to be displayed in Flat file(.CSV) format.
To be more clear i have an excel query but  my client requires this query to be displayed in a Flat file format. Can someone explain me how i can acheive this.
Thanks

Hi All,
Thanks for all the information provided by i missed mentioning one point, actually thse queries are to be automatically schedule. the requirement is like this i need to bring to extract data and build queries export it as a .CSV file these queries are not end user queries so they have to be automatically scheduled and will be picked up by an interface so they do some mapping with the .CSV file we provide.
So we decided to do it in Reporting Agent in Excel format and automate it and send the file to a specific location from where the Interface team can pick it. which doesnt need an user to run the query.
so can someone tell me if i can automate a query and as well as have the query in .CSV format?? I hope i was clear
Thanks.

Similar Messages

  • Loading of flat file (csv) into PSA – no data loaded

    Hi BW-gurus,
    We have an issue regarding loading a flat file (csv) into PSA using an infopackage u2013 (BI 7.0)
    The infopackage has been used for a while. Prior the consultants with SAP_ALL-profile have run the infopackage. Now we want a few super users to run the infopackage.
    We have created a role for the super users, including authorization objects:
    Data Warehousing objects: S_RS_ADMWB
    Activity: 03, 16, 23, 63, 66
    Data Warehousing Workbench obj: INFOAREA, INFOOBJECT, INFOPACKAG, MONITOR, SOURCESYS, WORKBENCH
    Data Warehousing Workbench u2013 datasource (version > BW 3.x): S_RS_DS
    Activity: All
    Datasource: All
    Subobject for New DataSource: All
    Sourcesystem: FILE
    Data Warehousing Workbench u2013 infosource (flex update): S_RS_ISOUR
    Activity: Display, Maintain, Request
    Application Component: All
    InfoSource: All
    InfoSource Subobject: All values
    As mentioned, the infopackage in question, has been used by consultants with SAP_ALL-profile for some time, and been working just fine.  When the super users with the new role are executing the infopackage, the records are found, but not loaded into PSA. The load seems to be stuck, but no error message occurs. The file we are trying to load contains only 15 records.
    Details monitor:
    Overall status: Missing messages or warnings (yellow)
    Requests (messages): Everything ok (green)
      ->  Data request arranged (green)
      ->  Confirmed with: OK (green)
    Extraction (messages): Errors occurred (yellow)
      ->  Data request received (green)
      -> Data selection scheduled (green)
      -> 15 Records sent (0 Records received) (yellow)
      -> Data selection ended (green)
    Transfer (IDocs and TRFC): Missing messages (yellow)
    Processing (data packet):  Warnings received (yellow)
      -> Data package 1 (? Records): Missing messages (yellow)
         -> Inbound processing (0 records): Missing messages (yellow)
         -> Update PSA (0 Records posted): Missing messages (yellow)
         -> Processing end: Missing messages (yellow)
    Have we forgotten something? Any assistance will be highly appreciated!
    Cheers,
    Anne Therese S. Johannessen

    Hi,
    Try to use the transaction ST01 to trace the authorization of the upload with the SAP_ALL. 
    And the enhance your Profile for the super user.
    Best regards
    Matthias

  • Extract work order data from r/3 system in flat file(csv)and export to BI

    Hi,
    I am new in interface.
    I need to extract data regarding actual cost and quantities of work assigned to Service Providers from SAP system and send it to BI for reporting purposes.
    This interface will extract Master data as well as transactional data. Extraction of Master data will be a full extract and that of transactional data will be Delta Extraction.
    Custom development will extract the data from different fields and will export it to flat files (CSV format). This program will amalgamate all the flat files created into one big file and export it to BI system.
    Export of data to BI system will be done by schedule program Control M, which will export the data from SAP system to BI system in batches. Control M is expected to run daily at night.
    Please provide the step-by-step proces to do this.
    Thanks
    Suchi
    Moderator message: anything else? please work yourself first on your requirement.
    Edited by: Thomas Zloch on Mar 25, 2011 1:21 PM

    Hi Ravi,
    you've got to set up the message type MDMRECEIPT for the Idoc distribution from R/3 to XI. Check chapter 5.2 in the IT configuration guide available on <a href="http://service.sap.com/installmdm">MDM Documentation Center</a>. It describes the necessary steps.
    BR Michael

  • Date o/p probelm when download into flat file inf110 tcode in fi

    hi,
      when im create payment transaction in f110 tcode in fi , and selct the record and down load into flat file
    in flat file first line it shows run date same as we given in transaction,but in second line it shows same date as before
    but it shows different date example : firstline it shows 12 .10.2008 and second line 12.10.2008 is right o/p.
             but it shows as first line 12.10.2008,and seconde line 6.10.2008. why it show like that.

    Hi Ganesh,
    As per my understanding you have an issue with the date while downloading it into the Flat file.
    It is displaying the incorrect date in the second line in Flat file. 
    Are you downloading the data in Notepad or in the Excel sheet?
    Can you please elaborate the issue, if it is in Excel sheet then check if it is displaying multiple records for the same date.
    Ex :
                        Date                   Records
                 12 .10.2008             ad
                                             fg
                                             as
                 6.10.2008               we
                                            af
    Check if this is the case...
    Regards,
    Kittu

  • Import data from Oracle table into flat file

    How to import the data in the oracle table into flat file using UTL File of PL/SQL....
    I am new in PL/SQL..
    can someone help me in writing query?

    Note : Not Tested.
    DECLARE
    V1 VARCHAR2(32767);
    F1 UTL_FILE.FILE_TYPE;
    cursor c1 is select ename,empno from emp;
    r_c1 c1%rowtype;
    BEGIN
    -- In this example MAX_LINESIZE is less than GET_LINE's length request
    -- so the number of bytes returned will be 256 or less if a line terminator is seen.
    open c1;
    F1 := UTL_FILE.FOPEN('MYDIR','MYFILE','W',256);
    loop
    fetch c1 into r_c1;
    v1:= r_c1.ename||''||To_char(r_c1.empno);
    UTL_FILE.PUT_LINE (F1, v1,TRUE);
    v1:= null;
    Exit when c1%not found;
    end loop;
    UTL_FILE.FCLOSE(F1);
    END;
    http://download.oracle.com/docs/cd/B19306_01/appdev.102
    ------------------------------------------------------------------

  • How to query the flat files?

    Hi
    How to query the flat files that are used in Etl From EBS source.

    That can be done in OBIEE. Save the flat file as .csv format. Then go to ODBC Administrator on windows machine where you BI server is running, and create an System DSN and select "Microsft Access Text Driver (*.txt, *.csv)" as driver type.
    Next, import tables in RPD using this ODBC connection. Rest of the steps as same as building model from a table source.
    Hope this helps.

  • Creating flat files (.csv) in user defined directory using PL/SQL

    I need to extract data into a flat file (.csv) and store the flat file directly into a directory on local drive as specified by the user at runtime. I do not intend to use the UTL_FILE package. Is there a way put to do this?
    Thanks
    Amit.

    Hi Amit,
    Your users have any shared drive which every one can access? If so follow these steps.
    1> Allow users to select their destination location to an APEX item.
    2> On submit, save the user IP, destination location and user name to a database table.
    3> On submit, using JS, open XLS file template (+kept this template file in shared location+) The template should contain all the macros that will do the needful. I mean they should connect to database and should fill it with data and saving it to user specified location etc.
    Hope it helps.
    Cheers,
    Hari

  • Unattended Daily Exporting of Query to Flat File

    I am VERY new to Oracle and SQL Plus. I've been tasked with automating a query to run unattended daily to export data and store it in a flat file with structured naming convention (CC_MMDDYY.exp). I need to have it be able to an "on demand" query to flat file too. Any help would be appreciated.

    search asktom.oracle.com (temporary unavailable right now) for keyword flat file to obtain a procedure to write the result of a given query to a flat file and that's it. You can then schedule it's execution using DBMS_SCHEDULER or execute it on demand.
    Regards
    Etbin
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:68212348056
    Message was edited by: Etbin
    user596003

  • Exporting R3 tables into Flat Files for BPC

    Dear BPC experts,
    I understand currently the way for BPC to extract data from R3 is via flat files. I have the following queries:
    1) What exactly are the T codes and steps required to export R3 tables into flat files (without going through the OpenHub in BI7)? Can this process be automated?
    2) Is Data Manager of BPC equivalent to SSIS (Integration Services) of SQL Server?
    Please advise. Thanks!!
    SJ

    Hi Soong Jeng,
    I would take a look at the existing BI Extractors for the answer to Q1, I am working on finishing up a HTG regarding this. Look for it very soon.
    Here is the code to dump out data from a BI Extractor directly from ERP.
    You need dev permissions in your ERP system and access to an app server folder. ...Good Luck
    *& Report  Z_EXTRACTOR_TO_FILE                                         *
    report  z_extractor_to_file                     .
    type-pools:
      rsaot.
    parameters:
      p_osrce type roosource-oltpsource,
      p_filnm type rlgrap-filename,
      p_maxsz type rsiodynp4-maxsize default 100,
      p_maxfc type rsiodynp4-calls default 10,
      p_updmd type rsiodynp4-updmode default 'F'.
    data:
      l_lines_read type sy-tabix,
      ls_select type rsselect,
      lt_select type table of rsselect,
      ls_field type rsfieldsel,
      lt_field type table of rsfieldsel,
      l_quiet type rois-genflag value 'X',
      l_readonly type rsiodynp4-readonly value 'X',
      l_desc_type type char1 value 'M',
      lr_data type ref to data,
      lt_oltpsource type rsaot_s_osource,
      l_req_no type rsiodynp4-requnr,
      l_debugmode type rsiodynp4-debugmode,
      l_genmode type rois-genflag,
      l_columns type i,
      l_temp_char type char40,
      l_filename    like rlgrap-filename,
      wa_x030l      like x030l,
      tb_dfies      type standard table of dfies,
      wa_dfies      type dfies,
      begin of tb_flditab occurs 0,
    *   field description
        fldname(40)  type c,
      end of tb_flditab,
      ls_flditab like line of tb_flditab,
      l_file type string.
    field-symbols:
      <lt_data> type standard table,
      <ls_data> type any,
      <ls_field> type any.
    call function 'RSA1_SINGLE_OLTPSOURCE_GET'
      exporting
        i_oltpsource   = p_osrce
      importing
        e_s_oltpsource = lt_oltpsource
      exceptions
        no_authority   = 1
        not_exist      = 2
        inconsistent   = 3
        others         = 4.
    if sy-subrc <> 0.
    * ERROR
    endif.
    create data lr_data type standard table of (lt_oltpsource-exstruct).
    assign lr_data->* to <lt_data>.
    call function 'RSFH_GET_DATA_SIMPLE'
      exporting
        i_requnr                     = l_req_no
        i_osource                    = p_osrce
        i_maxsize                    = p_maxsz
        i_maxfetch                   = p_maxfc
        i_updmode                    = p_updmd
        i_debugmode                  = l_debugmode
        i_abapmemory                 = l_genmode
        i_quiet                      = l_quiet
        i_read_only                  = l_readonly
      importing
        e_lines_read                 = l_lines_read
      tables
        i_t_select                   = lt_select
        i_t_field                    = lt_field
        e_t_data                     = <lt_data>
      exceptions
        generation_error             = 1
        interface_table_error        = 2
        metadata_error               = 3
        error_passed_to_mess_handler = 4
        no_authority                 = 5
        others                       = 6.
    * get table/structure field info
    call function 'GET_FIELDTAB'
      exporting
        langu               = sy-langu
        only                = space
        tabname             = lt_oltpsource-exstruct
        withtext            = 'X'
      importing
        header              = wa_x030l
      tables
        fieldtab            = tb_dfies
      exceptions
        internal_error      = 01
        no_texts_found      = 02
        table_has_no_fields = 03
        table_not_activ     = 04.
    * check result
    case sy-subrc.
      when 0.
    *      copy fieldnames
        loop at tb_dfies into wa_dfies.
          case l_desc_type.
            when 'F'.
              tb_flditab-fldname = wa_dfies-fieldname.
            when 'S'.
              tb_flditab-fldname = wa_dfies-scrtext_s.
            when 'M'.
              tb_flditab-fldname = wa_dfies-scrtext_m.
            when 'L'.
              tb_flditab-fldname = wa_dfies-scrtext_l.
            when others.
    *         use fieldname
              tb_flditab-fldname = wa_dfies-fieldname.
          endcase.
          append tb_flditab.
    *        clear variables
          clear: wa_dfies.
        endloop.
      when others.
        message id sy-msgid type sy-msgty number sy-msgno
        with  sy-subrc raising error_get_dictionary_info.
    endcase.
    describe table tb_flditab lines l_columns.
    " MOVE DATA TO THE APPLICATION SERVER
    open dataset p_filnm for output in text mode encoding utf-8
      with windows linefeed.
    data i type i.
    loop at <lt_data> assigning <ls_data>.
      loop at tb_flditab into ls_flditab.
        i = sy-tabix.
        assign component i of structure <ls_data> to <ls_field>.
        l_temp_char = <ls_field>.
        if i eq 1.
          l_file = l_temp_char.
        else.
          concatenate l_file ',' l_temp_char  into l_file.
        endif.
      endloop.
      transfer l_file to p_filnm.
      clear l_file.
    endloop.
    close dataset p_filnm.
    Cheers,
    Scott
    Edited by: Jeffrey Holdeman on May 25, 2010 4:44 PM
    Added  markup to improve readability
    Edited by: Jeffrey Holdeman on May 25, 2010 4:47 PM

  • Store oracle table into flat file

    Hello,
    How to store oracle table into flat file with comma ( , ) delimiter.
    Thanx
    Murali

    set echo off feedback off termout off heading off pages 0
    spool path/filename
    select cola||','||colb||';'||colc ...
    from tablea;
    spool off

  • Transfer data from Result Set (Execute SQL Task) into Flat File

    Hi to all,
    My problem is this:
     -) I have a stored procedure which use a temporary table in join with another "real" table in select statement. In particular the stored procedure look like this:
    create table #tmp
    col1 varchar(20),
    col2 varchar(50)
    --PUT SOME VALUE IN #TMP
    insert into #tmp
    values ('abc','xyz')
    --SELECT SOME VALUE
    select rt.*
    from realTable rt, #tmp
    where rt.col1 = #tmp.col1
    -) I cannot modify the stored procedure because I'm not admin of database.
    -) I HAVE THE REQUIREMENT OF TRANSFER DATA OF SELECT STATEMENT OF SOTRED PROCEDURE INTO FLAT FILE
    -) THE PROBLEM is that if I use an OLEDB source Task within a Data Flow Task I'm not be able of mapping column from OLEDB source to flat file destination. The reason for this, is that in the "Column page" of OLEDB source task, SSIS do not retrieves
    any column when we using a temporary table. The reason for this, is that SSIS is not be able to retrieve metadata related to temporary table. 
    -) One possible solution to this problem is to use an Execute SQL Task to invoke the stored procedure, store the result returned from stored procedure in a Result Set through a Object type user variable.
    -) The problem now is: How to transfer data from result set to flat file?
    -) Reading here on this forum the solution look be like to use a Script task to transfer data from result set to flat file.
    QUESTIONS: How to transfer data from result set to flat file using a script task?? (I'm not an expert of vb .net) Is it really possible?? P.S.: The number of row returned of stored procedure is very high!
    thanks in advance.

    Hi  Visakh16<abbr
    class="affil"></abbr>
    thanks for the response.
    Your is a good Idea, but I do not have permission to use DDL statement on the database in production environment.

  • Insert into Flat File with no data

    Hello,
    One of my client is encountering a problem in loading data from oracle table to a Flat File.
    We are using a IKM SQL to File.
    A staging area different from Target and defined on the source Logical Schema.
    and options Genreate Header and Insert rows.
    The problem is :
    At the end of the interface execution, which finish without error we see in the file, the header correctly generated which let me think that there's no permission problem with the file.
    But there is no records...
    And I don't know why ???
    There is the .bad and .error files but they are empty.
    The file datastore seems to be well declared with the good delimiters....
    We are using the Sunopsis Driver File :
    com.sunopsis.jdbc.driver.FileDriver
    jdbc:snps:file
    Cause the file are not accepted with the new one ...
    Note that all our interfaces which are reading flat file work fine.
    But there's no one writting in which work.
    If somebody ever had this problem, or just have an idea about this let me know please.
    Cordially,
    BM

    "Bonjour",
    I usually use the snpsoutfile API to unload data into flat file.
    It's not the exact solution at your question, but i's a technical solution.

  • Extracting into Flat Files Using OCI or Pro*C Programs

    Data Extraction into Flat Files from a database Using OCI or Pro*C Programs - please provide me a sample code. It is urgent. Thank you in advance.

    This problem is very simple to solve. Simply use Pro*C, issue an SQL select into a host variable, then use unix "printf" to output the result. An alternative is to use the provided sqlplus utility to grab the data in a script, disabling headers, etc.
    Sadly, this area is a huge, basic hole in the Oracle product offering. While they have an import utility, there is no export utility, except for one that makes binary files not usable outside Oracle. Every other RDBMS I've seen has this. In Informix, you can say something like "export to <filename> select * from <table>", but that syntax is not offered by Oracle Corporation.

  • Automation of Query generation and Conversion to Flat File CSV

    I have a requirement for Generating / Executing the refresh for the existing Query IN BEX automatically on 3 rd Business day of Every Quarter in BEX Analyzer AND also to convert it to flat file after generation. Please give me some documents or exact steps on how to go about this
    automation. Please reply me in detail and soon
    Thanks
    Soniya

    Hi Sir, I will be very grateful if u can clarify
    1. User want the flat  file on the Company Server, which means there are folder on my company BMW server , and he wants to see the flat file there so that he can review it
    2. I saw some AL11 and directories how can I create my directory or Create the file in DIR_HOME and see the file in flat file format it shows like a screen which my user do not want, he just want a flat file.
    3.Please suggest me if this method rscrm_bapi will work or should u suggest download scheduler or report agent and how.
    4. Sorry for the question but my problem and requirement of user is not solved
    please reply soon
    thanks
    soniya

  • Query using flat file in the FROM Statement

    I have a flat file that contains about 10k rows that I need to join to a table with 2million plus rows. My problem is I cannot load the flat file into a Oracle table or create a new table to contain the 10k rows because I lack of permissions to create table on my user account. I have tried using MS-Access to query the two tables using ODBC, but the query times were horribly slow and would time out. I was curious if there is a way of calling the flat file as a table in my SQL statement from Oracle?
    I know the following doesn't work but I was wondering if there is something out there that would allow me to do something like the following?
    example:
    SELECT a.COL1, a.COL2, ff.COLa, FF.COLb
    FROM apple a, c:\temp\flat_file.csv ff
    WHERE a.COLa=ff.COLa
    db version - 10g
    OS - Windows XP Pro
    Thanks in Advance!

    user9339442 wrote:
    I have a flat file that contains about 10k rows that I need to join to a table with 2million plus rows. My problem is I cannot load the flat file into a Oracle table or create a new table to contain the 10k rows because I lack of permissions to create table on my user account. I have tried using MS-Access to query the two tables using ODBC, but the query times were horribly slow and would time out. I was curious if there is a way of calling the flat file as a table in my SQL statement from Oracle?
    I know the following doesn't work but I was wondering if there is something out there that would allow me to do something like the following?
    example:
    SELECT a.COL1, a.COL2, ff.COLa, FF.COLb
    FROM apple a, c:\temp\flat_file.csv ff
    WHERE a.COLa=ff.COLa
    db version - 10g
    OS - Windows XP Pro
    Thanks in Advance!Is there some reason you cannot get the data loaded into the local database?
    If you absolutely cannot (either through creating and loading objects, or having someone else do it for you) i would likely recommend installing your own database (Oracle XE is free and will easily handle your flat file)
    http://www.oracle.com/technetwork/database/express-edition/downloads/index.html
    I would install that, load your data into a schema you create, and then create a database link to the remote database and use that in your query.
    I would highly push you to work with the administrators of the database though and get them to set you up a schema where you can create objects (with access to the objects in other schemas that you require, if only read permitted).

Maybe you are looking for