Error writing data in a flat file using UTL_FILE feature

Hi All,
I have written a package which fetches data from four different cursors and inserts into a temporary table.
Now this temporary table is used to write data in a file using the UTL_FILE feature.
fhandler :=
UTL_FILE.fopen (l_path,'Demand_Transactions_'
|| TO_CHAR (SYSDATE, 'YYYYMMDDHH24MI')
|| '.txt',
'w',
max_linesize => 32767
This table has 62593 records and when it starts writing data into the file from the table it errors out after writing 30045 records with the error - ORA-01722: invalid number.
Can anyome please advise me is it because of the max_linesize => 32767. If not then what can be the possible reason.
Any help in this would be highly appreciated.
Regards,
Shruti

891330 wrote:
Hi All,
I have written a package which fetches data from four different cursors and inserts into a temporary table.
Now this temporary table is used to write data in a file using the UTL_FILE feature.
fhandler :=
UTL_FILE.fopen (l_path,'Demand_Transactions_'
|| TO_CHAR (SYSDATE, 'YYYYMMDDHH24MI')
|| '.txt',
'w',
max_linesize => 32767
This table has 62593 records and when it starts writing data into the file from the table it errors out after writing 30045 records with the error - ORA-01722: invalid number.
Can anyome please advise me is it because of the max_linesize => 32767. If not then what can be the possible reason.Max linesize is the number of characters in a line before a newline has to be issued, not the number of rows written.
The error would indicate that you have a character to number conversion going on somewhere but the characters are not numeric so it's failing that conversion.
This doesn't sound like a UTL_FILE issue, but more to do with how you are building up your strings to output to the file.
You would need to show us your code that builds up the lines you are writing out, with details of the datatypes of any of the columns/variables included in that.

Similar Messages

  • Delete data from a flat file using PL/SQL -- Please help.. urgent

    Hi All,
    We are writing data to a flat file using Text_IO.Put_Line command. We want to delete data / record from that file after data is written onto it.
    Please let us know if this is possible.
    Thanks in advance.
    Vaishali

    There's nothing in UTL_FILE to do this, so your options are either to write a Java stored procedure to do it or to use whatever mechanism the host operating system supports for editing files.
    Alternatively, you could write a PL/SQL procedure to read each line in from the file and then write them out to a second file, discarding the line you don't want along the way.

  • How to read a tab seperated data from a text file using utl_file

    Hi,
    How to read a tab seperated data from a text file using utl_file...
    I know if we use UTL_FILE.get_line we can read the whole line...but i need to read the tab separated value separately.....
    Thanks in advance...
    Naveen

    Naveen Nishad wrote:
    How to read a tab seperated data from a text file using utl_file...
    I know if we use UTL_FILE.get_line we can read the whole line...but i need to read the tab separated value separately.....If it's a text file then UTL_FILE will only allow you to read it a line at a time. It is then up to you to split that string up (search for split string on this forum for methods) into it's individual components.
    If the text file contains a standard structure on each line, i.e. it is a fixed delimited structure, then you could use external tables to read the data instead.

  • Error Loading Data into a flat file

    I am recieving the following error when loading data into a flat file from a flat file. SQL 2005 is my back end DB. If I cut the file iin half approx 500K rows my ODI interface works fine. Not sure what to look at.. I rebuit the interface which before was just dying giving no error and now I am getting this.
    Thanks
    java.lang.Exception
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
         at com.sunopsis.dwg.cmd.e.i(e.java)
         at com.sunopsis.dwg.cmd.g.y(g.java)
         at com.sunopsis.dwg.cmd.e.run(e.java)
         at java.lang.Thread.run(Unknown Source)

    Figured it out, found similar post that stated changing the HEAP size
    Increase the page size in odiparams.bat in the bin folder and restart Designer.
    For eg:
    set ODI_INIT_HEAP=128m
    set ODI_MAX_HEAP=1024m

  • CUNIT error in data loading from flat file after r/3 extraction

    Hi all
    After R/3 business content extraction, if i load data from flat file to info cube, I am getting Conversion exit CUNIT error, what might be the reason, the data in the flat file 0unit column is accurate, and mapping rules are also correct, but still i am getting error with CUNIT.?

    check your unit if you are loading amount or quantities what mapping you have and what you are loading from flat files.
    BK

  • Error in Data upload through Flat files in SAP BPC

    Hi,
    we are trying to upload data from flat files in SAP BPC  but an error is coming viz Object reference not set to an instance of an object .

    Hi,
    Can you please cross check the file structure and the transfer structure.
    Cheers,
    Malli....

  • Need help in writing data to a flat file in .csv format

    Hi All,
    could you please show with a sample example to write data in .csv format using UTL_file.
    The result of the refcursor i want to write to a file in .csv format.
    How can i achieve this.
    Thx

    Hi,
    There are two ways to acheive this.
    First and which I prefer is creating a SQL script which will generate csv file at the specified location in CSV format. And then this SQL script can be called from your cron job similar to how you call stored procedure. Following is pseudo code that can be used -
    set linesize 500
    set echo off
    set feedback off
    set prompt off
    set pagesize 0
    spool <name of the csv file>.csv
    <Your select statement>;
    spool offPut select statement delimiting columns you want to use with ','. E.g. following query should create a CSV file named as abc.csv with one record and 2 columns delimited by comma. First column is ENO and second column is ENAME.
    set linesize 500
    set echo off
    set feedback off
    set prompt off
    set pagesize 0
    spool abc.csv
    select ENO || ',' || ENAME from employee;
    spool offSecond, you can write a PLSQL procedure and then call this procedure from cron job. There is a generic procedure shared by BluShadow some time back which is a very good example for this. Please refer to following link for this solution -
    REF Cursor creating CSV files
    I will suggest to use first method above if possible since it will be faster and less complicated in my opinion. Second method is recommended for scenarios where select statement is created dynamically and cannot be written during development.
    Hope this solves your purpose.
    Cheers,
    Anirudha

  • Error loading data from an XML file using HTTPService

    Hello All,
    I have a runtime error that has got me beat at the moment   I am building an App in Flash Builder 4 to run on AIR.
    The error is as follows: TypeError: Error #1009: Cannot access a property or method of a null object reference.
    What i'm Trying to Do:
    I have 2 DropDownList controls, the first is populated with country names and the other with language options.  All the 1st DropDownList control does
    is set an image control to display the country flag and enable the 2nd DropDownList.
    The 2nd DropDownList sets the langCode variable equal to the chosen language code.  I then call the language function and pass it langCode.  Using this variable, I build up the string
    so that langFilePath will be equal to the XML file (which is "Lang_GBR.xml") location on my desktop and then call the HTTPService.
    As soon as the language function is called, the runtime error occurs and highlights the line with btn_LS_mainMenu.label = loadLangService.lastResult.Lang.GlobalTags.btnMenu;
    where I try to assign the button label with a new value from the XML file.
    I suspect this may be a trivial error but I just can't see it at the moment. 
    Any help or guidance would be appreciated.  Thanks
    Code:
    <fx:Script>
            <![CDATA[
                   [Bindable]
                   public var langFilePath:String;
                   public var langDir:File = File.desktopDirectory;
                   public var langCode:String;
                   public function countrySelect_changeHandler(event:IndexChangeEvent):void
                        switch (countrySelect.selectedItem)
                             case ('United Kingdom'): 
                                  trace("Item Selected was: "+ countrySelect.selectedItem);
                                  img_countryFlag.source = AngolaFlag;
                             break;
                             case ('France'): 
                                   trace("Item Selected was: "+ countrySelect.selectedItem);
                                   img_countryFlag.source = AustraliaFlag;
                             break;
                             default: 
                             break;
                        langSelect.enabled = true;
                        trace("1st dropdownbox");
                   public function langSelect_changeHandler(event:IndexChangeEvent):void
                        switch (langSelect.selectedItem)
                             case ('English'): 
                                 trace("Language Selected was: "+ langSelect.selectedItem);
                                 langCode = "Lang_GBR"; 
                             break;
                             case ('French'): 
                                 trace("Language Selected was: "+ langSelect.selectedItem);
                                 langCode = "Lang_FRA"; 
                             break;
                        language(langCode);
                   public function language(aParam:String):void
                        trace("Code Was: " + aParam);
                        trace("Lang dir: " + langDir.nativePath);
                        langFilePath = langDir.nativePath + "/" + aParam + ".xml";
                        trace("File to load: " + langFilePath);
                        trace("loadLangFile.url: " + loadLangService.url);
                        loadLangService.send();
                        btn_LS_mainMenu.label = loadLangService.lastResult.Lang.GlobalTags.btnMenu;
              ]]>
    </fx:Script>
    <fx:Declarations>
         <s:HTTPService id="loadLangService" url="{langFilePath}"/>
    </fx:Declarations>
    <s:DropDownList x="10" y="201" id="countrySelect" prompt="Please Select Your Country" width="274" enabled="true" change="countrySelect_changeHandler(event)">
    <s:DropDownList x="10" y="348" id="langSelect" prompt="Please Select Your Language" width="274" enabled="false" change="langSelect_changeHandler(event)">

    Don't sure about your XML structure, but for now i see the problem here between this 2 lines of code:
    loadLangService.send();
    btn_LS_mainMenu.label = loadLangService.lastResult.Lang.GlobalTags.btnMenu;
    Think data that your httpService should receive just can't go so fast to populate the lastResult before you call it in the next line
    Try adding a result listener to your service before you send it:
    loadLangService.addEventListener(ResultEvent.RESULT, handler);
    loadLangService.send();
    function handler(event:ResultEvent):void {
         btn_LS_mainMenu.label = loadLangService.lastResult.Lang.GlobalTags.btnMenu;

  • Writing to a flat file using UTL in a procedure

    Hello All,
    I am creating a procedure in which I am trying to write data to a flat file using UTL. Code is shown below:
    CREATE OR REPLACE PROCEDURE wrt_lifungduty IS
       sql_stmt             varchar2(200);
       sql_stmt1            varchar2(200);
       sql_stmt2            varchar2(200);
       v_cur_hdl            integer;
       v_rows_processed     BINARY_INTEGER;
       V_file           UTL_FILE.FILE_TYPE;
       V_flatfile_line      VARCHAR2(98) := NULL;
      V_OBLIGATION_KEY    NUMBER(10);
      V_OBLIGATION_LEVEL  VARCHAR2(6);
      V_KEY_VALUE_1       VARCHAR2(20);
      V_KEY_VALUE_2       VARCHAR2(20);
      V_PARTNER_TYPE      VARCHAR2(6);
      V_PARTNER_ID        VARCHAR2(10);
      V_EXT_INVC_NO       VARCHAR2(30);
      V_EXT_INVC_DATE     DATE;
      V_PAID_DATE         DATE;
      V_PAID_AMT          NUMBER(20,4);
      V_COMP_ID           VARCHAR2(10);
      V_RECEIPT_DATE      DATE;
      V_ORDER_QTY         NUMBER(12,4);
      V_RECEIPT_QTY       NUMBER(12,4);
      V_FRT               NUMBER;
      V_DUTY              NUMBER;
      V_SUPPLIER          NUMBER;
      V_FLAG              VARCHAR2(1);
      V_ELC_COST          NUMBER;
      V_ADJ_ELC           NUMBER;
    Cursor x is
          select OBLIGATION_KEY,OBLIGATION_LEVEL,KEY_VALUE_1,KEY_VALUE_2,PARTNER_TYPE,PARTNER_ID,EXT_INVC_NO,EXT_INVC_DATE
                 ,PAID_DATE,PAID_AMT,COMP_ID,RECEIPT_DATE,ORDER_QTY,RECEIPT_QTY,FRT,DUTY,SUPPLIER,FLAG,ELC_COST,ADJ_ELC
          from RMSBIZ.CT_ANALYZE_LIFUNG_DUTY;    
    BEGIN
    if not UTL_FILE.IS_OPEN(V_file) then
          V_file := UTL_FILE.FOPEN('/exchange/biz/rms2lan','sb_duty.dat','w'); --need to give the location for testing
       end if;
    for x1 in x loop
      V_OBLIGATION_KEY    :=1;
      V_OBLIGATION_LEVEL  :='test';
      V_OBLIGATION_KEY    :=x1.OBLIGATION_KEY;
      V_OBLIGATION_LEVEL  :=x1.OBLIGATION_LEVEL;
      V_KEY_VALUE_1       :=x1.KEY_VALUE_1;
      V_KEY_VALUE_2       :=x1.KEY_VALUE_2;
      V_PARTNER_TYPE      :=x1.PARTNER_TYPE;
      V_PARTNER_ID        :=x1.PARTNER_ID;
      V_EXT_INVC_NO       :=x1.EXT_INVC_NO;
      V_EXT_INVC_DATE     :=x1.EXT_INVC_DATE;
      V_PAID_DATE         :=x1.PAID_DATE;
      V_PAID_AMT          :=x1.PAID_AMT;
      V_COMP_ID           :=x1.COMP_ID;
      V_RECEIPT_DATE      :=x1.RECEIPT_DATE;
      V_ORDER_QTY         :=x1.ORDER_QTY;
      V_RECEIPT_QTY       :=x1.RECEIPT_QTY;
      V_FRT               :=x1.FRT;
      V_DUTY              :=x1.DUTY;
      V_SUPPLIER          :=x1.SUPPLIER;
      V_FLAG              :=x1.FLAG;
      V_ELC_COST          :=x1.ELC_COST;
      V_ADJ_ELC           :=x1.ADJ_ELC;
      V_flatfile_line:=  V_OBLIGATION_KEY||','||
      V_OBLIGATION_LEVEL  ||','||
      V_KEY_VALUE_1       ||','||
      V_KEY_VALUE_2       ||','||
      V_PARTNER_TYPE      ||','||
      V_PARTNER_ID        ||','||
      V_EXT_INVC_NO       ||','||
      V_EXT_INVC_DATE     ||','||
      V_PAID_DATE         ||','||
      V_PAID_AMT          ||','||
      V_COMP_ID           ||','||
      V_RECEIPT_DATE      ||','||
      V_ORDER_QTY         ||','||
      V_RECEIPT_QTY       ||','||
      V_FRT               ||','||
      V_DUTY              ||','||
      V_SUPPLIER          ||','||
      V_FLAG              ||','||
      V_ELC_COST          ||','||
      V_ADJ_ELC;
    V_flatfile_line:= V_OBLIGATION_KEY||','|| V_OBLIGATION_LEVEL;
        UTL_FILE.PUT_LINE(V_file, V_flatfile_line);
    end loop
      commit;
       UTL_FILE.fclose(V_file); 
    END;
                Getting the following errors:
    SQL>Welcome-->
    ERROR at line 1:
    ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "SYS.UTL_FILE", line 98
    ORA-06512: at "SYS.UTL_FILE", line 157
    ORA-06512: at "RMSBIZ.WRT_LIFUNGDUTY", line 39
    ORA-06512: at line 1
    SQL>Welcome-->39
    39* V_file := UTL_FILE.FOPEN('/exchange/biz/rms2lan','sb_duty.dat','w');
    SQL>Welcome-->
    Does any one know why it is erroring out?
    Thanks,
    Chiru

    the code below works if i take out the last 3 columns while writing to the flat file line.
    CREATE OR REPLACE PROCEDURE wrt_lifungduty IS
       sql_stmt             varchar2(200);
       sql_stmt1            varchar2(200);
       sql_stmt2            varchar2(200);
       v_cur_hdl            integer;
       v_rows_processed     BINARY_INTEGER;
       V_file           UTL_FILE.FILE_TYPE;
       V_flatfile_line      VARCHAR2(98) := NULL;
      V_OBLIGATION_KEY    NUMBER(10);
      V_OBLIGATION_LEVEL  VARCHAR2(6);
      V_KEY_VALUE_1       VARCHAR2(20);
      V_KEY_VALUE_2       VARCHAR2(20);
      V_PARTNER_TYPE      VARCHAR2(6);
      V_PARTNER_ID        VARCHAR2(10);
      V_EXT_INVC_NO       VARCHAR2(30);
      V_EXT_INVC_DATE     DATE;
      V_PAID_DATE         DATE;
      V_PAID_AMT          NUMBER(20,4);
      V_COMP_ID           VARCHAR2(10);
      V_RECEIPT_DATE      DATE;
      V_ORDER_QTY         NUMBER(12,4);
      V_RECEIPT_QTY       NUMBER(12,4);
      V_FRT               NUMBER;
      V_DUTY              NUMBER;
      V_SUPPLIER          NUMBER;
      V_FLAG              VARCHAR2(1);
      V_ELC_COST          VARCHAR2(20);
      V_ADJ_ELC           VARCHAR2(20);
    Cursor x is
          select OBLIGATION_KEY,OBLIGATION_LEVEL,KEY_VALUE_1,KEY_VALUE_2,PARTNER_TYPE,PARTNER_ID,EXT_INVC_NO,EXT_INVC_DATE
                 ,PAID_DATE,PAID_AMT,COMP_ID,RECEIPT_DATE,ORDER_QTY,RECEIPT_QTY,FRT,DUTY,SUPPLIER,FLAG,ELC_COST,ADJ_ELC
          from RMSBIZ.CT_ANALYZE_LIFUNG_DUTY;
    BEGIN
    if not UTL_FILE.IS_OPEN(V_file) then
          V_file := UTL_FILE.FOPEN('/rmsapps/rms803/biz/data/utl_files','sb_duty.csv','w'); --need to give the location for testing
       end if;
    for x1 in x loop
      V_OBLIGATION_KEY    :=nvl(x1.OBLIGATION_KEY,null);
      V_OBLIGATION_LEVEL  :=nvl(x1.OBLIGATION_LEVEL,null);
      V_KEY_VALUE_1       :=x1.KEY_VALUE_1;
      V_KEY_VALUE_2       :=x1.KEY_VALUE_2;
      V_PARTNER_TYPE      :=x1.PARTNER_TYPE;
      V_PARTNER_ID        :=x1.PARTNER_ID;
      V_EXT_INVC_NO       :=x1.EXT_INVC_NO;
      V_EXT_INVC_DATE     :=x1.EXT_INVC_DATE;
      V_PAID_DATE         :=x1.PAID_DATE;
      V_PAID_AMT          :=x1.PAID_AMT;
      V_COMP_ID           :=x1.COMP_ID;
      V_RECEIPT_DATE      :=x1.RECEIPT_DATE;
      V_ORDER_QTY         :=x1.ORDER_QTY;
      V_RECEIPT_QTY       :=x1.RECEIPT_QTY;
      V_FRT               :=x1.FRT;
      V_DUTY              :=x1.DUTY;
      V_SUPPLIER          :=x1.SUPPLIER;
      V_FLAG              :=nvl(x1.FLAG,'0');
      V_ELC_COST          :=to_char(nvl(x1.ELC_COST,0));
      V_ADJ_ELC           :=to_char(nvl(x1.ADJ_ELC,0));
      V_flatfile_line:=  V_OBLIGATION_KEY||','||
      V_OBLIGATION_LEVEL  ||','||
      V_KEY_VALUE_1       ||','||
      V_KEY_VALUE_2       ||','||
      V_PARTNER_TYPE      ||','||
      V_PARTNER_ID        ||','||
      V_EXT_INVC_NO       ||','||
      V_EXT_INVC_DATE     ||','||
      V_PAID_DATE         ||','||
      V_PAID_AMT          ||','||
      V_COMP_ID           ||','||
      V_RECEIPT_DATE      ||','||
      V_ORDER_QTY         ||','||
      V_RECEIPT_QTY       ||','||
      V_FRT               ||','||
      V_DUTY              ||','||
      V_SUPPLIER          ||','||
    -- V_FLAG            ||','||
      V_ELC_COST          ||','||
      V_ADJ_ELC;
        UTL_FILE.PUT_LINE(V_file, V_flatfile_line);
    end loop
      commit;
       UTL_FILE.fclose(V_file);
    EXCEPTION
      WHEN UTL_FILE.INVALID_PATH
      THEN
          DBMS_OUTPUT.PUT_LINE ('error: INVALID_PATH');
      WHEN UTL_FILE.INVALID_MODE
      THEN
          DBMS_OUTPUT.PUT_LINE ('error: INVALID_MODE');
      WHEN UTL_FILE.INVALID_FILEHANDLE
      THEN
          DBMS_OUTPUT.PUT_LINE ('error: INVALID_FILEHANDLE');
      WHEN UTL_FILE.INVALID_OPERATION
      THEN
          DBMS_OUTPUT.PUT_LINE ('error: INVALID_OPERATION');
      WHEN UTL_FILE.READ_ERROR
      THEN
          DBMS_OUTPUT.PUT_LINE ('error: READ_ERROR');
      WHEN UTL_FILE.WRITE_ERROR
      THEN
          DBMS_OUTPUT.PUT_LINE ('error: WRITE_ERROR');
      WHEN UTL_FILE.INTERNAL_ERROR
      THEN
          DBMS_OUTPUT.PUT_LINE ('error: INTERNAL_ERROR');
      WHEN OTHERS THEN
         --     v_error_code := SQLCODE;
    --          v_error_message := SQLERRM;
    --         dbms_output.put_line('ERROR: '||v_error_code);
       --       dbms_output.put_line('ERROR: '||v_error_message);
              RAISE_APPLICATION_ERROR(-20003,'sbduty - aborted');  
    END;
    /It fails as soon as it encounters the V_FLAG in the V_flat_file_line. The data in the table has nulls for the FLAG, and some -ve numbers for the ELC_COST,ADJ_ELC..but that should'nt cause any problems does it?
    Whats wrong with those 3 columns?
    Errors that i get are:
    SQL>Welcome-->BEGIN wrt_lifungduty; END;
    ERROR at line 1:
    ORA-20003: sbduty - aborted
    ORA-06512: at "RMSBIZ.WRT_LIFUNGDUTY", line 117
    ORA-06512: at line 1
    SQL>Welcome-->117
    117* RAISE_APPLICATION_ERROR(-20003,'sbduty - aborted');
    SQL>Welcome-->
    Thanks,
    Chiru

  • Loading CLOB data to a flat file in owb 11.2.0.3

    Hi,
    Also,I have one more question.I want to load a table with clob data into a flat file using my owb client 11.2.0.3.But when I run this simple mapping ,I am getting this error:
    ORA-06502:pl/sql:NUMERIC OR VALUE ERROR:CHARACTER STRING BUFFER TOO SMALL.
    Please suggest what needs to be done.

    I was up all night as I had a dead line doing this....
    Turned out my Mapping was corrupted.
    If you do a series of synchronizations by object name, position, id the mapping would end up corrupted.
    I had to delete my staging table operator within the mapping, drag and drop and reconnect and now my loads work just fine..
    Thanks

  • Problem while writing to fixed length flat file from xml

    Hi,
    I have a problem in writing data into a flat file of fixed length...
    My input is a xml file and i want the output as a flat file. I am successful in converting the xml into flat file... But the main problem is, i am unable to insert spaces in between my fields in the flat file.
    The data in the flat file comes without spaces... Any suggestions on writing the schema...
    Regards
    Surya.

    Have a look at this doc
    http://otndnld.oracle.co.jp/document/products/as10g/101310/doc_cd/integrate.1013/b28994/nfb.htm#BGBBAJFD
    your element should be something like this, it pads with a space using the paddedBy expression
    <xsd:element name="C1" type="xsd:string" nxsd:style="fixedLength" nxsd:length="4" nxsd:paddedBy=" " nxsd:padStyle="tail" />if having trouble post what you want the file to look like, and the xsd you are using.
    cheers
    James

  • Error while uploading data from a flat file to the hierarchy

    Hi guys,
    after i upload data from a flat file to the hierarchy, i get a error message "Please select a valid info object" am loading data using PSA, having activated all external chars still get the problem..some help on this please..
    regards
    Sri

    there is o relation of infoobject name in flat file and infoobjet name at BW side.
    please check with the object in the BW and their lengths and type of the object and check your flat file weather u have the same type there,
    now check the sequence of the objects in the transfer rules  and activate them.
    there u go.

  • Error while uploading data from a flat file

    Hi All,
    I am trying to load data from a flat file to an ODS. The flat file contains a field, say FLAT01, of numerical type(Type Decimal, Length 18, Decimals 2). I have created an infoobject, say ZIO10, with type CURR and currency field, 0CURRENCY. In the transfer rules, I have assigned a constant for 0CURRENCY as the flat file doesn't have any currecy field.
    The problem is the flat file doesn't have any value in that field, FLAT01, for some records, infact most of the records. When I try to load it to BW,from applicatin server, it is throwing an error "Contents from field ZIO10 cannot be converted in type CURR ->longtext".
    I have debugged the transfer rules and find that the empty value is being represented as '#' and when it is trying to copy it into the CURR type field, it is throwing the error.
    Can someone please let me know how to solve it? why is it taking '#' for enpty value? Can't we change that?
    Any help would be highly appreciated.
    Best Regards,
    James.
    Message was edited by:
            James Helsinki

    Hi SS,
    I am sorry that I was not clear with my explanation. I have created ZIO10 as a keyfigure with type AMOUNT and the currency as 0CURRENCY.
    There is no currency coming in from the flat file so I used a constant in transfer rules to fill 0CURRENCY.
    The field which is coming as '#' is FLAT01 which is assigned to ZIO10.
    Best Regards,
    James.

  • Export table data in a flat file without using FL

    Hi,
    I am looking for options where I can export table data into a flat file without using FL(File Layout) i.e., by using App Engine only.
    Please share your experience if you did anything as this
    Thanks

    A simple way to export any record (table/view) to an csv fiel, is to create a rowset and loop through all record fields, like below example code
    Local Rowset &RS;
    Local Record &Rec;
    Local File &MYFILE;
    Local string &FileName, &strRecName, &Line, &Seperator, &Value;
    Local number &numRow, &numField;
    &FileName = "c:\temp\test.csv";
    &strRecName = "PSOPRDEFN";
    &Seperator = ";";
    &RS = CreateRowset(@("Record." | &strRecName));
    &RS.Fill();
    &MYFILE = GetFile(&FileName, "W", %FilePath_Absolute);
    If &MYFILE.IsOpen Then
       For &numRow = 1 To &RS.ActiveRowCount
          &Rec = &RS(&numRow).GetRecord(@("RECORD." | &strRecName));
          For &numField = 1 To &Rec.FieldCount
             &Value = String(&Rec.GetField(&numField).Value);
             If &numField = 1 Then
                &Line = &Value;
             Else
                &Line = &Line | &Seperator | &Value;
             End-If;
          End-For;
          &MYFILE.WriteLine(&Line);
       End-For;
    End-If;
    &MYFILE.Close(); You can of course create an application class for generic calling this piece of code.
    Hope it helps.
    Note:
    Do not come complaining to me on performance issues ;)

  • Error while uploading master data attributes thru flat file

    while uploading master data attributes thru flat file i am facing the below errow. can nyone let me know plz.
    Error 8 when compiling the upload program: row 227, message: Data type /BIC/CCDEIO_MAT5_ATTR was found in a new

    This just means that you changed the transfer rules/transfer structure and have not refreshed the workbench yet.  The infopackage data hasn't been updated ... this is similar to a datasource update, where you need to replicate to make sure BW knows the latest version. 
    The best way to correct this error is to reload RSA1.  Every time I make a change to the tr/ts, I always run /nrsa1 to refresh the workbench. 
    Brian

Maybe you are looking for

  • Problem in Creating a Employee...

    Hi all,               I'm  new to SAP HR and when im creating a Employee using PA30...itz asks for Peronnel area , emggroup and emp subgroup , i have given PA and EG when im searching for ESG it's popuping an information (No entry in T001P for person

  • Photoshop CS3 for Windows painfully slow

    I am using Photoshop CS3 on a Windows machine using Vista. It's got a fast dual core processor. Over the last couple months Photoshop has begun operating so slowly that it's practically unusable. I've reset the preferences numerous times. I've upped

  • Importing video from tape??????

    How can I import video from a Hi8 tape into my mac for editing in iMovie. The camera is a Sony CCD-TRV608 with a USB plug NOT firewire Thanks 1.5GHz G4 PowerBook & 2.1 GHz G5 iMac   Mac OS X (10.4.3)  

  • Problems with gammut mapping

    Hi folks. My brother and I are trouble-shooting a colour management issue, but just don't get to the bottom of it. Any help would be greatly appreciated. It seems as if Windows has troubles setting the monitor profile, or at least communicating this

  • Browse For Folder Dialog

    I am trying to display a "Browse For Folder" dialog Note that this is not the JFileChooser with the DIRECTORIES_ONLY flag It is this one http://i.msdn.microsoft.com/Bb964683.ed6b0efa-d190-4995-861d-abc3571b06ac(en-us,office.12).gif There have been se