What is data being Skewed in a TABLE COLUMN in Oracle

Hi All,
I am going through numerous articles in Oracle to understand Cardinality,selectivity,histograms and Data being skewed to understand the characterstics of Oracle Optimizer.I have a hard time understanding the concept of data being skewed for a column in a table in Oracle.I need your help in understanding it.
Thanks,
Rav.

>
With out understanding the proper meaning of Skewness I assumed that a col data is skewed if the NDV of the col is high.
Your previoius statement raised this question now
Is there a corelation between number of distinct values in the column and the Skewness of a column?
>
See this Oracle white paper on Understanding Optimizer Statistics
http://www.oracle.com/technetwork/database/focus-areas/bi-datawarehousing/twp-optimizer-stats-concepts-110711-1354477.pdf
The section on Table and Column Statistics on page 2 has information that will clear this up
>
For example, if a table has 100 records, and the table access evaluates an equality predicate on a column that has 10 distinct values, then the Optimizer, assuming uniform data distribution, estimates the cardinality to be the number of rows in the table divided by the number of distinct values for the column or 100/10 = 10.
Histograms tell the Optimizer about the distribution of data within a column. By default (without a histogram), the Optimizer assumes a uniform distribution of rows across the distinct values in a column. As described above, the Optimizer calculates the cardinality for an equality predicate by dividing the total number of rows in the table by the number of distinct values in the column used in the equality predicate. If the data distribution in that column is not uniform (i.e., a data skew) then the cardinality estimate will be incorrect. In order to accurately reflect a non-uniform data distribution, a histogram is required on the column. The presence of a histogram changes the formula used by the Optimizer to estimate the cardinality, and allows it to generate a more accurate execution plan.
>
Did you notice the phrase 'if the data distribution in that column is not uniform (i.e. a data skew)'?
The NDV doesn't matter. It is the relative magnitude of each distinct value that determines the skew.
SB's example of gender, male or female, is not skewed if the number of 'males' is approximately equal to the number of 'females'.
But if the number of one of them, 'male' for example, is substantially larger than the number of the other then the data is skewed.
Assume a table has 1 million rows. If only one row is 'male' it makes sense to use an index to find it. But it wouldn't make sense to use that index if you were looking for 'female' since all rows but one are 'female'.
But because the NDV is two and there are 1 million rows then without a histogram Oracle would assume a uniform distribution and the query 'WHERE GENDER = 'male' would use a full table scan instead of the index.

Similar Messages

  • Export data from MS sql server table to an oracle table

    I need to move data from a sql server table to an oracle table and when ever the sql server table is updated it needs to automatically update the oracle table. Is there procedure to do this or do I migrate the data once and set up a trigger on the sql server table to update the oracle table? If the trigger is the answer how do I do that?

    You might want to check out Oracle's heterogeneous services functionality if you haven't done so already. Here are a few links:
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14232/toc.htm
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14232/majfeat.htm#sthref74
    Also, consulting the Oracle streams manual may be helpful -- particularly Chapter 5.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14228/toc.htm
    Perhaps someone who is more familiar with SQL Server could provide a more helpful answer.

  • BUG: Export DDL and Data fails for mixed case table/column names

    Hi there,
    I have found a bug in SQL Developer. See details below.
    Description:
    When "Export DDL and Data) function is used on a table/columns not named in UPPERCASE, sql generated by SQL Developer is invalid.
    Steps to reproduce:
    - open SQL Developer, connect to DB
    - make a table named "lowerCase" (in double quotes, so it won't be automatically changed to capital letters)
    - you may also add some columns, for example "lowerCol1", "UpCol2", ALLUPCOL3
    - add some data rows to the table
    - choose Tools -> Export DDL and Data
    - check exporting of tables and data, on "filter" tabs choose your "lowerCase" table
    - press "Apply"
    Error:
    Generated SQL contains invalid INSERTs: mixed-case table and columns are referenced without obligatory double quotes, which yields an error when generated script is executed (see below, relevant line is underlined)
    -- DDL for Table lowerCase
    CREATE TABLE "DBO_HT"."lowerCase"
    (     "lowerCol1" VARCHAR2(100),
         "UpCol2" VARCHAR2(100),
         "ALLUPCOL3" VARCHAR2(100)
    -- DATA FOR TABLE lowerCase
    -- FILTER = none used
    -- INSERTING into lowerCase
    Insert into lowerCase (lowerCol1,UpCol2,ALLUPCOL3) values ('lc','uc','auc');
    -- END DATA FOR TABLE lowerCase
    Remarks
    SQL Developer: version 1.2.1, build MAIN-32.13
    Oracle DBs: 9.2 & Express
    OS: Windows 2000 Professional
    If you need any more details/testing, let me know. I'd really appreciate a quick patch for this issue...
    Alternatively, do you know of any other simple way of copying a single database (it's called a schema in Oracle, right?) from one computer to another? Possibly something so simple like detaching->copying->reattaching mdf (data) files in SQL Server... I thought that this "Export DDL&Data" function will do, but as you can see I couldn't use it.
    I just need a simple solution that works - one operation on source to stuff, get the resulting files to other computer and one operation to have it running there... I think that such scenario is very basic, yet I just can't achieve it and I am simply not allowed to spend more time on it (read: our test project fails, my company rejects my "lobbying" and stays with MSSQL :/ )
    Thanks a lot & bye

    Thanks for your reply.
    ad. 1)
    You're right. I just wanted to give some very short feedback on my experiences with SQL Developer, so I didn't think starting new threads would be necessary, but as I was writing it became much bigger than I initially planned - sorry about that. I will make proper threads as soon as possible. Having "Edit post" button on this forum would also be useful.
    ad. 2)
    Generally, you're right - in most cases it's true that "switching DBMS is a major commitment" and "you will produce terrible code" if you don't learn the new one.
    However, I think that you miss one part of market here - the market that I think Express is also targeted on. I'd call it a "fire&forget databases" market; MySQL comes to mind as possibly most common solution here. It's the rather small systems, possibly web-accessed, whose data-throughput requirements are rather modest; the point is to store data at all, and not necesarily in fastest way, because given the amount of data that is used, even on low-end hardware it will work well enough. What's important here is its general ease of use - how easy is to set up such system, connect and access data, develop a software using it, how much maintenance is needed, how easy this maintenance is, how easy are the most common development tasks as creating a DB, moving a DB from test to production server etc. There, "how easy" directly translates to "how much time we need to set it up", which translates to "how much will the development will cost".
    Considering the current technology, switching the DBMS in such systems is not necesarily a major commitment and believe me that you will not produce terrible code. In many cases it's as simple as changing a switch in your ORM toolkit: hibernate.dialect = Hibernate.Dialect.OracleDialect vs MySQLDialect vs MsSql2005Dialect
    Therefore, in some part of market it's easy to switch DBMS, even on project-by-project basis. The reason to switch will appear when other DBMS makes life easier => development faster. From that point of view, I can understand my colleagues giving me an embarassing look and saying "come on, I won't read all these docs just to have db copied to test server". And it doesn't mean "they are not willing to learn anything new", it's just that they feel such basic task should have self-explaining solution that doesn't require mastering any special knowledge. And if they get such simple solutions somewhere else, it costs them nothing to change the hibernate dialect.
    I think Oracle did the great job with introducing the Express to this "fire&forget" market. The installation is a snap, it just works out of the box, nothing serious to configure, opposite to what I remember from installing and working on Oracle 9 a few years ago. In some places it's still "you need to start SQL*Plus and enter this script", but it's definitely less than before. I also find the SQL Developer a great tool, it can do most of what we need to do with the DB, it's also much better and pleasant to use over Oracle 9 tools. Still, a few basic things still require too much hassle, and I'd say taking your schema to another machine is one of them. So I think that, if you do it well, the "schema copy wizard" you mentioned might be very helpful. If I was to give any general advice for Express line of DB/tools, I'd say "make things simple" - make it "a DB you can't see".
    That's, IMHO, the way to attract more Express users.

  • DATE format - while defining the table column

    Hi Friends,
    I came across a piece of code which was applying a TO_DATE() function on a date type column.
    I have two tables t1 and t2 and they have col1 and col2 columns respectively of type DATE
    t1
    col1 DATE
    t2
    col2 DATEalso there is a variable var1 and is defined as below:
    var1 DATE;now I have conditions as below in the code:
    AND to_date(t1.col1,'dd/mm/yyyy') = to_date(t2.col2,'dd/mm/yyyy')
    AND to_date(t1.col1,'dd/mm/yyyy') = to_date(var1,'dd/mm/yyyy')This code failed on Production with an error: ORA-01861 literal does not match format string
    I changed the code to remove TO_DATE() and it worked fine. Dev clarified that they used this function so that if the two columns or variable are in diff date format.,..they can be put in sync.
    e.g. if col1 is dd/mm/yyyy and col2 is mm/dd/yyyy then there will be an issue.
    My doubt is.. in a given environment if we are creating a table and defining a column of type DATE , or defining a variable of type DATE, can their format be different at any time? I think No.?
    In what scenario can the date format be different?
    Thanks,

    Having said that date format is only for display purposes, if you tend to avoid the error without changing the code then you can modify the NLS_DATE_FORMAT parameter at session level.
    SQL> alter session set nls_date_format = 'dd-mm-yyyy'
      2  /
    Session altered.
    SQL> select to_date(sysdate,'dd/mm/yyyy') from dual
      2  /
    TO_DATE(SY
    29-12-2008
    SQL> alter session set nls_date_format = 'mm-dd-yyyy'
      2  /
    Session altered.
    SQL> select to_date(sysdate,'dd/mm/yyyy') from dual
      2  /
    select to_date(sysdate,'dd/mm/yyyy') from dual
    ERROR at line 1:
    ORA-01843: not a valid month
    SQL> select to_date(sysdate,'mm/dd/yyyy') from dual
      2  /
    TO_DATE(SY
    12-29-2008Thanks,
    Karthick.

  • What are the step involved in online table reorg in oracle 10g?

    Hi All,
    Could you please provide the step by step how to perform the online table reorg ?
    Thaks
    Bala

    Etbin wrote:
    You mean http://docs.oracle.com/cd/B19306_01/appdev.102/b14258/d_redefi.htm#ARPLS042 ?
    Regards
    EtbinNo, not table redefinition, I think he means a tablespace reorg as you can do through Enterprise Manager.

  • Cannot see data in table column

    Hello All,
    There is no data being shown in my table columns as soon as I increased the amount of data that is being placed in each column. how should i fix this?
    Thanks

    Hi Vijay,
    Please explain your question in detail.
    Please check the table Datasource property and check the column data bindings.
    Regards, Anilkumar

  • What table column size is needed to accomodate Unicode characters

    Hi guys,
    I have encounter something which i dont understand and i hope gurus here will shed some light on me.
    I am running a non-unicode database and i decided to port the data over to a unicode database.
    So
    1) i export the schema out --> data.dmp
    2) then i create the unicode database + create a user
    3) then i import the schema into the database
    during the imp i can see that character conversion will take place.
    During importing of data into the unicode database
    I encounter some error
    saying column size is too small
    so i went to check the row that has the column value that is too large to fit in the table.
    I realise it has some [][][][] data.. so i went to the live non-unicode database and find the row. Indeed it has some [][][][] rubbish data which i feel that someone has inserted other language then english into the database.
    But regardless,
    I went to modify the column size to a larger size, now the row can be accommodated. However the data is still [][][].
    q1) why so ? since now my database is unicode, during the import, this column data [][][] should be converted to unicode already but i still have problem seeing what language it is.
    q2) why at the non-unicode database, the [][][] data can fit into the table column size, but on unicode database, the same table column size need to be increase ?
    q3) while doing more research on unicode, it was said that unicode character takes up 2 byte per character. Alot of my table data are exactly the same size of the table column size.
    E.g Name VARCHAR2(5);
    value - 'Peter'
    Now if converting to unicode, characters will take 2byte instead of 1, isnt 'PETER' going to take up 10byte ( 2 byte per character ),
    why is it that i can still accomodate the data into the table column ?
    q4) now with unicode database up, i will be supporting different language characters around the world. How big should i set my column size to ? the longest a name can get ? or ?
    Thanks guys!

    /// does oracle automatically "look" at the each and individual characters in a word and determine how much byte it should take.
    Characters usually originate from a keyboard, which has an associated keyboard layout and an associated character set encoding (a.k.a code page, a.k.a. encoding). This means, the keyboard driver knows that when a key with a letter "á" on it is pressed on a French keyboard, and the associated character set encoding is MS Code Page 1252 (Oracle name WE8MSWIN1252), then one byte with the value 225 is generated. If the associated character set encoding is UTF-16LE (standard internal Windows encoding), two bytes 225 and 0 are generated. When the generated bytes travel through APIs, they may undergo character set conversions from one encoding to another encoding. The conversion algorithms use translation tables to find out how to translate given byte sequence from one encoding to another encoding. In case of translation from WE8MSWIN1252 to AL32UTF8, Oracle will know that the byte sequence resulting from conversion of the code 225 should be 195 followed by 161. For a Chinese characters, for example when converting it from ZHS16GBK, Oracle knows the resulting sequence as well, and this sequence is usually 3 bytes.
    This is how AL32UTF8 data gets into a database. Now, when Oracle processes a multibyte string, and needs to look at individual characters, for example to count them with LENGTH, or take a substring with SUBSTR, it uses information it has about the structure of the character set. Multibyte character sets are of two type: fixed-width and variable-width. Currently, Oracle supports only one fixed-width multibyte character set in the database: AL16UTF16, which is Oracle's name for Unicode UTF-16BE encoding. It supports this character set for NCHAR/NVARCHAR2/NCLOB data types only. This character set uses two bytes per each character code. To find the next code, 2 is simply added to the string pointer.
    All other Oracle multibyte character sets are variable-width character sets, including AL32UTF8. In most cases, the length of each character code can be determined by looking at its first byte. In AL32UTF8, the number of 1-bits in the most significant positions in the first byte before the first 0-bit tells how many bytes a character has. 0 such bits means 1 byte (such codes are identical to 7-bit ASCII), 2 such bits mean two bytes, 3 bits mean 3 bytes, 4 bits mean four bytes. 1 bit (e.g. the bit sequence 10) starts each second, third or fourth byte of a code.
    In other ASCII-based multibyte character sets, the number of bytes is usually determined by the value range of the first byte. Bytes below 128 means a one-byte code, bytes above 128 begin a two- or three-byte sequence, depending on the range.
    There are also EBCDIC-based (mainframe) multibyte character sets, a.k.a shift-sensitive character sets, where a sequence of two-byte codes is introduced by inserting the SO character (code 14=0x0e) and ended by inserting the SI character (code 15=0x0f). There are also character sets, like ISO-2022-JP, which use more complicated byte sequences to define the length and meaning of byte sequences but Oracle supports them only in limited number of places.
    /// e.g i have a word with 4 character. the 3rd character will be a chinese character..the rest are ascii character
    /// will oracle use 4 byte per character regardless its ascii(english) or chinese
    No.
    /// or it will use 1 byte per english character then 3 byte for the chinese character ? e.g.total - 6 bytes taken
    It will use 6 bytes.
    Thnx,
    Sergiusz

  • SQL Loader: handling difference datatypes in data file and table column

    Hi,
    I am not sure if my question is valid but I am having this doubt.
    I am trying to load data from my data file into a table with just a single column of FLOAT datatype using SQL Loader. But very few insertions take place, leaving a large number of record rejected for the same reason-
    Record 7: Rejected - Error on table T1, column MSISDN.
    ORA-01722: invalid number
    The data in my datafile goes like this: (with a single space before every field)
       233207332711<EOFD><EORD>    233208660745<EOFD><EORD>    233200767380<EOFD><EORD>
    Here I want to know if there is any way to type cast the data read from the data file to suit my table column's datatype.
    How do I handle this? I want to load all the data from my datafile into my table.

    Pl continue the discussion in your original post - Pls help: SQL Loader loads only one record

  • External Table error: KUP-04043: table column not found in external source

    I am trying to get the syntaxc correct for an external table.
    I keep getting this error:
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04043: table column not found in external source: SITE
    29913. 00000 - "error in executing %s callout"
    *Cause:    The execution of the specified callout caused an error.
    *Action:   Examine the error messages take appropriate action.
    Data looks like: (some of one of many files, where the character field widths are variable)
    ZZ,ANYOLDDATA,77777,25002000,201103,12,555.555,11.222
    ZZ,ANYOLDDATA,77777,25002300,201103,34,602.162,8.777
    ZZ,ANYOLDDATA,77777,25002400,201103,12,319.127,9.666
    ZZ,OTHERDATA,77121,55069600,201103,34,25.544,1.332
    ZZ,OTHERDATAS,77122,55069600,201103,22, 1.011,0.293
    External table def I have:
    CREATE TABLE MY_INPUT (
    FIRST_CODE VARCHAR2(10),
    SECOND_CODE VARCHAR2(20),
    MY_NUMBER VARCHAR2(20),
    THIRD_CODE VARCHAR2(20),
    YEARMO VARCHAR2(6),
    N NUMBER,
    MEAN NUMBER,
    SD NUMBER
    ORGANIZATION EXTERNAL (
    TYPE ORACLE_LOADER
    DEFAULT DIRECTORY INPUT_DIR
    ACCESS PARAMETERS (
    RECORDS DELIMITED BY newline
    BADFILE INPUT_LOGDIR:'bad.bad'
    LOGFILE INPUT_LOGDIR:'log.log'
    DISCARDFILE INPUT_LOGDIR:'discards.log'
    fields terminated by ',' LRTRIM
    MISSING FIELD VALUES ARE NULL
    REJECT ROWS WITH ALL NULL FIELDS
    ( THIRD_CODE,N,MEAN,SD) )
    LOCATION ( 'myfile.rpt')
    NOPARALLEL
    REJECT LIMIT UNLIMITED;
    I have the directories INPUT_DIR and INPUT_LOGDIR defined, and read/write access granted to the user who creates the table and tried to query from it.
    I have tried various combinations of VARCHAR2 lengths and NUMBER vs VARCHAR2 for some of the numeric fields.
    I am not getting any Bad, Log or Discard files.
    I can do a GET from the SQL prompt, and see the data:
    SQL> GET 'C:\temp\input_dir'myfile.rpt'
    and I see the data.
    Windows 7
    Oracle 11.2
    I am not positive of the newline record delimiter - these files are generated by an automated system. Probably generated on a UNIX machine.
    Any suggestions on what to try would be helpful.
    KUP-04043 error message says to check the syntax .. .I am running out of thigns to check.
    Thank you - Karen

    And the get ( I created the sanitized file, so we have a real working, failing, santiized example):
    SQL> get c:\Inputfiles\myfile.rpt
    1 ZZ,ANYOLDDATA,77777,25002000,201103,12,555.555,11.222
    2 ZZ,ANYOLDDATA,77777,25002300,201103,34,602.162,8.777
    3 ZZ,ANYOLDDATA,77777,25002400,201103,12,319.127,9.666
    4 ZZ,OTHERDATA,77121,55069600,201103,34,25.544,1.332
    5* ZZ,OTHERDATAS,77122,55069600,201103,22, 1.011,0.293
    So the full series is:
    CREATE DIRECTORY INPUT_DIR AS 'C:\InputFiles';
    -- grant READ and WRITE
    GRANT READ ON DIRECTORY INPUT_DIR TO ILQC;
    GRANT WRITE ON DIRECTORY INPUT_DIR TO ILQC;
    -- As SYS, create the bad/log/discard directory:
    CREATE DIRECTORY LOGDIR AS 'C:\InputFiles\Logs';
    -- grant READ and WRITE
    GRANT READ ON DIRECTORY LOGDIR TO ILQC;
    GRANT WRITE ON DIRECTORY LOGDIR TO ILQC;
    CREATE TABLE MY_INPUT (
    FIRST_CODE VARCHAR2(10),
    SECOND_CODE VARCHAR2(20),
    MY_NUMBER VARCHAR2(20),
    THIRD_CODE VARCHAR2(20),
    YEARMO VARCHAR2(6),
    N NUMBER,
    MEAN NUMBER,
    SD NUMBER
    ORGANIZATION EXTERNAL (
    TYPE ORACLE_LOADER
    DEFAULT DIRECTORY INPUT_DIR
    ACCESS PARAMETERS (
    RECORDS DELIMITED BY newline
    BADFILE INPUT_LOGDIR:'bad.bad'
    LOGFILE INPUT_LOGDIR:'log.log'
    DISCARDFILE INPUT_LOGDIR:'discards.log'
    fields terminated by ',' LRTRIM
    MISSING FIELD VALUES ARE NULL
    REJECT ROWS WITH ALL NULL FIELDS
    ( THIRD_CODE,N,MEAN,SD) )
    LOCATION ( 'myfile.rpt')
    NOPARALLEL
    REJECT LIMIT UNLIMITED;
    SELECT * FROM my_input;
    and GET is as above.

  • Rename of table column messed up field in Edit Screen

    I renamed a table column. I have a report page with an edit form page tied to it based on this table. I changed the SQL statement in the Region Source on the report. The appropriate column value is displayed in the report. I changed the Page Item name on the Edit Form page. I changed the Source Value to match the new field name.
    The problem I am running into is when I run the Edit Form page and change the value in the item of the renamed column, the field in the database table is blanked out. Even if I change the value to be the same value, the column is blanked out.
    What did I miss in renaming the table column?

    I've had a similar problem. I added a couple of new columns to a table and attempted to manually add the fields to an existing form. However, as described above, whatever value was entered on the screen, a NULL was stored on the database.
    I created a new form using the Form Wizard and copied the columns between pages and got them working. In the process, I tracked the problem down to the variable name.
    For example: for the column PRC_SCHEDULABLE, a item named P5_SCHEDULABLE works but any other item name produces the NULL problem.

  • API to register table/column in the Apps

    Guys,
    I'm adding several columns to a table and forgot what the API was to register the table and columns so that I can then register DFFs.
    I'm already very familiar with: fnd_descr_flex_col_usage_pkg.load_row
    I need the API used to register the table/columns with Oracle Apps. The columns won't even show up through the form to register the DFF.
    Thanks in advance!
    Scott
    Edited by: sreese on Jul 16, 2012 3:56 PM

    sreese wrote:
    I found it. Thanks for looking.
    •ADD_DD.REGISTER_TABLE
    ad_dd.register_table ('Application short name', 'EMAIL_TEMPLATES', 'T');
    •ADD_DD.REGISTER_COLUMNThanks for the update and for sharing the solution!

  • Encrypt a table column

    Hello,
    How can I encrypt a table column using oracle. It is more like the password column of the dba_users dictionary views.
    Michael Enudi

    Two other options.
    1.DBMS_CRYPTO
    http://download.oracle.com/docs/cd/B19306_01/network.102/b14266/apdvncrp.htm#sthref2539
    2.DBMS_OBFUSCATION_TOOLKIT => enables an application to encrypt data using either the Data Encryption Standard (DES) or the Triple DES algorithms.
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_obtool.htm#sthref4962

  • My requirement is to update 3 valuesets daily based on data coming to my staging table. What is the API used for this and how to map any API to our staging table? I am totally new to oracle and apps. Please help. Thanks!

    My requirement is to update 3 valuesets daily based on data coming to my staging table. What is the API used for this and how to map any API to our staging table? I am totally new to oracle and apps. Please help. Thanks!

    Hi,
    You could use FND_FLEX_LOADER_APIS.UP_VALUE_SET_VALUE to upload them from staging table (I suppose you mean value set values...).
    You can find a sample scripts if you google around.
    What do you mean "how to map any API to our staging table" ?
    You should do at least the following mapping (which column(s) in the staging table will provide these information):
    - the 3 value sets name which you're going to update/upload (I suppose these are existing value sets or which have been already created)
    - the value set values and  description
    Try to start with something and if there is any issues the community could then help... but for the time being with the description of the problem you have provided, that's the best I can do...

  • Query data being picked from which data targets and dimension tables.

    Hi Guys,
    I need help from you people.
    My query is "If we execute any query, i want to know from which data targets and from which dimension tables data being read in the run time", is there any program or any table to find this data.
    thanks in advacne.
    Regards
    Prasad

    Hi Prasad,
    We will get Data target information in query level in information TAB.
    If you want get dimension tables information also you need use technical business content(bwstatistics) Cubes and need to customize the required information. I think standard statisics cubes is not provide dimention tables information. Need to customize that.
    Hope it will help for you.
    Thanks,
    Chandra

  • How to delimited text file data being downloaded in Application server

    Hi All,
    How to delimited or having a tab between each fields in the data being downloaded to  Application server. Please provide an example of code or how i should make changes to my below coding. Thanks.
    eg. the out file in application server.
    Field1#Field2#Field3
    what I currently get was as below:-
    Field1Field2Field3
    My coding:
    FORM download_outfile.
      DATA : xfer(400).
      IF rb_locl EQ 'X'.
        DESCRIBE TABLE itab LINES sy-tfill.
        IF sy-tfill GT 0.
          CALL FUNCTION 'WS_DOWNLOAD'
               EXPORTING
                    filename            = p_file
                    filetype            = 'DAT'
               TABLES
                    data_tab            = itab
               EXCEPTIONS
                    file_open_error     = 1
                    file_write_error    = 2
                    invalid_filesize    = 3
                    invalid_table_width = 4
                    invalid_type        = 5
                    no_batch            = 6
                    unknown_error       = 7
                    OTHERS              = 8.
          IF sy-subrc EQ 0.
            WRITE : / 'download done’.
          ELSE.
            WRITE : / '4)Error occured'.
          ENDIF.
        ENDIF.
      ELSE.
        OPEN DATASET p_file FOR OUTPUT IN TEXT MODE.
        DATA : l_subrc LIKE sy-subrc.
        LOOP AT itab.
          MOVE itab TO xfer.
          TRANSFER xfer TO p_file.
          IF sy-subrc NE 0.
            l_subrc = sy-subrc.
          ENDIF.
        ENDLOOP.
        IF l_subrc EQ 0.
          WRITE :/ 'download done’.
        ELSE.
          WRITE :/ 'error occurred’.
        ENDIF.
        CLOSE DATASET p_file.
      ENDIF.
    ENDFORM

    Hi,
    Please check this sample codes.
    OPEN DATASET P_DOWN FOR OUTPUT IN TEXT MODE. " P_DOWN is the file to download
      IF SY-SUBRC = 0.
        CLEAR V_STRING.
    *-- Download to the file
        LOOP AT IT_DOWN.
          CONCATENATE IT_DOWN-DISTTYPE
                      IT_DOWN-O_CITY
                      IT_DOWN-O_REGIO
                      IT_DOWN-O_PSTLZ
                      IT_DOWN-O_CTRY
                      IT_DOWN-D_CITY
                      IT_DOWN-D_REGIO
                      IT_DOWN-D_PSTLZ
                      IT_DOWN-D_CTRY
                      IT_DOWN-DISTANCE
                 INTO V_STRING
                 SEPARATED BY '09'.    " here 09 is the tab delimeter
          TRANSFER V_STRING TO P_DOWN.
          CLEAR V_STRING.
        ENDLOOP. 
    Regards,
    Ferry Lianto

Maybe you are looking for

  • 4th Gen iPod - Can't Restore

    I have a 4th generation iPod. I had a song start to skip one day and the next time I tried to connect to my computer iTunes did not recognize my iPod. I've gone through all the suggested steps on the website even up to and including uninstalling/rein

  • Apple application support part of itunes does not download

    I downloaded iTunes then when I go to run it the following comes up, the apple application support was not downloaded, remove iTunes and reinstall. still not happening

  • Trying to burn a playlist to CD

    The burn process starts and after a short while I get an error message 4315 saying unable to finish. It's purchased music and I am authorized to play it on my computer. I know that it has worked before but now it won't.

  • The application was not installed because it is not signed

    Hi I am having a weird problem with some apps following a restore. When I synch with iTunes, some apps are installed, and others get an error "the application was not installed because it is not signed". These are ordinary apps, such as facebook. The

  • SolMan 7.1 System monitoring - Error

      Hello I have a problem with a few metrics in system monitoring. Now I have tried everything I've found on the internet and I have worked through several lines of evidence. Has everything but no avail. Maybe someone has a tip. Thanks and regards