Export Report to flat file with spaces

I have a report that is several columns wide. It queries data from our SQL based accounting package to create a flat file with spaces(must be accurate). When we go export the file we don't get all of the columns. Any ideas?

Hi,
Are you exporting to CSV or Excel File?
Export to Excel.
Bashir Awan

Similar Messages

  • Export data to flat file with no delimiter

    Hi I've 3 columns in a view that i want to export to a flat file. I don't want the flat file to contain any delimiter such as commas , tabs etc..
    I am using fixed width with the following setting
    Header row delimiter {CR}-{LF}
    Advance Options : 
    InputColumnwith  125
    InputColumnwith 187
    InputColumnwith  7
    When i preview that data it looks correct , divided up into 3 columns
    However when the data is exported to the flat file i get just one long string in the flat file on the first row.
    What do i need to do to get the end of line characters to be identified 
    Thanks In advance 

    Column delimiter is here
    Otherwise header row terminates a file line
    Arthur
    MyBlog
    Twitter

  • How to generate blank spaces at end of the record in a flat file with fixed

    Hi,
    I am generating a flat file with fixed length.
    In my ABAP program, i am able to see the spaces at the end of the recors in debug but when download to applicaiton server i am not able to see those spaces.
    How can i generate blank spaces at the end of the record in a flat file?
    Please update
    Thank you

    How are you downloading the file?  And, How are you looking at the file on the application server?
    Can you provide snippets of your code?
    Cheers
    John

  • Export to flat file with unicode (chinese) characters??

    I have an SSIS (2013) package that needs to send an email notification with query results (via attachment). I have a data flow task with a source sql query that gathers 2 columns - ID and NAME. ID is varchar, NAME is nvarchar (some records have Chinese symbols).
    The destination is a .txt file. When I copy/paste a field w/ Chinese symbols to a .txt file, it shows up fine, so i know Notepad can handle the characters. I also have the .txt file set to Unicode encoding (I also tried ANSI originally). When I run the package,
    it says that it successfully moves 50 fields to the flat file. However, when I open the flat file, I see that it shows 10 records. It stops when it gets to the record with a Chinese symbol in it...but doesn't produce an error. My plan was to then take the
    attachment and use it in a Send Mail task. (i have the smtp/mail notification working fine...just need to figure out how to get the data to all export to the flat file correctly)
    Does anyone know how I can get the ID and NAME fields from a query into an email notification (either as an attachment, or even formatted nicely (with tabs) in an email would work).

    Hi,
    Based on my test, I can reproduce the similar issue in my environment. When we create the Flat File Connection Manager with the default settings, the data in flat file stops when goes to the Chinese characters.
    To fix the issue that makes the Chinese characters to actually get written into the flat file, we should check the Unicode checkbox on the right hand side of Locale property in Flat File Connection Manager. In this way, the flat file can display Chinese
    characters.
    The following screenshot is for your reference:
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Size of Infocube Export to a flat file (.CSV)

    First off, I'm new to BW so I apologize if I use the wrong terminology. I was wondering if there was any way to estimate the size of a flat file infocube export. For example, if I look up all the associated DB tables for a cube, let's call it TESTCUBE, would the total size of those tables be about the size of the TESTCUBE export to a flat file. This assumes that the cube is not compressed in any way. So if the the total DB table size is 100 MB then is the flat file about 100 MB? If not, is there a way to estimate this.
    Thanks!

    Can't say for sure how all DBs that BW run on work, but with Oracle, space is consumed in blocks, not by rows/records. 
    Let's say you have a table where the average row width (record length) is 100 bytes.  In a tablespace that has 8K blocks, in theory, you could fit 81 rows in the block.
    However there is usually a certain amount of freespace left in a block when rows are added to accomodate subsequent inserts/updates.  The BW tables I have looked at default this to 10%. So that means youe have over 800 bytes of the block that might not get filled.  There are other things that can result in space being consumed, such as deletions that will leave dead space, and updates can cause a row to migrate to another block, etc.  Also, space is allocated in chunks as a table grows, and you may add one row to a table that causes a 10MB chunk of storage to be allocated, but it is holding only 1 row.
    So as you can begin to see.  A flat export should require less space than the source table (unless you are using database table compression which could completely invalidate what I have said), but by how much depends on all the things I mentioned, and could change from day to day.
    You could certainly use as a rough rule of thumb, that a flat file export will require the same space and you would be safe (except if you are using db compression).

  • Re: Upload a flat file with multiple field seperators

    HI Experts,
    In my reports program iam trying to  upload  the data with in flat file with multiple seperators
    but data is not uploading can ypu please suggest the solution.
    Is there any function module to upload with multiple field seperators
    Example of flat file:
    E1234     JOHN     BB     HYD     IN     EN
    E1234,BURE,BH,DSNR,IN,EN
    E1236 KIWI KW HYT IN EN
    E1237;BRAD;BW;MSRD;IN;EN
    Thanks & Regards,
    Raghusagar.G

    HI Raghu,
               Use the function module 'GUI_UPLOAD'.
               In that you have to specify the field_separator value = 'X' in export section.
    Regards,
    S.C.K

  • How to create flat file with fixed lenght records

    I need help to export an Oracle table to a flat file with fixed lenght and without columns separator.
    the fixed length is the more important demand.
    My table have 50 columns with varchar, date and number .
    Date and number columns may be empty, null o with values.
    Thanks a lot for any help.
    [email protected]

    Hi,
    You can use this trick:
    SQL>desc t
    Name                                      Null?    Type
    NAME                                               VARCHAR2(20)
    SEX                                                VARCHAR2(1)
    SQL>SELECT LENGTH(LPAD(NAME,20,' ')||LPAD(SEX,1,' ')), LPAD(NAME,20,' ')||LPAD(SEX,1,' ') FROM T;
    LENGTH(LPAD(NAME,20,'')||LPAD(SEX,1,'')) LPAD(NAME,20,'')||LPA
                                          21                    aF
                                          21                    BM
                                          21                    CF
                                          21                    DM
    4 rows selected.
    SQL>SELECT *  FROM t;
    NAME                 S
    a                    F
    B                    M
    C                    F
    D                    M
    4 rows selected.Regards

  • Create a flat file with multiple characters for enclosures

    Hello,
    we use OWB 11g2 (11.2.02).
    Now we try to create a flat file with multiple characters for enclosures. The manual wrote:
    "Enclosures (Left and Right): Some delimited files contain enclosures that denote text strings within a field. If the file contains enclosures, enter an enclosure character in the text box or select one from the list. The list displays commonenclosures. However, you may enter any character. The default for both the left and right enclosure is the double quotation mark ("). You can specify multiple characters and hexadecimal characters as field enclosures."
    But it will not work. The OWB use the first character from the left enclosure definition as left enclosure and the second one as right enclosure !?!
    Did anyone know this behavior? Is there a solution for this problem?
    Thanks and regards
    Norbert

    HI Raghu,
               Use the function module 'GUI_UPLOAD'.
               In that you have to specify the field_separator value = 'X' in export section.
    Regards,
    S.C.K

  • Automate a BI report to flat file on to a FTP server.

    Hello all,
    I have an same issue like the following thread. After extract CSV file successfully to the directory, but unable to find the file. Any thought?
    Automate a BI report to flat file on to a FTP server.
    Regards!

    Need to analyze the business purpose ,however heres my take on it..
    You can utilize 3 options to export query result on to the SAP directories as below and map that path to your FTP server.
    1. Transaction RSCRM_BAPI (still valid in nw2004s)
    2. Transaction RSANWB (analytical Process designer)
    3. Information Broadcasting - KM folder has to be mapped as a file system location.
    Hope it Helps
    Chetan
    @CP..

  • Export Table to flat file and upload to FTP server for external vendor

    I have done some extensive searches on the forums and I think I have an idea but really need some help. Basically have a table that needs to be exported to a flat file and uploaded to a FTP server so that our vendor can get the data Monday-Saturday and automated by sysdate. This data is used to produce daily letters that go out to customers.
    After doing some searching I came across the UTL_FILE package and reading more into this right now but I am not sure if it is what I should be using to create the file.
    I am using TOAD right now and can see how to do it manually however really need the file to create itself and send automatically at 6 am Monday - Saturday with the date at the end of the file name making it a unique file for each day.
    Thanks in advance for all of your help.

    As Justin and others have mentioned I wrote [XUTL_FTP|http://www.chrispoole.co.uk/apps/xutlftp.htm] so you wont find it in the Oracle documentation. It's pure PL/SQL and uses UTL_TCP and implements an integrated PL/SQL FTP client / API. One of it's many overloaded procedures FTP's the contents of a refcursor straight to a FTP server of your choice, meaning no intervening file is required. Since it is pure PL/SQL, it is trivial to schedule using DBMS_JOB/DBMS_SCHEDULER.
    Any questions just ask.
    HTH Chris

  • Exporting tables to flat files

    Hi,
    Can I export tables to flat files(csv) using pl/sql. I mean suppose I have 2 tables 'student' and 'subject' and I want to create two flat files student.csv and subject.csv Please let me know, if I can do it using pl/sql for both the tables in one go.
    Even if I can do it for one table, than I can write a script to automate for all the tables. Please let me know with your suggestions. Appreciate your help.
    Thanks

    As sys user:
    CREATE OR REPLACE DIRECTORY TEST_DIR AS '\tmp\myfiles'
    GRANT READ, WRITE ON DIRECTORY TEST_DIR TO myuser
    /As myuser:
    CREATE OR REPLACE PROCEDURE run_query(p_sql IN VARCHAR2
                                         ,p_dir IN VARCHAR2
                                         ,p_header_file IN VARCHAR2
                                         ,p_data_file IN VARCHAR2 := NULL) IS
      v_finaltxt  VARCHAR2(4000);
      v_v_val     VARCHAR2(4000);
      v_n_val     NUMBER;
      v_d_val     DATE;
      v_ret       NUMBER;
      c           NUMBER;
      d           NUMBER;
      col_cnt     INTEGER;
      f           BOOLEAN;
      rec_tab     DBMS_SQL.DESC_TAB;
      col_num     NUMBER;
      v_fh        UTL_FILE.FILE_TYPE;
      v_samefile  BOOLEAN := (NVL(p_data_file,p_header_file) = p_header_file);
    BEGIN
      c := DBMS_SQL.OPEN_CURSOR;
      DBMS_SQL.PARSE(c, p_sql, DBMS_SQL.NATIVE);
      d := DBMS_SQL.EXECUTE(c);
      DBMS_SQL.DESCRIBE_COLUMNS(c, col_cnt, rec_tab);
      FOR j in 1..col_cnt
      LOOP
        CASE rec_tab(j).col_type
          WHEN 1 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000);
          WHEN 2 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_n_val);
          WHEN 12 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_d_val);
        ELSE
          DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000);
        END CASE;
      END LOOP;
      -- This part outputs the HEADER
      v_fh := UTL_FILE.FOPEN(upper(p_dir),p_header_file,'w',32767);
      FOR j in 1..col_cnt
      LOOP
        v_finaltxt := ltrim(v_finaltxt||','||lower(rec_tab(j).col_name),',');
      END LOOP;
      --  DBMS_OUTPUT.PUT_LINE(v_finaltxt);
      UTL_FILE.PUT_LINE(v_fh, v_finaltxt);
      IF NOT v_samefile THEN
        UTL_FILE.FCLOSE(v_fh);
      END IF;
      -- This part outputs the DATA
      IF NOT v_samefile THEN
        v_fh := UTL_FILE.FOPEN(upper(p_dir),p_data_file,'w',32767);
      END IF;
      LOOP
        v_ret := DBMS_SQL.FETCH_ROWS(c);
        EXIT WHEN v_ret = 0;
        v_finaltxt := NULL;
        FOR j in 1..col_cnt
        LOOP
          CASE rec_tab(j).col_type
            WHEN 1 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_v_val);
                        v_finaltxt := ltrim(v_finaltxt||',"'||v_v_val||'"',',');
            WHEN 2 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_n_val);
                        v_finaltxt := ltrim(v_finaltxt||','||v_n_val,',');
            WHEN 12 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_d_val);
                        v_finaltxt := ltrim(v_finaltxt||','||to_char(v_d_val,'DD/MM/YYYY HH24:MI:SS'),',');
          ELSE
            v_finaltxt := ltrim(v_finaltxt||',"'||v_v_val||'"',',');
          END CASE;
        END LOOP;
      --  DBMS_OUTPUT.PUT_LINE(v_finaltxt);
        UTL_FILE.PUT_LINE(v_fh, v_finaltxt);
      END LOOP;
      UTL_FILE.FCLOSE(v_fh);
      DBMS_SQL.CLOSE_CURSOR(c);
    END;This allows for the header row and the data to be written to seperate files if required.
    e.g.
    SQL> exec run_query('select * from emp','TEST_DIR','output.txt');
    PL/SQL procedure successfully completed.Output.txt file contains:
    empno,ename,job,mgr,hiredate,sal,comm,deptno
    7369,"SMITH","CLERK",7902,17/12/1980 00:00:00,800,,20
    7499,"ALLEN","SALESMAN",7698,20/02/1981 00:00:00,1600,300,30
    7521,"WARD","SALESMAN",7698,22/02/1981 00:00:00,1250,500,30
    7566,"JONES","MANAGER",7839,02/04/1981 00:00:00,2975,,20
    7654,"MARTIN","SALESMAN",7698,28/09/1981 00:00:00,1250,1400,30
    7698,"BLAKE","MANAGER",7839,01/05/1981 00:00:00,2850,,30
    7782,"CLARK","MANAGER",7839,09/06/1981 00:00:00,2450,,10
    7788,"SCOTT","ANALYST",7566,19/04/1987 00:00:00,3000,,20
    7839,"KING","PRESIDENT",,17/11/1981 00:00:00,5000,,10
    7844,"TURNER","SALESMAN",7698,08/09/1981 00:00:00,1500,0,30
    7876,"ADAMS","CLERK",7788,23/05/1987 00:00:00,1100,,20
    7900,"JAMES","CLERK",7698,03/12/1981 00:00:00,950,,30
    7902,"FORD","ANALYST",7566,03/12/1981 00:00:00,3000,,20
    7934,"MILLER","CLERK",7782,23/01/1982 00:00:00,1300,,10The procedure allows for the header and data to go to seperate files if required. Just specifying the "header" filename will put the header and data in the one file.
    Adapt to output different datatypes and styles are required.

  • How to delete the file with space in name

    Hi
    I want to delete the file "test ex.txt" file.
    i run the following command in command prompt.i can delete the file successfully.
    /bin/rm -f /mnt/"test ex.txt"
    I want to run the command from java.So i am using the following code
    String cmd = "/bin/rm -f /mnt/\"test ex.txt\"";
         Runtime rt = Runtime.getRuntime();
    process = rt.exec(cmd);
    The file was not deleted.
    How to delete the file with space in name?
    Help me

    Use the form of exec that takes an array of command + args.
    arr[0] = "/bin/rm"
    arr[1] = "-f"
    arr[2] = "/home/me/some directory with spaces";Or use ProcessBuilder, which is the preferred replacement for Runtime.exec, and which Runtime.exec calls.

  • How can we load a flat file with very, very long lines into a table?

    Hello:
    We have to load a flat file with OWB. The problem is that each of the lines in the file might be up to 30.000 characters long (up to 1.000 units of information in each line, 30 characters long each)
    Of course, our mapping should insert these units of information as independent rows in a table (1.000 rows, in our example).
    We do not know how to go about it. We usually load flat files using table functions, but we am not sure that they will be able to cope with these huge lines. And how should we pivot those lines? Will the Pivot operator do the trick? Or maybe we should pivot those lines outside the database before loading them?
    We are a bit lost. Any suggestion would be appreciated.
    Regards
    Edited by: [email protected] on Oct 29, 2008 8:43 AM
    Edited by: [email protected] on Oct 29, 2008 8:44 AM

    Yes, well, we could define a 1.000 column external table, and then map those 1.000 columns to the Pivot operator… perhaps it would work. But we have been investigating a little bit, and we think that we have found a better solution: there is a unix utility called “fold”. This utility can split our 30.000 character lines in 1.000 lines, 30 characters long each: just what we needed. Then we can load the resulting file using an external table.
    We think this is a much better solution that handling 1.000 columns in the external table and in the Pivot operator.
    Thanks for your help.
    Regards
    Edited by: [email protected] on Oct 29, 2008 10:35 AM

  • How to load a flat file with lot of records

    Hi,
    I am trying to load a flat file with hundreds of records into an apps table. when i create the process and deploy it onto the console it asks for an input in an html form. why does it ask for an input when i have specified the input file directory in my process? is there any way around tis where in it just reads all the records from the flat file directly??is custom queues anyway related to what I am about to do?any documents on this process will be greatly appreciated.If any one can help me on this it will be great. thank you guys....

    After deploying it, do you see if it is active and the status is on from the BPEL console BPEL Process tab? It should not come up to ask for input unless you are clicking it from the Dashboard tab. Do not click it from the Dashboard. Instead you should put some files into the input driectory. Wait few seconds you should see the instances of the BPEL process is created and start to process the files asynchrously.

  • How to load a flat file with utf8 format in odi as source file?

    Hi All,
    Anybody knows how we can load a flat file with utf8 format in odi as source file.Please everybody knows to guide me.
    Regards,
    Sahar

    Could you explain which problem are you facing?
    Francesco

Maybe you are looking for