Extracting data in .txt which is enclosed in double quote," "

Hello everyone,
I am trying to read data from a .txt file which look like below.
"13.000000,393.000000 13.000000,291.000000 92.000000,284.000000 94.000000,380.000000 64.000000,385.000000 13.000000,388.000000 "The problem is every time i tried to read and save the data, i also save the double quote sign. Is there anyway to ignore the double quote sign? I am using the below coding to read and save the data in double array. Anyway will be great.
     FileReader fread=null;
         BufferedReader bread = new BufferedReader(new FileReader("test1.txt"));
            java.io.File file=new java.io.File("test1.txt");
         java.util.Scanner input=new java.util.Scanner(file);
         while(input.hasNext()){
          String arr=bread.readLine();
String[][] str = buildArray(arr);

veldhanas wrote:
Hi,
String yourString = bread.readLine();        
         String substring = yourString.substring(1,yourString.length()-1);
         System.out.println(substring);
[See the String class |http://java.sun.com/javase/6/docs/api/java/lang/String.html]
ThanksWatch out for those empty lines...

Similar Messages

  • How to extract data from MBO which has input parameters

    Dear All,
    I have a requirement to show the material price and material stock.I have created MBOs which takes Plant and Material as its input.
    I have to make an android native application which will show the material stock and material price according to the input Material and Plant.
    So how can I extract data from these MBOs ?

    Have you already got the BAPIs details? If yes please check their structures and see how they are related to get the desired output. You should consult an abaper for this requirement.
    Meanwhile, you can check these posts:
    A workflow Application to Release A Purchase Order...
    Developing SAP Android Mobile app from scratch - Part 1
    Regards,
    Jitendra

  • GetColList to return fields enclosed in double quote?

    hi.. newbie question.. I searched but couldnt find an answer..
    I have a connection to progress tables, where the tablenames & column names contain hyphen (ie: "gla-account"."account-no")..
    the getColList from LKM failed to enclosed the column names in double quotes, I tried inserting \" into the getColList codes but it kept crashing.. what's the correct syntax to add double quotes ?
    thanks..
    HT

    hi Cezar, actually, when i tested it - it worked fine with selecting tables if column-names do not contain hyphen.
    when the datastore contains column with hyphen, getColList just refused to come back at all.. so it looks like getColList cannot read from the model ?

  • How to extract data using DSources which do not support Delta

    Hi forum,
    Iam using a data source which does not support delta. In such a scenario what should i do For subsequent extractions.Will i have to opt for full load every time, if so then how will the double data records be treated. Pls help me out of this situation. In RSA6 if i click on the data source there i can find a check box for enabling delta , but again that is greyed out. If i want to change that what steps should i follow.
    All the helpfull answers and solutions would be thanked by assigning full points.
    Regards
    Pallavi

    Can you give me the data source name please.
    If it is a standard Business Content Datasource and it does not support delta(or delta is not enabled) then you dont have any choice to modify the standard Datasources. In such cases you can create a Generic DS same as Standard DS and enable delta.
    Hope this helps.
    Praveen

  • SQL Loader - double quote within data

    Hi,
    I'm putting together some SQL loader scripts to load source data into a DB. The data we are receiving is comma delimited, optionally enclosed by double quotes (").
    e.g. "abc","123","this is a "test"","987"
    The problem I've got is that some data items contain double quotes ("test") as part of the data and this cause the SQL Loader to fall over with the error:
    Record 14644: Rejected - Error on table x, column y.
    no terminator found after TERMINATED and ENCLOSED field
    Is it possible to load this without changing the extraction process from the source system?
    My .ctl file looks like this:
    LOAD DATA
         INFILE '../data/toload/BR_ADDRESS.CSV'
         APPEND INTO TABLE STA_COMP_BRADD
         FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"'
         etc....
    Message was edited by:
    MaximumStagg

    Hi,
    Look in to this in Oracle documentation:
    "If two delimiter characters are encountered next to each other, a single occurrence of the delimiter character is used in the data value. For example, 'DON''T' is stored as DON'T. However, if the field consists of just two delimiter characters, its value is null."
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/ldr_field_list.htm
    Thanks,
    Kishore

  • How to enclosed the column with in double quotes while spooling to csv fie

    Dear Members,
    I have to spool a sql to a CSV file. I have two columns to spool one is vendor_id and another is vendor_name. But the 2nd column vendor_name has commas in it so if i see the o/p it looks like this:
    Suppose vendor_id = 12790 vendor_name = T T I, INCORPORATED
    when i see the csv file it looks
    12790,T T I, INCORPORATED
    I want each column be enclosed in double quotes like this
    "12790","T T I, INCORPORATED"
    How can i do this in sql*plus while spooling to a csv file.
    Thanks
    sandeep

    this?
    SQL> select '"'||'Hi'||'"'||',"'||'how'||'"' from dual;
    '"'||'HI'|
    "Hi","how"

  • In Which R/3 Table, the Extraction Date should be RESET to Limit DELTA ???

    Hi all,
      We have a daily delta extraction setup for DataSource 0FI_GL_4 from R/3 into ODS. I think there is a table on R/3 side where we could RESET the extraction date (?) to limit the delta reload incase something goes wrong with delta process. Without this reset, it may take 2-3 WEEKS for us.
    Is any one has any idea about this table , PLEASE....
    Thanks.

    hi Venkat,
    check oss note 485958-BW-BCT-FI: Repeating delta extractions
    Symptom
    This note provides the option of repeating delta extractions under certain conditions.
    The note is valid for the DataSources listed below:
    0FI_AP_4 - Accounts Payable: Line Items
    0FI_AR_4 - Accounts Receivable: Line Items
    0FI_GL_4 - General Ledger: Line Items
    0FI_TX_4  Taxes: Line Items
    0FI_AP_6  Accounts Payable: Transaction Figures Using Delta Extraction
    0FI_AR_6  Accounts Receivable: Transaction Figures Using Delta Extraction
    0FI_GL_6 - General Ledger:  Transaction Figures Using Delta Extraction
    0FI_AP_7 - Accounts Payable: Special G/L Transaction Figures Using Delta Extraction
    0FI_AR_7 - Accounts Receivable:  Special G/L Transaction Figures Using Delta Extraction
    0FI_GL_7 - General Ledger:  Cost of Sales Accounting Ledger Using Delta Extraction
    0FI_AR_8 - Accounts Receivable: Credit Management: Central Data Using Delta Extraction
    0FI_AR_9 - Accounts Receivable:  Credit Management: Control Area Data Using Delta Extraction
    0FI_AR_10 - Accounts Receivable: Payment History Using Delta Extraction
    Other terms
    BWOM2_TIMEST, TIMESTAMP, BWOM_SETTINGS, LAST_TS, delta, init
    Reason and Prerequisites
    For test or correction purposes you require a function to repeat delta extractions.
    In the standard system, you can repeat the delta extractions for the last sixty days.
    The number of days is defined by the 'DELTIMEST' parameter in the BWOM_SETTINGS table.
    For all DataSources mentioned above you can repeat the delta extraction without problems because all DataSources use an ODS object. The system automatically filters out data that is selected several times.
    Solution
    The solution consists of resetting the time stamps used for the delta extraction in the BWOM2_TIMEST table to a certain date.
    To do this, you must reset the 'X' marker in the 'LAST_TS' column for the last successful delta extraction.
    The next delta extraction then loads all data created or changed as of this date to the BW system.
    To reset the 'X' marker in the 'LAST_TS' column, use the 'BWOM2_TIMEST' report. If the report is not yet available in you system, you can install it as described in Note 836288.
    Caution - important note
    If you repeat several delta extractions in a run using this note, the number of the extracted records will in most cases be smaller than the total of the individual delta extractions.
    This can happen in the following cases:
    If documents are contained in several individual delta extractions due to document changes. The system selects these documents only once.
    If you have set parameter BWFIOVERLA = X in the BWOM_SETTINGS table. (See Note 485958)
    In this case, the upper limit of the period for the data selection is not, as usual, 23:59:59 of the previous day. The system also extracts all existing documents of the current day. These documents are also contained in the following delta extraction.
    1. If you can load the expected data volume in one delta extraction, proceed as follows:
    Execute the 'BWOM2_TIMEST' report for the relevant DataSource.
    Remove the marker in the entry of the last delta extraction.
    In the columns for the date of the time stamp and the time of the time stamp, you can see up to when the individual data extractions have extracted data.
    Select the entry up to which the data in your BW system is still correct.
    Save the changes.
    Do not make any further changes in the BWOM2_TIMEST table.
                  The next delta extraction uses the date + 1 of the selected entry as a lower limit for the data selection and the current date - 1 for the upper limit.
    2. If you must load the expected data volume in several parts, proceed as follows:
    Caution: There are the following two cases:.
    a) The 'BWFIOVERLA' parameter in the BWOM_SETTINGS table is not set.
               Execute the 'BWOM2_TIMEST' report for the relevant DataSource.
               Remove the marker in the entry of the last delta extraction.
               In the columns for the date of the time stamp and the time of the time stamp, you can see up to when the individual data extractions have extracted data.
    Select the entry up to which the data in your BW system is still correct.
               Save the changes.
    Do not make any further changes in the BWOM2_TIMEST table.
                   The next delta extraction uses the date + 1 of the selected entry as a lower limit for the data selection.
    You can control the upper limit for the data selection by changing the ' BWFISAFETY' parameter in the BWOM_SETTINGS table. The upper limit is determined using the current date minus the value of the 'BWFISAFETY' parameter (default = 1).
    If you want to extract the data of the last twenty days in four parts, for example, set the parameter as follows in Transaction SE16:
    before the 1. delta extraction > > BWFISAFETY = 15
    before the 2. delta extraction > > BWFISAFETY = 10
    before the 3. delta extraction > > BWFISAFETY = 5
    before the 4. delta extraction > > BWFISAFETY = 1 (= default)
    b) The 'BWFIOVERLA' parameter in the BWOM_SETTINGS table is set (=X).
               First, deactivate the 'BWFIOVERLA' parameter in the BWOM_SETTINGS table. This is necessary because if you do not do this, the system ignores the settings of the 'BWFISAFETY' parameter.
               Execute the 'BWOM2_TIMEST' report for the relevant DataSource.
               Remove the marker in the entry of the last delta extraction.
               In the columns for the date of the time stamp and the time of the time stamp you can see up to when the individual data extractions have extracted data.
    Do NOT select the entry up to which the data in your BW system is still correct, rather select the entry before that.
               Save the changes.
    Do not make any further changes in the BWOM2_TIMEST table.
                   The next delta extraction uses the date + 1 of the selected entry as a lower limit for the data selection.
    You can control the upper limit for the data selection by changing the ' BWFISAFETY' parameter in the BWOM_SETTINGS table. The upper limit is determined using the current date minus the value of the 'BWFISAFETY' parameter (default = 1).
    If for example you want to extract the data of the last twenty days in four parts, set the parameter in Transaction SE16 as follows:
    before the 1. delta extraction > > BWFISAFETY = 15
    before the 2. delta extraction > > BWFISAFETY = 10
    before the 3. delta extraction > > BWFISAFETY = 5
    before the 4. delta extraction > > BWFISAFETY = 1 (= default)
                    and parameter BWFIOVERLA = X to return to the originaldelta mode.

  • BW standard report which extracts data  from R/3

    Hi,
    Can any one please give me the standard report name which extract data from infotypes (HR infotypes) in R/3 and shows the output.
    Thanks in Advance
    Ravi

    Hi Ravi kumar,
    use the following links
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci1030179,00.html#reporting
    http://help.sap.com/saphelp_nw70/helpdata/en/26/77eb3cad744026e10000000a11405a/frameset.htm
    http://help.sap.com/saphelp_46c/helpdata/en/b7/c447ed9d5411d189b60000e829fbbd/frameset.htm
    with hopes
    ARS

  • Need suggestion on how to extract data from a table

    Many years ago, I wrote many Perl scripts to increase my work productivity.
    Now I am starting learning Java, Javascript and PHP for some purposes. Just wrote a simple html2txt java program.
    Now I need experts' suggestion for one specific purpose - extract data from a html table. One of the examples is here: http://mops.tse.com.tw/nas/t06sa18/200902/A02_2454_200902.htm
    I need to extract datum from the table and make some analysis. (Txt is in Chinese, sorry)
    What is the best way to code it? Java, PHP or other? If Java, any suggestion what classes/module and approach to use?
    Thanks very much.

    xcomme wrote:
    Many years ago, I wrote many Perl scripts to increase my work productivity.
    Now I am starting learning Java, Javascript and PHP for some purposes. Just wrote a simple html2txt java program.
    Now I need experts' suggestion for one specific purpose - extract data from a html table. One of the examples is here: http://mops.tse.com.tw/nas/t06sa18/200902/A02_2454_200902.htm
    I need to extract datum from the table and make some analysis. (Txt is in Chinese, sorry)
    What is the best way to code it? It this a one shot (one time only task)? Then the best way is whatever way you are most comfortable with and which works.
    If on going then I doubt language choice matters but using a html parser rather than attempting to parse it yourself is going to help in any language.
    And are you starting with html files or starting with a http server? The two are very different.

  • I have a problem to  extract data from oracle dump file (.dmp) using oracle database or any other tools.

    There is IMP utility which provides me data as graphical way. But i need extract data in such a way so that i could able to use in my application.
    thanks,
    mohan

    Hi,
    EdStevens
    Actually I was using SQL Developer. Sorry for the wrong define question. Now the real problem is:
    I want to read or extract data in a txt file from Oracle Dump (.dmp) file without using Oracle sqlPlus or Oracle Database.
    No need to say that i am able to extract dump data using sqlPlus. But for that, there is a little burden to install oracle database
    or sql Developer.
    I also listen about Oracle Loader a little bit. Is it a tool for providing extraction of data from Oracle dump file.
    Thanks for your previous reply,
    And now waiting for your suggestion.
    thanks,
    mohan

  • Trouble extracting data from a previously written file

    I am trying to extract two arrays from a previously written file, which contains two arrays, seperated by a /t char. The files are saved in this format;
    Wavelength(nm)ower(W):
    *lambda1**power1*
    *lambda2**power2*
    "lambda#" and "power#" are both actually numbers, but I wanted to illustrate that they correlate. 
    Furthermore, with the extracted data, I would like to write a new file, which uses the information (during another sweep) to calculate a third value (called EQE), which is dependant on the power and current at a given wavelength. So while the VI is reading current per lambda, it should also be able to find out what the power value at said lambda was and calculate the EQE.
    The VIs I have so far are attached. The third portion of "problem.vi" is enclosed in a while loop, so it repeats a lot of times.
    Thank you very much
    Solved!
    Go to Solution.
    Attachments:
    Problem.vi ‏36 KB

    MAELV wrote:
    How would I begin from the second line?
    Use a Read Text File function.  Right-click on it and there will be an option to read lines or characters.  If you set it to read lines and leave the number unwired, it will by default read a single line.  You don't care about the header data, so don't worry about the output unless you want to show it on the front panel for debug reasons.  From there, read the rest of the file as you already have.
    MAELV wrote:
    When I have execution highlighted, the wavelength index number seems to get stuck fairly quickly (at say #51) where as the power index continually lower to zero.
    I'm not sure what you mean by this.  Can you post an example file as well so I can play around with what you are seeing?
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines
    Attachments:
    Read Lines.png ‏5 KB

  • Open Hub: How-to doc "How to Extract data with Open Hub to a Logical File"

    Hi all,
    We are using open hub to download transaction files from infocubes to application server, and would like to have filename which is dynamic based period and year, i.e. period and year of the transaction data to be downloaded. 
    I understand we could use logical file for this purpose.  However we are not sure how to have the period and year to be dynamically derived in filename.
    I have read in sdn a number of posted messages on a similar topic and many have suggested a 'How-to' paper titled "How to Extract data with Open Hub to a Logical Filename".  However i could not seem to be able to get document from the link given. 
    Just wonder if anyone has the correct or latest link to the document, or would appreciate if you could share the document with all in sdn if you have a copy.
    Many thanks and best regards,
    Victoria

    Hi,
    After creating open hub press F1 in Application server file name text box from the help window there u Click on Maintain 'Client independent file names and file paths'  then u will be taken to the Implementation guide screen > click on Cross client maintanance of file name > create a logical file path by clicking on new entiries > after creating logical file path now go to Logical file name definition there give your Logical file , name , physical file (ur file name followed by month or year what ever is applicable (press f1 for more info)) , data format (ASC) , application area (BW) and logical path (choose from F4 selection which u have created first), now goto Assignment of  physical path to logical path > give syntax group >physical path is the path u gave at logical file name definition.
    however we have created a logical path file name to identify the file by sys date but ur requirement seems to be of dynamic date of tranaction data...may u can achieve this by creating a variable. U can see the help from F1 that would be of much help to u. All the above steps i have explained will help u create a dynamic logical file.
    hope this helps u to some extent.
    Regards

  • Unable to extract data from an AS/400 system.

    Hello experts.
    We are trying to extract data from an AS/400 system but not having any success until now.
    I´ll write down you the stepts that we have followed until now:
    1.- Create a DB Connect between both systems
    2.- Create a Source System from AS400 in the workbench under DB Connect Directory
    3.- Generate datasources from tebles specified in the schema of the connection
    break point -
    At this point, we had a problem with some tables with at least one fieldname containing character "Ñ".
    After asking some possible solutions to SAP, the told us this is not supported, as the system can´t have any object with character "Ñ", so the transfer structure was unable to activate with this fields in the datasource.
    --- end of brek point --
    4.- After those issues, we´ve decided to implement, in another schema, views from those tables which had the fieldnames with that character "Ñ", changing them to an "N".
    5.- We´ve created another source system with that schema, and user than can see that schema.
    6.- To be able to see those views, in transaction RSDBC, we had to deactivate the two checkboxes in the first window ( Choose tables and Choose views) .
    7.- Right afeter, we could generate correctly the datasources from this logical tables.
    8.- We have designed  the hole dataflow for this datasources and everithing went rigth.
    9.- But wen we tried to execute the infopackage to extract data from those logic tables, we cannot get any registers. Acctualy the charge remains yellow after the job have finished.
    Please, I would appreciate any help you could give us on this problem.
    Thank you very much
    Regards
    Joaquin

    I´d like ti add something to this thread, and maybe clarify a littel bit the question.
    The only way that the BW system recognizes those logical tables, through transaction RSDBC is checking out the two boxes on this transaction, "Select Tables" and "Select Views".
    I don´t know haw these logical tables have been created, bus does this mean that the are not neither tables or views as BW understand them.
    Please, if someone knows anythin about this, answer to this thread.
    Thank you very much.
    Joaquin Sobrido

  • How to create a RFC destination for extracting data to HANA

    Hello All,
    Could someone help me in providing a document or note on how to create a RFC destination for extracting data from SAP data source to HANA using SAP LT replication server ?
    I am able to create a data base connection while transforming data from non SAP data source,but wasnt able to transform data which is from SAP abap tables .

    Hi Venkatesh,
    In SM59 t.code we create RFC destinations.
    Go thru the video link for creating RFC destinations step by step
    How to setup a trusted RFC connection between SAP systems: a step-by-step guide - YouTube

  • Adding data in internal table using extracted data

    Hi Experts,
    Good day!
    I have a requirements in our historical data of material price which adding data that are not existing based on data extracted from standard tables such as A004 and KONP.
    Now, i need to use the VALIDFROM (DATAB) value as basis for the latest price.
    To make it more clear, see the example below:
    Extracted data:
    Material Number      Valid From       Valid to          Price
    100101                   01/01/2008      02/01/2008     100.00      
    100101                   02/02/2008      04/02/2008     100.00
    100101                   04/03/2008      08/01/2008     200.00
    100101                   08/02/2008      01/31/2009     300.00  
    100102                   05/02/2008      07/01/2008      10.00
    100102                   07/02/2008      10/31/2008      15.00 
    100102                   11/01/2008      01/31/2009      20.00  
    Output:
    Material Number     Calmonth        Price
    100101                 01/2008           100.00
    100101                 02/2008           100.00
    100101                 03/2008           100.00
    100101                 04/2008           200.00
    100101                 05/2008           200.00
    100101                 06/2008           200.00
    100101                 07/2008           200.00
    100101                 08/2008           300.00
    100101                 09/2008           300.00
    100101                 10/2008           300.00
    100101                 11/2008           300.00
    100101                 12/2008           300.00
    100101                 01/2009           300.00
    100102                 05/2008           10.00
    100102                 06/2008           10.00
    100102                 07/2008           15.00
    100102                 08/2008           15.00
    100102                 09/2008           15.00
    100102                 10/2008           15.00
    100102                 11/2008           20.00
    100102                 12/2008           20.00
    100102                 01/2009           20.00
    Text that are in bold are the added data. What is the best code to do with this?
    How can i come up with this output? Help me please
    Thanks and Godbless,
    nips

    Hi Nips,
    Logic shud b sumthing on similar lines
    lv_count = 1.
    Loop at itab into watab.
    if lv_count > 12.
    lv_count = 1.
    endif.
    if watab-date+0(2) = lv_count.
    append watab to gt_output.
    continue.
    else.
    concatenate lv_count sy-datum+4(4) into watab-date.
    append watab to gt_output.
    endif.
    endloop.
    Best regards,
    Prashant

Maybe you are looking for

  • View iTunes movies on Apple TV, no active Internet connection.

    How can I view my iTunes movies on my Apple TV with no Internet connection? I have set up a local wireless network using an Airport Express that has my MacBook Air, time capsule and Apple TV all connected. I can view non iTunes movies fine. I have ho

  • Reset Row Selection from Web Item Analysis in WAD 7.0

    Hi All, I have a Web Item Type Analysis and I use the Row Selection (SELECT_ROWS) value multiple. Is there a way to reset the selection via a function? The user select some rows and start a planning function via a button. If they would like to start

  • Cannot get airplay to accept my @me account name to stream video?

    I have bought this device to stream from internet off my All in One and IPad 2 cannot get the airplay to accept my @me account name and when I go to the Icloud and look it up it says it is right name? What the heck is going on very frustrating. Worst

  • The voucher were bought,but doesn`t work

    The voucher were bought,money taket, but voucher number non active " Wrong communication with server" HOw to return money or get correct voucher number  Skype login : [Removed for privacy] Sum: 25,00 USD Date of payment: 12.09.2013 Number: [Removed f

  • [Solved] Thunderbird archiving problem

    I have an account on fastmail.fm, and I would like to use Thunderbird to access it. I tried it, however, there seems to be a problem while archiving mail. Whenever I click the archive button, instead of transferring mail to the "Archive" folder of my