Reading GPS Data from a Bluetooth Receiver

I have a problem when I connect my mobile to a Bluetooth GPS Receiver using the JSR 82 BTAPI.
My mobile is reading the NMEA data from the GPS Receiver and analizes the data. The NMEA data from the GPS Receiver is delivered every second.
It works fine for a few minutes. After approximately 5 minutes my mobile hangs (the screen freezes).
I am using a Siemens S65 (MIDP-2.0, CLDC-1.0).
InputStream in = null;
StreamConnection conn = null;
conn = (StreamConnection) Connector.open(BtsppURL);
in = conn.openInputStream();
ByteArrayOutputStream bytearrayoutputstream = new ByteArrayOutputStream();
int ch = 0;
//each NMEA Message ends with <CR><LF>
while ( (ch = in.read()) != '\n') {
          bytearrayoutputstream.write(ch);
bytearrayoutputstream.flush();
byte[] b = bytearrayoutputstream.toByteArray();
String gpsStr = new String(b);Thx for any suggestions,
RH.

Hello RH -
I hope you've resolved your problem by now, but a related problem I've seen under Java - both on Nokia and Siemens phones, is in creating/destroying threads.
If the BT reading thread is being created and destroyed, this will stop working after a short period of time in my experience.
Instead, launch a thread to read the GPS data - say every second or two - and implement the timer.sleep inside the thread.
I'm experiencing the "BT Error Code 4" though on the Siemens S65 phone (a number of posts about this on Siemens Forum), hopefully will have this resolved today.
Best,
-- Rich Moore

Similar Messages

  • Reading bluetooth GPS data from a Nokia phone

    I have a problem reading data from a MTK bluetooth GPS device from a Nokia phone (7610, Symbian S60).
    I wrote a midlet (my phone supports CLDC 1.0/MIDP 2.0) that create a thread to read data
    from the device (using RFCOMM protocol), the code is:
    package gpsreader.bluetooth;
    import javax.microedition.io.*;
    import java.io.*;
    public class BTrxtx implements Runnable {
    private String url = ""; // Connection string to the bluetooth device.
    private boolean canRead; // True if possible to read from device.
    private boolean canWrite; // True if possible to write to device.
    private String btstr = ""; // Last received string.
    private int strCounter;
    private int byteCounter;
    private StreamConnection conn = null;
    private InputStream inputstream = null;
    private OutputStream outputstream = null;
    private boolean newStr;
    private static final char[] EOL_BYTES = {'\015','\012'};
    public BTrxtx(String u) {
    url = u;
    canRead = false;
    canWrite = false;
    strCounter = 0;
    byteCounter = 0;
    newStr = false;
    Thread t = new Thread(this);
    t.start();
    private void openInput() {
    canRead = false;
    try {
    inputstream = conn.openInputStream();
    canRead = true;
    }catch(Exception e) {
    setBtstr("oin");
    System.out.println(e);
    private void openOutput() {
    canWrite = false;
    try {
    outputstream = conn.openOutputStream();
    canWrite = true;
    }catch(Exception e) {
    setBtstr("oout");
    System.out.println(e);
    private void openConn() {
    try {
    conn = (StreamConnection) Connector.open(url);
    openInput();
    openOutput();
    }catch(Exception e) {
    setBtstr("oconn");
    System.out.println("Failed to open connection: " + e);
    private void closeInput() {
    try {
    if(inputstream!=null) {
    inputstream.close();
    }catch(Exception e) {
    setBtstr("cin");
    System.out.println(e);
    private void closeOutput() {
    try {
    if(outputstream!=null) {
    outputstream.close();
    }catch(Exception e) {
    setBtstr("cout");
    System.out.println(e);
    private void closeConn() {
    try {
    closeInput();
    closeOutput();
    if(conn!=null) {
    conn.close();
    }catch(Exception e) {
    setBtstr("cconn");
    System.out.println(e);
    public void run() {
    openConn();
    try {
    Thread.sleep(200);
    }catch(Exception e) {
    try {
    int i = 0;
    char c;
    String s = "";
    // Start reading the data from the GPS
    while(canRead==true) {
    i = inputstream.read(); // read one byte at the time.
    if(i==-1) {
    closeConn();
    try {
    Thread.sleep(200);
    }catch(Exception e) {
    openConn();
    try {
    Thread.sleep(200);
    }catch(Exception e) {
    continue;
    byteCounter++;
    // Every sentence starts with a '$'
    if(i==36){
    if(s.length()>0) {
    strCounter++;
    setBtstr(s);
    s = "";
    c = (char) i;
    s += c;
    System.out.println("GPS return no data");
    setBtstr("BTend");
    }catch(Exception e){
    setBtstr("BTrun");
    System.out.println(e);
    private String byte2hex(byte b) {
    char[] alphaHex = {'0', '1', '2', '3',
    '4', '5', '6', '7',
    '8', '9', 'A', 'B',
    'C', 'D', 'E', 'F',
    int low = (int) b & 0x0f;
    int hi = (int) (b & 0xf0) >> 4;
    String res = String.valueOf(alphaHex[hi]) + String.valueOf(alphaHex[low]);
    return res;
    public boolean sendData(String data) {
    boolean res = false;
    try {
    if((canWrite==true) && (conn!=null) && (outputstream!=null) && (data!=null)){
    StringBuffer rec = new StringBuffer(256);
    // Calculate checksum
    int index = data.length();
    byte checksum = 0;
    while(--index>=0) {
    checksum ^= (byte) data.charAt(index);
    rec.setLength(0);
    rec.append('$');
    rec.append(data);
    rec.append('*');
    rec.append(byte2hex(checksum));
    System.out.println(">"+rec.toString());
    rec.append(EOL_BYTES);
    outputstream.write(rec.toString().getBytes());
    }catch(Exception e) {
    System.out.println(e);
    return res;
    public int getStrCounter() {
    return strCounter;
    public int getByteCounter() {
    return byteCounter;
    public String getBtstr() {
    newStr = false;
    return btstr;
    private void setBtstr(String s) {
    newStr = true;
    btstr = s;
    public boolean receivedData() {
    return newStr;
    The problem is on method "run" at line:
         i = inputstream.read(); // read one byte at the time.
    after reading some data (usually one NMEA string) read method returns -1,
    and even if I try to close the connection and re-open it, after some other data is read,
    the midlet is terminated by the phone with an error (something like "jes-13c-java-comms@1441adE32USER-CBase 40").
    The GPS receiver is working, since from my PC I am able to connect with a bluetooth USB dongle and read outputs using RFCOMM.
    Thx for any suggestions,
    LB.

    Work around.
    I can not say I solved it, but I managed to get a work around:
    I read in another post that there are some problems in thread handling on Nokia phones, so I rewrote the class so that it runs on the main thread and now it seems to work (I can not update the screen while reading from the device, but this isn't a big issue for me).
    Just in case anyone is interested here is the final code:
    import javax.microedition.io.*;
    import java.io.*;
    public class BTBrxtx {
    private String url = ""; // Connection string to the bluetooth device.
    private boolean canRead; // True if possible to read from device.
    private String btstr = ""; // Last received string.
    private int strCounter;
    private int byteCounter;
    private StreamConnection conn = null;
    private InputStream inputstream = null;
    private boolean newStr;
    private String s = "";
    private static final char[] EOL_BYTES = {'\015','\012'};
    public BTBrxtx(String u) {
    url = u;
    canRead = false;
    canWrite = false;
    strCounter = 0;
    byteCounter = 0;
    newStr = false;
    openConn();
    try {
    Thread.sleep(200);
    }catch(Exception e) {
    private void openInput() {
    canRead = false;
    try {
    inputstream = conn.openInputStream();
    canRead = true;
    }catch(Exception e) {
    setBtstr("oin");
    System.out.println(e);
    private void openConn() {
    try {
    conn = (StreamConnection) Connector.open(url);
    openInput();
    }catch(Exception e) {
    setBtstr("oconn");
    System.out.println("Failed to open connection: " + e);
    private void closeInput() {
    try {
    if(inputstream!=null) {
    inputstream.close();
    }catch(Exception e) {
    setBtstr("cin");
    System.out.println(e);
    private void closeConn() {
    try {
    closeInput();
    if(conn!=null) {
    conn.close();
    }catch(Exception e) {
    setBtstr("cconn");
    System.out.println(e);
    public void readInput() {
    try {
    int i = 0;
    char c;
    // Start reading the data from the GPS
    while(canRead==true) {
    i = inputstream.read(); // read one byte at the time.
    if(i==-1) {
    closeConn();
    try {
    Thread.sleep(200);
    }catch(Exception e) {
    openConn();
    try {
    Thread.sleep(200);
    }catch(Exception e) {
    continue;
    byteCounter++;
    // Every sentence starts with a '$'
    if(i==36){
    if(s.length()>0) {
    strCounter++;
    setBtstr(s);
    s = "";
    c = (char) i;
    s += c;
    return;
    c = (char) i;
    s += c;
    System.out.println("GPS return no data");
    setBtstr("BTend");
    }catch(Exception e){
    setBtstr("BTrun");
    System.out.println(e);
    private String byte2hex(byte b) {
    char[] alphaHex = {'0', '1', '2', '3',
    '4', '5', '6', '7',
    '8', '9', 'A', 'B',
    'C', 'D', 'E', 'F',
    int low = (int) b & 0x0f;
    int hi = (int) (b & 0xf0) >> 4;
    String res = String.valueOf(alphaHex[hi]) + String.valueOf(alphaHex[low]);
    return res;
    public int getStrCounter() {
    return strCounter;
    public int getByteCounter() {
    return byteCounter;
    public String getBtstr() {
    newStr = false;
    return btstr;
    private void setBtstr(String s) {
    newStr = true;
    btstr = s;
    public boolean receivedData() {
    return newStr;
    Now I call method readInput in the main thread and than use getBtstr to retrieve data.
    I'm still interested to know if someone had similar problems and how they have been solved.
    Thx

  • Encoding problem while reading binary data from MQ-series

    Dear all,
    we are running on 7.0 and we have an encoding problem while reading binary data from MQ-series. Because we are getting flat strings from queue we use module "Plain2ML" (MessageTransformBean) for wrapping xml-elements around the incoming data.
    The MQ-Series-Server is using CCSID 850, which we configured in connection parameters in communication channel (both parameters for Queuemanager CCSID and also CCSID of target).If there are special characters in the message (which HEX-values differ from codepage to codepage) we get errors in our adapter while executing, please see stack-trace for further analysis below.
    It seems to us that
    1. method ByteToCharUTF8.convert() expects UTF-8 in binary data
    2. Both CCSID parameters are not used anyway in JMS-adapter
    How can we solve this problem without changing anything on MQ-site?
    Here is the stack-trace:
    Catching com.sap.aii.af.mp.module.ModuleException: Transform: failed to execute the transformation: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException caused by: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException
        at com.sap.aii.af.modules.trans.MessageTransformBean.throwModuleException(MessageTransformBean.java:453)
        at com.sap.aii.af.modules.trans.MessageTransformBean.process(MessageTransformBean.java:387)
        at com.sap.aii.af.mp.module.ModuleLocalLocalObjectImpl0_0.process(ModuleLocalLocalObjectImpl0_0.java:103)
        at com.sap.aii.af.mp.ejb.ModuleProcessorBean.process(ModuleProcessorBean.java:292)
        at com.sap.aii.af.mp.processor.ModuleProcessorLocalLocalObjectImpl0_0.process(ModuleProcessorLocalLocalObjectImpl0_0.java:103)
        at com.sap.aii.adapter.jms.core.channel.filter.SendToModuleProcessorFilter.filter(SendToModuleProcessorFilter.java:84)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.ConvertBinaryToXiMessageFilter.filter(ConvertBinaryToXiMessageFilter.java:304)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.ConvertJmsMessageToBinaryFilter.filter(ConvertJmsMessageToBinaryFilter.java:112)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.InboundDuplicateCheckFilter.filter(InboundDuplicateCheckFilter.java:87)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.TxManagerFilter.filterSend(TxManagerFilter.java:123)
        at com.sap.aii.adapter.jms.core.channel.filter.TxManagerFilter.filter(TxManagerFilter.java:59)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.DynamicConfigurationFilter.filter(DynamicConfigurationFilter.java:72)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.PmiAgentFilter.filter(PmiAgentFilter.java:66)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.InboundCorrelationFilter.filter(InboundCorrelationFilter.java:60)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.JmsHeadersProfileFilter.filter(JmsHeadersProfileFilter.java:59)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageInvocationsFilter.filter(MessageInvocationsFilter.java:89)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.JarmMonitorFilter.filter(JarmMonitorFilter.java:57)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.ThreadNamingFilter.filter(ThreadNamingFilter.java:62)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.SenderChannelImpl.doReceive(SenderChannelImpl.java:263)
        at com.sap.aii.adapter.jms.core.channel.ChannelImpl.receive(ChannelImpl.java:437)
        at com.sap.aii.adapter.jms.core.connector.MessageListenerImpl.onMessage(MessageListenerImpl.java:36)
        at com.ibm.mq.jms.MQMessageConsumer$FacadeMessageListener.onMessage(MQMessageConsumer.java:399)
        at com.ibm.msg.client.jms.internal.JmsMessageConsumerImpl$JmsProviderMessageListener.onMessage(JmsMessageConsumerImpl.java:904)
        at com.ibm.msg.client.wmq.v6.jms.internal.MQMessageConsumer.receiveAsync(MQMessageConsumer.java:4249)
        at com.ibm.msg.client.wmq.v6.jms.internal.SessionAsyncHelper.run(SessionAsyncHelper.java:537)
        at java.lang.Thread.run(Thread.java:770)
    Caused by: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException
        at com.sap.aii.messaging.adapter.Conversion.service(Conversion.java:714)
        at com.sap.aii.af.modules.trans.MessageTransformBean.processTransform(MessageTransformBean.java:538)
        at com.sap.aii.af.modules.trans.MessageTransformBean.processTransform(MessageTransformBean.java:528)
        at com.sap.aii.af.modules.trans.MessageTransformBean.processTransform(MessageTransformBean.java:471)
        at com.sap.aii.af.modules.trans.MessageTransformBean.process(MessageTransformBean.java:364)
        ... 36 more
    Caused by: sun.io.MalformedInputException
        at sun.io.ByteToCharUTF8.convert(ByteToCharUTF8.java:270)
        at sun.nio.cs.StreamDecoder$ConverterSD.convertInto(StreamDecoder.java:287)
        at sun.nio.cs.StreamDecoder$ConverterSD.implRead(StreamDecoder.java:337)
        at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:223)
        at java.io.InputStreamReader.read(InputStreamReader.java:208)
        at java.io.BufferedReader.fill(BufferedReader.java:153)
        at java.io.BufferedReader.readLine(BufferedReader.java:316)
        at java.io.LineNumberReader.readLine(LineNumberReader.java:176)
        at com.sap.aii.messaging.adapter.Conversion.convertPlain2XML(Conversion.java:310)
        at com.sap.aii.messaging.adapter.Conversion.service(Conversion.java:709)
        ... 40 more
    Any ideas?
    Kind regards, Stefan

    Hi Stefan,
    for the first MTB now we are using only one parameter: Transform.ContentType = text/plain;charset="ISO-8859-1"
    The second MTB, which does the XML-Wrapping, is configured like this:
    Transform.Class = com.sap.aii.messaging.adapter.Conversion
    Transform.ContentType = application/xml
    xml.conversionType = SimplePlain2XML
    xml.fieldNames = value
    xml.fieldSeparator = §%zulu§%
    xml.processFieldNames = fromConfiguration
    xml.structureTitle = payload
    Both CCSID configuration parameters from the "Source"-Tab we've set to 850.
    Now, we don't get an error anymore - sun.io.malformedInputException - , but, unfortunately, now special character conversion succeeded (we need an "ß" and we get an ISO-HEX-E1 -> á).  E1 is (different from ISO) an "ß" in 850.
    Any ideas?

  • Is it possible to remove or edit gps data from photos?

    Just listened to a Mac Roundtable podcast and they were talking about removing or editing gps data from photos taken with an iPhone but they never explained how to do it.
    Is it possible to remove or edit out latitude and longitude info from photo files?

    Thanks for this, though after looking at it I'm not too inclined to use an app that requires getting into the terminal. Way too technical for me. But thanks.

  • Can I use LabVIEW to load data directly into system memory? The serial card I'm using isn't supported by NI nor does VISA recognize it. I'm using a Win32 function to read the data from the card and now I want it to go directly to system memory.

    Can I use LabVIEW to load data directly into system memory from a VI? The serial card I'm using isn't supported by NI nor does VISA recognize it. I'm using a Call Library function to read the data from the card and now I want it to go directly to system memory.
    The data is being received at 1Mbps.
    Thanks

    Two questions:
    One, if it's a serial card, then presumably it gives you more serial ports, like COM3, COM4, etc. If so, VISA would see the COM ports, and not the card directly. The drivers for the card should make it so that you see the extra serial ports from the OS. If you don't see the extra COM ports from VISA, then it sounds like the drivers for the card are not installed properly. Do the extra COM ports show up in Device Manager?
    Two, you said that you're using a Call Library function to get the data and you want to put it into system memory. Errr.... you just read the data and you have it in memory by definition. Are you saying you need a way to parse the data so it shows up on a graph or something?

  • ALE, use bd79 (converting data from sender to receiver to blank out fields)

    Hi, I am trying to blank four fields out in our FI IDOC for a certain business reason.  These fields must be blank (it is the FIDCC1 message type).   I am trying to use transaction bd79 (converting data from sender to receiver) maintain rules.  Is there a way to blank out these fields using a conversion rule?  I can change data fine but I cannot find a way to blank or null a field out.  Thanks in advance.

    You should have a look at the inbound function module (linked to your inbound process code). sometimes there are checks that if fields are initial that nothing will be changed.

  • Can i get GPS data from my Iphon 4S?

    can i get GPS data from my Iphone 4S?

    There are several apps that will give you lat, long and elevation.  GPS Ally and GPS Recorder are two.

  • Why can't I import gps data from iPhone photos in aperture 3

    I have an iPhone 4 (it's already an old model!) and why can't i still not import GPS-data from photo's on my iPhone 4 in Aperture...
    Importing photos from the iphone just goes fine...

    Richie:
    But do you see the GPS of the iPhone data in Meta data section of the Inspector (set to a preset that shows GPS), as Frank Caggiano asked?
    If the images do import the EXIF data, then you should be able to lift and stamp the GPS coordinates. I do that freuently.
    Select on of your iPhone images and lift the sata
    In the lift&stamp HUD deselect everything but the GPS coordinates, like this.
    If no GPS-coordinates do appear in this setting, then your iPhone images do not have the EXIF info required, and you may need to check the iPhone settings.
    If you see the EXIF data, then you just need to select the DSLR images that were taken at the same location and you can stamp the EXIF data to the DSLR images.
    And after that you should be able to see their locations in the Places view.

  • I have a VI and an attched .txt data file. Now I want to read the data from the .txt file and display it as an array in the front panel. But the result is not right. Any help?

    I have a VI and an attched .txt data file. Now I want to read the data from the .txt file and display it as an array in the front panel. But the result is not right. Any help?
    Attachments:
    try2.txt ‏2 KB
    read_array.vi ‏21 KB

    The problem is in the delimiters in your text file. By default, Read From Spreadsheet File.vi expects a tab delimited file. You can specify a delimiter (like a space), but Read From Spreadsheet File.vi has a problem with repeated delimiters: if you specify a single space as a delimiter and Read From Spreadsheet File.vi finds two spaces back-to-back, it stops reading that line. Your file (as I got it from your earlier post) is delimited by 4 spaces.
    Here are some of your choices to fix your problem.
    1. Change the source file to a tab delimited file. Your VI will then run as is.
    2. Change the source file to be delimited by a single space (rather than 4), then wire a string constant containing one space to the delimiter input of Read From Spreadsheet File.vi.
    3. Wire a string constant containing 4 spaces to the delimiter input of Read From Spreadsheet File.vi. Then your text file will run as is.
    Depending on where your text file comes from (see more comments below), I'd vote for choice 1: a tab delimited text file. It's the most common text output of spreadsheet programs.
    Comments for choices 1 and 2: Where does the text file come from? Is it automatically generated or manually generated? Will it be generated multiple times or just once? If it's manually generated or generated just once, you can use any text editor to change 4 spaces to a tab or to a single space. Note: if you want to change it to a tab delimited file, you can't enter a tab directly into a box in the search & replace dialog of many programs like notepad, but you can do a cut and paste. Before you start your search and replace (just in the text window of the editor), press tab. A tab character will be entered. Press Shift-LeftArrow (not Backspace) to highlight the tab character. Press Ctrl-X to cut the tab character. Start your search and replace (Ctrl-H in notepad in Windows 2000). Click into the Find What box. Enter four spaces. Click into the Replace With box. Press Ctrl-V to paste the tab character. And another thing: older versions of notepad don't have search and replace. Use any editor or word processor that does.

  • How to read a data from USB port using JAVA

    hi all,
    i need to know how to read a data from USB port using java. any API are available for java ?.........please give your valuable ideas !!!!!!!!!
    Advance Thanks!!

    You can do this. Please use this link
    [http://www.google.co.in/search?hl=en&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&hs=uHu&q=java+read+data+from+usb+port&btnG=Search&meta=&aq=f&oq=]
    What research did you do of your own? Have you done some testing application and tried yourself??

  • How to read the data from Excel file and Store in XML file using java

    Hi All,
    I got a problem with Excel file.
    My problem is how to read the data from Excel file and Store in XML file using java excel api.
    For getting the data from Excel file what are all the steps i need to follow to get the correct result.
    Any body can send me the code (with java code ,Excel sheet) to this mail id : [email protected]
    Thanks & Regards,
    Sreenu,
    [email protected],
    india,

    If you want someone to do your work, please have the courtesy to provide payment.
    http://www.rentacoder.com

  • How to read the data from excel file and store into the table?

    Hi All,
    I have table with BLOB datatype contains a excel file. I have to read that data from excel and store into one table with all the fields in excel.
    All the excel fields and my table columns are same.
    Can you share with me how can acheive this using LOB's?
    Thanks

    Hi OraSuirya,
    you can try with external tables .
    syntax as follows
    create table ext_table_csv (
    i Number,
    n Varchar2(20),
    m Varchar2(20)
    organization external (
    type oracle_loader
    default directory ext_dir
    access parameters (
    records delimited by newline
    fields terminated by ','
    missing field values are null
    location ('file.csv')
    reject limit unlimited;
    For this you need to create directory
    Directory Creation syntax:
    create or replace directory ext_dir as 'D:\oracle\user_dir\ext_dir';
    grant read, write on directory ext_dir to <User>;
    please paste the excel file in the particular directory .
    I hope this will help you.
    Please correct me if I am wrong anywhere .
    Thanks,
    Tippu.

  • Regarding reading the data from spool

    Hi Experts,
    How can i read the data from spool?
    I need to read the data from the spool and should display on the screen?
    Is there any FM to read the data from spool?
    Sruthi.

    hi please use this..
    CALL FUNCTION 'RSPO_RETURN_ABAP_SPOOLJOB'
        EXPORTING
          rqident              = v_spool
        TABLES
          buffer               = it_spool
        EXCEPTIONS
          no_such_job          = 1
          not_abap_list        = 2
          job_contains_no_data = 3
          selection_empty      = 4
          no_permission        = 5
          can_not_access       = 6
          read_error           = 7

  • Regarding reading the data from the files without using Stremas

    hai to all of u...
    here i have a problem where i have to read the data from the files without using any streams.
    please guide me how to do this one,if possible by giving with an example
    Thanks & Regard
    M.Ramakrishna

    Simply put, you can't.
    By why do you need to?

  • Reading aggregated data from a cube/multiprovider

    Hi BI people
    My project is currently looking for a functionmodule that reads aggregated data from a cube/multiprovider.
    I already have a functionmodule that reads data from a cube and returns it in a flat format. I have debugged this, but have not found any flags that can enable the OLAP functionality needed to perform the aggregation. The functionmodule is "RSDRI_INFOPROV_READ_RFC".
    The situation is that I need to apply the aggregation logic of a profit center hierrarchy to the data I read from RSDRI_INFOPROV_READ_RFC, this means manually replicating the the OLAP engine functionality (keyfigure aggregation exception, ect.) and this is not an option with the available time/budget.
    Please have a look at the example below:
    Say that I have a profit center hierarchy as displayed below (with postable nodes).
    PC1 - $10
         |---- PC2  - $30
         |---- PC3  - $20
    The data I'm getting back from the functionmodule RSDRI_INFOPROV_READ_RFC looks like this:
    PC1 $10
    PC2 $30
    PC3 $20
    But I need the data aggregated. An aggregation utilizing the hierarchy above will make the data look like this:
    PC1 $60
    PC2 $30
    PC3 $20
    Instead of building an aggregation program, it would be usefull if it was possible to extract aggregated data.
    Any comments appreciated.
    Regards
    Martin

    Thx Olivier,
    The problem is that I need a functionmodule that can apply the OLAP aggregation for a hierarchy to the data outpu from RSDRI_INFOPROV_READ_RFC.
    ... or the best alternative would be if there were a fm/class that could provide me with the hierarchy aggregation of the data.
    /Martin

Maybe you are looking for

  • Fields Missing in Form Response File CSV Export

    I've distributed a survey designed in LiveCycle 8.2 which has been completed by a number of users and returned via email.  I then imported those submitted forms in to the repsonse file.  When I export those responses in a CSV (and pull them in to Exc

  • Free Transform tools

    Using free transform tool, it used to be that you can hold down the Shift key while dragging the corner to resize your image/object. This shortcut no longer gives you a proportional scaling unless you have to click on the Lock in the tool menu. Howev

  • How do you increase the font size on Photoshop menu?

    I can barely read the Photoshop menu - it is like microfiche - how do you increase the size of the fonts in the menu?

  • Olympus E-500?

    I noticed on the Aperture camera page that the E-1 was a supported camera but there was no mention of any other model from Olympus even though the supported files include the Olympus file format. Does that mean any Olympus camera that shoots RAW is s

  • File share problen in Windows 2012 cluster

    Hi, Please help.