How to initialize Object  Array Data Provider (OADP)with data from txt file

Hi,
I want to show in a table some columnar data from a txt file. I ran the creator demo application on OADP successfully. http://blogs.sun.com/divas/entry/using_the_object_array_data
I created a javabean class to read a txt file.However, I am stuck at how I can fill the data into an OADP array:
I am familiar with C extensively but not much at java. can anyone help??
thanks..
dr.am.mohan rao

Thanks for that. I changed it a little bit, but when i ran this script, got ORA-06532: Subscript outside of limit.
declare
O_voucher_comment SYSADM.AP_COMMENT_COLL := sysadm.ap_comment_coll(null);
begin
FAS_AP_EXCEPTIONS.GET_VOUCHER_COMMENTS('FCCAN', '20494753', 0, 'KEHE', O_voucher_comment);
end;
PROCEDURE get_voucher_comments (
v_bu_in IN VARCHAR2,
v_voucher_in IN VARCHAR2,
v_line_in IN NUMBER,
v_userid IN VARCHAR2,
voucher_comment OUT      sysadm.ap_comment_coll
IS
i NUMBER := 1;
v_comments VARCHAR2 (254) := ' ';
comment_type sysadm.ap_comment_type;
v_line_num NUMBER := 0;
CURSOR get_all_comment
IS
SELECT voucher_line_num, descr254_mixed FROM ps_fas_ap_comment
WHERE business_unit = v_bu_in AND voucher_id = v_voucher_in;
CURSOR get_line_comment
IS
SELECT descr254_mixed FROM ps_fas_ap_comment
WHERE business_unit = v_bu_in AND voucher_id = v_voucher_in
AND voucher_line_num = v_line_in;
BEGIN
--voucher_comment() := SYSADM.ap_comment_type (NULL, NULL, NULL, NULL, NULL, NULL);
--' ', ' ', 0, ' ', '', ' ' sysadm.ap_comment_coll
voucher_comment := sysadm.ap_comment_coll(null);
IF v_line_in = 0
THEN
OPEN get_all_comment;
LOOP
FETCH get_all_comment
INTO v_line_num, v_comments;
          if i > 1
          then
               voucher_comment.EXTEND;
          end if;
voucher_comment (i) := ap_comment_type (v_bu_in,
v_voucher_in, v_line_num, v_userid,
TO_DATE (TO_CHAR (SYSDATE, 'DD-MON-YYYY HH24:MI:SS'), 'DD-MON-YYYY HH24:MI:SS'), v_comments );
i := i + 1;
END LOOP;
ELSE
OPEN get_line_comment;
LOOP
FETCH get_line_comment
INTO v_comments;
          voucher_comment.extend(6);
voucher_comment (i) := ap_comment_type (v_bu_in, v_voucher_in, v_line_num, v_userid, TO_DATE (TO_CHAR (SYSDATE, 'DD-MON-YYYY HH24:MI:SS' ), 'DD-MON-YYYY HH24:MI:SS'), v_comments);
i := i + 1;
END LOOP;
END IF;
END get_voucher_comments;

Similar Messages

  • How to initialize the array of hashmap???

    how to initialize the array of hashmap??

    What do you mean by "the array of hashmap"?

  • How to initialize Button Array at "declaration"?

    How to initialize Button Array at "declaration"?
    Button[] b = new Button[2];
    b[0] = "label" ?
    b[1] = "label" ?
    Again,please at declaration not using setText within main program.

    main...
    Button[] btts = {new Button(...),new Button(...), ...)
    that shold be it
                                                                                                                                                                                   

  • How to read data from txt file respectively

    Hi,
    I am triying to form an equation between two known points. I want to do this with the attached VI, the most critical point is that I will read the x1, y1, x2 and y2 coordinates from the same .txt file. They will be written in a .txt file and I will send them to the appropriate channel (x1, y1, x2 and y2) respectively. How can I get data in a rule from a .txt file?
    Could anyone please help me with this issue,
    Best regards. 
    Attachments:
    read from txt file.vi ‏8 KB

    Dear RavensFan,
    Thank you very much for your helps, I am bit new to labview so I usually can not find the appropriate functions easily. And a new problem has rised in my application. I should write the A, B and C numbers in the respective series to the file 2.txt. I am able to write them in a straight forward case but I want to write the next triples (A B C) in the next row. Like this;
    A1 B1 C1
    A2 B2 C2
    A3 B3 C3
    So how can I put new line constant and space constant to my VI? 
    Waiting for your valuable helps,
    Best regards,
    Attachments:
    read_from_txt_fileMOD.vi ‏18 KB

  • How to fetch the Date column(or Month column) from the file name from the specified path in ODI 11g

    Hi ALL,
    Can any one help us regarding How to fecth the Date column(or month column) from the file name specified in the path in a generalized way .
    For example :
    file name is :subscribers (Cost) Sep13.csv is specified in the below path
      E:\Accounting\documents\subscribers (Cost) Sep13.csv
    here I need to fetch the "Sep13" as a Date column in the ODI 11g in the generalized way.
    Can any one help us in this case as early as possible.

    I would suggest using a piece of Jython code for this.  Something like this...
    import os
    import os.path
    filelist  = os.listdir(E:\Accounting\documents\)
    for file in filelist:
    datestr = file[19:-4]
    You'd need to work out what to do with datestr next...  perhaps write it to a table or update an ODI variable with it.
    Hope this is of some help.

  • Retrieve data from txt file to generate CWGraph plot

    Please help...I'm not sure this is even possible, but here is what I need to do.  I wrote a DAQ program that utilizes the CWGraph control.  Each second a data point is collected by the program and displayed in one of the CWGraphs.  The only problem I have is that if the program is closed or crashes for some reason, I lose the data plot in my CWGraphs.  The data points are collected in a txt file which is then later worked up in Excel.  My question is, is there a way to retrieve these data points from the txt file and re-generate the plots when the program is opened back up?  The program would then take back over and plot along in realtime.  I hope this is clear enough to understand.  Feel free to ask any questions and any input would be greatly appreciated!

    Hi Chris,
    There is not a shipping example that would demonstrate exactly what you are looking for in your application.
    The reading and writing to a file will require general VB 6.0 programming as Measurement Studio does not provide a feature to assist you with that.  If you are not familiar with File I/O in VB 6.0, this site may be a good starting point: File I/O - VisualBasic Examples .
    Once again, parsing the input from the text file will also require general VB 6.0 programming.  I am not sure how your text file will be delimited, but you can use this example as a guide to parsing the input from the file: Parse String Using A Specific Delimiter .
    To convert from strings to numbers in VB 6.0, you can use the Val() function.  More information about how to use that function can be found on MSDN: Val Function .
    Once you have an array of doubles, you can plot the data on your waveform graph as usual.  If you are not familiar with how to plot an array to a CWGraph, please take a look at our shipping examples.  The Simple Graph example is a great starting point.
    Jessica
    National Instruments
    Product Support Engineer

  • How to Create a OLAP Cube in DEV using SSAS from Raw file system backup from Production?

    How to Create a OLAP Cube in DEV using SSAS from Raw file system backup from Production? I dont have a .abf file available. Two paritions in production are missing data. We were able to get back file system backup which contains the files for these two paritions.
    How do I create a cube in Dev using this file system backup.
    we are on SQL Server 2008R2.
    Thanks,

    How to Create a OLAP Cube in DEV using SSAS from Raw file system backup from Production? I dont have a .abf file available. Two paritions in production are missing data. We were able to get back file system backup which contains the files for these two paritions.
    How do I create a cube in Dev using this file system backup.
    we are on SQL Server 2008R2.
    Thanks,

  • How to make iTunes read the song's name/singer from the file's name itself?

    Hi everyone,
    So I have this file with songs from everywhere. I spent quite some time now to make sure that the structure of each file's name is as such : "Singer - Song name", hoping that everything would be read by iTunes accordingly. However, either iTunes read it well, or it didn't read it at all ("Singer - Song name" appearing in Title alone), or iTunes read the "media" of the file (ie. what the guy I downloaded it from wrote for it in the Preferences, which usually is in capital letters or with a bunch of weird underscores). As I'm OCD and need everything to be neat, I'm highly tensed right now. I really want everything to be neat and clear!
    So, how do I make sure that iTunes reads the files' names such that it knows the structure is "Singer - Song name"? Thanks.

    iTunes doesn't use file names to determine how music appears in your library,  Rather, it uses metadata that is split between:
    data elements that are embedded within the media files
    data elements that are included in the entries in the iTunes database
    No amount of reorganization, renaming or other manipulation at the file level will make any difference to how songs will appear in iTunes.  Using your example:
    the value of the track number element is 1
    the value of the artist element is "Elvis Presley"
    the value of the song name element is "Blue Suede Shoes"
    Depending on how you configure iTunes then the file name is either:
    completely independent of iTunes (i.,e., the file containing this song could be xyz.mp3)
    dependent on the metadata managed by iTunes, (i.e., when you have these two options set:
    then iTunes will set the file name to be 1-01 Blue Suede Shoes.mp3 where:
    the file is in a folder called "Elvis Presley" (the name of the album)
    that folder is in one called "Elvis Presley" (the name of the artist) which is in iTunes Media\Music
    Going back to your question "How to make iTunes read the song's name/singer from the file's name" the answer is simple - you can't, as this is not how iTunes works.  There are some third-party utilities that you can use to set some metadata element values based on parsing of file names which might be a useful first step.  However, to use iTunes effectively you should really forget about / ignore file names - manage your media using appropriate metadata and allow iTunes to look after file names behind the scenes.

  • Import data from txt-file with reading column names

    Hello,
    after changing the the export of my simulation programm I can't use the solution postet here, wich works well. (I branded the post as soluted thats why I start a ne post)
    Can anybode please tell me how to adept the code to import the new type of txt file. Here the name of the columns are in the first line aof the columns, like this (with ignoring the first lines).
    "TIME      "    "Sitzbasis_X"    "Sitzbasis_Y"    "Sitzbasis_Z"    "Achsklammer_Z"    "Antriebsachse_Z"    "Gegengewicht_Z"    "Lenkachse_Z"
    0.000000e+000    -5.472285e+003    -1.886681e+002    1.812099e+004    4.539113e+004    -1.252936e+005    -1.499764e+004    -9.806650e+003
    1.000000e-003    -1.722846e+003    -1.141275e+002    8.443419e+003    2.475389e+004    -7.533712e+004    -1.138092e+004    -9.624729e+003
    2.000000e-003    -3.964053e+002    -7.694600e+001    3.186345e+003    1.399086e+004    -5.653730e+004    -9.956198e+003    -9.311346e+003
    I added an example file
    Thanks for Help
    Gabriel
    Solved!
    Go to Solution.
    Attachments:
    TXT-File.txt ‏115 KB

    Hello Gabriel
    You can use the DataPlugin Wizard (Navigator>>File>>DataPlugin Wizard) to define a new file import filter for your data. It will take only one minute.
     Please found the uri file I create for you. Copy the attached file to your disk, unpack it and double click the uri file.
    Then you can open your file by using "open with".
    Hope this help
    Attachments:
    TXT_File_DataPlugin.zip ‏4 KB

  • How to get Text from (.txt) file to display in the JTextArea ?

    How to get Text from (.txt) file to display in the JTextArea ?
    is there any code please tell me i am begginer and trying to get data from a text file to display in the JTextArea /... please help...

    public static void readText() {
      try {
        File testFile = new File(WorkingDirectory + "ctrlFile.txt");
        if (testFile.exists()){
          BufferedReader br = new BufferedReader(new FileReader("ctrlFile.txt"));
          String s = br.readLine();
          while (s != null)  {
            System.out.println(s);
            s = br.readLine();
          br.close();
      catch (IOException ex){ex.printStackTrace();}
    }rykk

  • How to get string (specified by line and column) from txt file with labview

    Hi everyone
    How to get string (specified by line and column) from txt file with labview
    thx 
    Solved!
    Go to Solution.

    As far as I know, a text file has no columns.  Please be more specific.  Do you mean something like the 5th word on line 4, where words are separated by a space, and lines are separated by a newline character?  You could the Read from Spreadsheet String function and set the delimiter to a space.  This will produce a 2D array of strings.  Then use index array and give the line number and column number.
    - tbob
    Inventor of the WORM Global

  • Could any one provide me with the links of file to file scenario using BPM

    Could any one provide me with the links of file to file scenario using BPM

    Hi,
    omit RFC part
    /people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • HT2518 I don't have .psd files but how do I migrate my Photoshop Elements catalog with tags from Windows

    I don't have .psd files but how do I migrate my Photoshop Elements catalog with tags from Windows?

    That's really disappointing, I purchased the download version.
    I refuse to pay another £55
    Thanks for your help anyway

  • So I bought a video on iTunes, how do I make it compatible with iMovie so I can edit it and make my own video?  If I can't do this, then how do those people on YouTube make videos with clips from TV shows and Movies?

    So I bought a video on iTunes, how do I make it compatible with iMovie so I can edit it and make my own video?  If I can't do this, then how do those people on YouTube make videos with clips from TV shows and Movies?

    Videos purchased from iTunes cannot be copied.

  • How to build an array using incoming stream of data?

    I am programming in VBAI but use LV as my Inspection Interface. The VBAI program will go in a finite loop (1000x) and feed the numeric indicator with dbl vaule in the front panel of LV. So the dbl value is in sequence.
    In LV, how do I build an array (index 0 - 999) with this stream of data?
    Solved!
    Go to Solution.

    altenbach wrote:
    You can eliminate that useless FOR loop by using a globally initialized feedback node instead of a shift register.
    You also need a mechanism to reset the shift register contents.
    What are you doing up at this hour?  Don't you sleep?  Per your advice.  The OP will still need to code in an initial state for the array.
    Reese, (former CLAD, future CLD)
    Some people call me the Space Cowboy!
    Some call me the gangster of love.
    Some people call me MoReese!
    ...I'm right here baby, right here, right here, right here at home

Maybe you are looking for

  • Error while calling BAPIs for DMS from Portal

    Hi everybody, We are developing a portal with Web Dynpro and trying to call from our java code BAPIs that deals with DMS: BAPI_DOCUMENT_CREATE2 - to create a new DMS document and checkin an original. CVAPI_DOC_CHECKIN - to checkin an original to an e

  • Intel Mini: Diabling the onboard bluetooth hardware/using a Dlink USB BT

    I have a Intel Mini Core 2 Duo (1.8x Ghz) I broke the bluetooth antennae connector inside the case while upgrading the memory. My BT keyboard and mouse continues to work, but only with the case open, and when they are very close to the computer. I ha

  • E-mail not received on BB

    I've had my BB for several months and it has worked fine. But now I find that e-mails received in my in box are not being received by the BB (it's an account set up under BIS). As far as I know I've not changed any settings. I've tried reconciling th

  • KT4 Ultra Bios 1.4 fixed?

    There was an issue with the 1.4 bios update for the KT4 Ultra chipset and the temperature reading. I was misreading the temperature. Does anyone know if this issue has been fixed? I contacted MSI about it several times but haven't heard anything back

  • DMS Object Link for SRM

    Dear All, Can you please provide me the object link for SRM( Inbound Delivery). Our team requirenment we should need to integrate with SRM through DMS (object link) So provide me the solution? Thanks Edited by: RS on Aug 26, 2010 1:14 PM