Retrive Text File date wise

I am working on reporting module.
when i select Start date and  End Date, then all files between these dates will be fateched in labview and build an array.
my file name format is:
21-02-2010.txt
22-02-2010.txt
please guide me on thathow i can increment start date to end date.........
Prashant Soni
LabVIEW Engineer

what you could do is the following:
1) Get a list of all filenames
2) Check one by one the file names if they are in the proper data range (see picture)
3) Build an array of filenames in range
Marco

Similar Messages

  • How to load text file data to Oracle Database table?

    By using Oracle Forms, how to load text file data to Oracle Database table?

    Metalink note 33247.1 explains how to use text_io as suggested by Robin to read the file into a Multi-Row block. However, that article was written for forms 4.5 and uses CREATE_RECORD in a loop. There was another article, 91513.1 describing the more elegant method of 'querying' the file into the block by transactional triggers. Unfortunately this more recent article has disappeared without trace and Oracle deny its existence. I know it existed as I have a printed copy in front of me, and very useful it is too.

  • Text File Data not Displaying completely

    Hi All,
    Have one issue. The program correctly extracts the data & export to Excel. All column /field data's are dispalying.However while saving this data in a text file in Aplications server file path, though all column/ field data are extracting bit it is not displaying complete column/field data's i.e last 3 or 4 column data's are not displaying after 257 character space  (but actually it extracts data.It is just not dispalying while i am checking text file via AL11).
    What could be the reason of not dipslaying the all column/filed values in text file wherea as while exporting to excel it is displaying? is there any character length constraint for text file?
    Thanks

    >
    Debabrata wrote:
    > What could be the reason of not dipslaying the all column/filed values in text file wherea as while exporting to excel it is displaying? is there any character length constraint for text file?
    There is no restriction on the file size which you can upload on the app server. AL11 is nothing but a report program & there is a limitation on the max number of characters displayed on the page.
    BR,
    Suhas

  • Importing Text File data

    At the moment I know how to enter data from a text file into
    a flash file, for example this is my 'Monday.txt' file (a cut down
    version)
    "AK2~Hairdressing Level 2 Year 2 Of
    2","HDRN2AK2-2B1FA","12:30","14:30"," 10/ 9/2007","M316"
    "AK2~Hairdressing NVQ L2 (Grp
    A)","HDRN2AK2-1B1FA","12:30","14:30"," 10/ 9/2007","M316"
    "AK2~Hairdressing NVQ L2 (Grp
    B)","HDRN2AK2-1B1FB","12:30","14:30"," 10/ 9/2007","M308"
    "Beauty Therapy Level 1 Grp D","BTHN1-1B1FD","9:00","10:30","
    10/ 9/2007","M306"
    "Beauty Therapy NVQ Level 1 Grp
    A","BTHN1-1B1FA","9:00","10:30"," 10/ 9/2007","M306"
    "Beauty Therapy NVQ Level 1 Grp
    B","BTHN1-1B1FB","9:00","10:30"," 10/ 9/2007","M306"
    "Beauty Therapy NVQ Level 1 Grp
    C","BTHN1-1B1FC","9:00","10:30"," 10/ 9/2007","M306"
    "Beauty Therapy NVQ Level 2 Grp
    A","BTHN2-1B1FA","9:00","12:00"," 10/ 9/2007","M217"
    "Beauty Therapy NVQ Level 2 Grp
    A","BTHN2-1B1FA","12:30","14:00"," 10/ 9/2007","M306"
    "Beauty Therapy NVQ Level 2 Grp
    D","BTHN2-1B1FD","12:00","15:00"," 10/ 9/2007","M217"
    Using this coding, I now know how to get it into columns in a
    tabbed layout
    var lv:LoadVars = new LoadVars();
    lv.onLoad = func;
    lv.load("Monday.txt");
    function func(ok) {
    if (!ok) {
    trace("file not loaded.");
    return;
    var tf:TextFormat = new TextFormat();
    tf.tabStops = [220, 340, 390, 440, 490, 520];
    tf.font = "Verdana";
    tf.size = 9;
    var nextD:Number = _root.getNextHighestDepth();
    var w:Number = Stage.width - 20;
    var h:Number = Stage.height - 20;
    var txt:TextField = _root.createTextField("schedule", nextD,
    10, 10, w, h);
    txt.wordWrap = txt.multiline = /*txt.border =*/ true;
    txt.autoSize = true;
    txt.setNewTextFormat(tf);
    var temp1:Array =
    unescape(this).split("=&onLoad")[0].split("\n");
    for (var i:Number = 0; i < temp1.length; i++) {
    var temp2:String = temp1
    .split(",").join("\t").split("\"").join("");
    txt.text = (txt.text.length > 0 ? txt.text : "") + temp2
    + (i == temp1.length-1 ? " " : " \n");
    The problem I have now is, in the text file I am going to
    have upto 120-130 of these records, now the maximum I can fit onto
    the screen is 20, is there a way I can split this text file up so I
    can show Page 1/7, 2/7, 3/7, 4/7, 5/7, 6/7 and 7/7, where it
    switches over automatically via a timer of some sort, say after 20
    seconds. Any help would be greatly appreciated, thanks

    sure. there are many ways to do this.
    one would be to use one textfield and load all your text into
    it. use a timer like setInterval() to periodically increase the
    scroll property of your textfield by its bottomScroll property.
    you'll need to fill your last page with carriage returns or
    new lines so the last page can scroll to the top of your
    textfield.

  • File name to be generated from outbound text file data

    Hi Experts,
    I am collecting IDOCs and generating  IDOC-XML(for IDOCS) file and sending it to PI 7.0 using sender file adapter.
    This is File to File scenario.
    IDOC-XML file picked by sender file adapter gets transformed using XSL mapping in to .dat(text) file.
    Sample Output of .dat file (target file)
    STR SE 2008-10-3011:13:00$SEQ
    EIH21148862                        D2008102820081127SEK000000894800000000894800000000000000 0000XYZ co Ltd                KL25533781          2114886209                    335592                        2508867                      
    EIL21148862                                   0000000000000000100000000000020081021  335592   20081010KILLL899       Operating System
    Now I want output file name to be: ABC_DEF_cc_yyyymmdd_segno.dat
    ABC_DEF is constant
    cc - means country code, in this case it should be "SE", which is marked in bold immediately after STR.
    yyyymmdd - date format
    segno - which means no of records like number of lines in text file, (say three records: STR, EIH, EIL)
    Please feel free for any clarifications required.
    I hope I am able to explain scenario.
    I would really appreciate if you can help me with your valuable inouts.
    Thanks,
    Divyesh

    hi,
    just put one more mapping as the last mapping in your interface mapping
    it can be abap or java mapping
    then as per this blog fill out Filename attribute which will set the file name
    /people/william.li/blog/2006/04/18/dynamic-configuration-of-some-communication-channel-parameters-using-message-mapping
    you can parse the whole IDOC structure in tthose mappings to get all the data you need for the filename
    this is the easiest way I'd say
    Regards,
    Michal Krawczyk

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

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

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

  • Data management - Export Data on a text file and work on Excel/Acces

    Hello,
    When i use the Data Export tool in order to retreive all Accounts data, the CRM creates a txt file with more than 255 columns (number of record type by account). Then I can't import them in a new Access database because Access import tool do not accepts too many columns. So, i try to open it in Excel by import text file. However, some Accounts have a comment in a large text field and, when Excel converted the text file, datas are shifted compared with the column headers because of this specific "comments" record type.
    Is someone knows whether it's possible to reduce the number of record type exported by selecting specific ones or knows a process to import on Excel/Access which resolved this problem of position ?
    Regards,
    Guillaume

    Guillaume, you can create a historical account report and specify the fields you want and then download to Excel. Also, if you use the export utility which provides a CSV file format with more than 255 columns, delete the columns you do not want to get it under 255 and then convert to Excel.

  • Additional Line Carriage in Text File

    Hi All,
    I have a requirement to place a additional line carriage at the ending of each line, and I have to place a character of small square box. I am using the FM GUI_DOWNLOAD to download into the text file.
    My internal table for downloading to text file :
    DATA: BEGIN OF gt_down OCCURS 0,
          field(175) TYPE c,
          END OF gt_down.
    I am getting the file structure as :
    PKLI0080000010               00010 32-FBTCRSL                                 FBT01  
    PKHD0080000010               000000000000000FBT01        20070424 000 Y 
    But I should get the output as :
    PKLI225687-1     00201W51 <b>[]</b>PKLI225687-1  02400W11-23 <b>[]</b>....
    Can anyone please help me on how to proceed on this.
    Thanks in advance,
    Shankar

    Solved.

  • Problem importing text file with null value

    I used the following codes to import a text file and it
    worked perfectly.
    However, it skipped the TAB (chr(9)) on the imported row when
    there is no data (empty string) in one of the columns.
    Can someone help? thanks!
    sample text file data:
    00001 desc1 12.00
    00002 25.00
    00003 desc2 15.00
    Code that I used:
    <cffile action="read" file="#FilePath#"
    variable="data">
    <cfset newLine = chr(13) & chr(10)>
    <cfset tabChar = chr(9)>
    <cfoutput>
    <cfloop list="#data#" index="row"
    delimiters="#newLine#">
    <cfset cols = listToArray(row, tabChar)>
    ID = #cols[1]#
    desc = #cols[2]#
    price = #cols[3]# <br>
    </cfloop>
    </cfoutput>

    There is no perfect way to handle this with out you writing
    more complicated code.
    A good compromise is to replace this line:
    <cfset cols = listToArray(row, tabChar)>
    with this:
    <cfset cols = listToArray (Replace (row, tabChar &
    tabChar, tabChar & "{empty}" & tabChar, "ALL"),
    tabChar)>

  • Remove single space in a text file

    In a text file data having single space , how to remove the single space using java program?
    Kindly reply ASAP.
    Thanks in advance
    Regards,
    Lakshmi

    It is seem that read a text file, then remove space from the string, Then output to other file.
    import java.io.*;
    public class eric_io {
    public static void main(String[] args) throws IOException {
         File inputFile = new File("input.txt");
         File outputFile = new File("output.txt");
    FileReader in = new FileReader(inputFile);
    FileWriter out = new FileWriter(outputFile);
    int c;
         System.out.println("Input from " + inputFile);
    while ((c = in.read()) != -1)
    out.write(c);
    in.close();
    out.close();
         System.out.println("Output to " + outputFile);
    }

  • How to Add points on graph from a text File ?

    Hello and Good Morning to all,
    I have a text file with my data and i read them by using the Read From Spreadsheet File VI,i enter the path where my file is saved,read all rows delete the first row because i don't need it and my problem is that in the text folder i have specified date and time which i want to be my X axis in my Graph and Y axis to be the Vout that means i have to use a XY Graph ,below you can see my data:
    Date        time              Vout  
    3-9-2012 7:45:37            2,35
    3-9-2012 7:45:39            2,75
    3-9-2012 7:45:41            3,15
    3-9-2012 7:45:43            3,50
    1) Is the text file format compatible with the input of the graph command?
    I do not find a LabVIEW function which convert the “date” from the text file (example:3/09/2012 07:45:37) into a compatible format for X axis for the graph.
    (Conversion from string format => into a “date and time” format)
    Can someone please provide a code solution for this problem?

    Hi gstathatos,
                             See all the threads given below:-
                             http://forums.ni.com/t5/LabVIEW/Add-points-on-XY-graph-with-time-step-not-constant/td-p/1507066
                             http://forums.ni.com/t5/LabVIEW/Add-points-on-graph-from-a-text-File-Date-and-time-include-in/td-p/1...
                             http://forums.ni.com/t5/LabVIEW/read-double-waveform-text-file-and-and-plot-graph-in-labview/td-p/10...
    Thanks as kudos only

  • Text file into Forms

    Hi
    suppose in text file the data is
    No Name
    1 abc
    2 xyz
    and a table st_rec that has attribute no and name and i want populate my form field that are no and name with text file data and populate i can store this data into database.
    how i can....
    Thanks in advance

    you can use sqlloader which is shipped with your Developer.

  • Small doubt  reg upload from tab delimited text file

    Hi  all,
    i am uploading a tab delimited text file to a ztable.
    I moving the text file in to internal table
    data : begin of i_tab occurs 0,
           text(1024) type c,
           end of i_tab.
    then i have passed to FM GUI_UPLOAD.
    and then splitting
    loop at i_tab.
    split i_tab at con_tab
                              into i_xyz-matnr
                                   i_xyz-werks.
        append i_xyz.
    endloop..
    is this the right approach . iam getting the results but iam just curious to know.
    Do i need to internal like the one i created
    data : begin of i_tab occurs 0,
           text(1024) type c,
           end of i_tab.
    or do i need to create one with field that i have in text file.
    data : begin of i_tab occurs 0,
       matnr like mara-matnr,
      werks like marc-werks
    end of i_tab.
    WHICH ONE OF THE TWO IS RIGHT.
    THANKS IN ADVANCE

    There will be NO difference,i guess in the 2 methods.
    you can use which you like.
    Check the below program,i also given quantity fields F2,F3.
    its working fine
    REPORT  ZSRIM_TEMP13.
    data : begin of itab occurs 0,
             f1(20) type c,
             f2     type i,
             f3(10)     type p DECIMALS 2,
           end of itab.
           CALL FUNCTION 'GUI_UPLOAD'
             EXPORTING
               FILENAME                      = 'c:a.txt'
              FILETYPE                      = 'ASC'
              <b>HAS_FIELD_SEPARATOR           = 'X'</b>
    *          HEADER_LENGTH                 = 0
    *          READ_BY_LINE                  = 'X'
    *          DAT_MODE                      = ' '
    *          CODEPAGE                      = ' '
    *          IGNORE_CERR                   = ABAP_TRUE
    *          REPLACEMENT                   = '#'
    *          CHECK_BOM                     = ' '
    *          VIRUS_SCAN_PROFILE            = VIRUS_SCAN_PROFILE
    *          NO_AUTH_CHECK                 = ' '
    *        IMPORTING
    *          FILELENGTH                    = FILELENGTH
    *          HEADER                        = HEADER
             TABLES
               DATA_TAB                      = ITAB
            EXCEPTIONS
              FILE_OPEN_ERROR               = 1
              FILE_READ_ERROR               = 2
              NO_BATCH                      = 3
              GUI_REFUSE_FILETRANSFER       = 4
              INVALID_TYPE                  = 5
              NO_AUTHORITY                  = 6
              UNKNOWN_ERROR                 = 7
              BAD_DATA_FORMAT               = 8
              HEADER_NOT_ALLOWED            = 9
              SEPARATOR_NOT_ALLOWED         = 10
              HEADER_TOO_LONG               = 11
              UNKNOWN_DP_ERROR              = 12
              ACCESS_DENIED                 = 13
              DP_OUT_OF_MEMORY              = 14
              DISK_FULL                     = 15
              DP_TIMEOUT                    = 16
              OTHERS                        = 17
           IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
           ENDIF.
           LOOP AT ITAB.
             WRITE :/ ITAB-F1, ITAB-F2,ITAB-F3.
           ENDLOOP.
    my input file i created with TAB seperated text file,
    here is the input file
    LINE1     1000     123.25
    LINE2     2000     234.25
    LINE3     3000     345.25
    LINE1     1000     123.25
    LINE2     2000     234.25
    LINE3     3000     345.25
    Regards
    Srikanth
    Message was edited by: Srikanth Kidambi

  • How to Run a text files using UNIX

    Hi,
    I have 10 text files in my project my task is to load all the text files data into Relational Database so i can use sql*loader to load all the text files data into a Database.
    but the thing is another project i have 200 text files so i need to run these text files using UNIX script could anyone tell me how to load all the text files using UNIX
    Thank's
    Edited by: Lavanya on Sep 5, 2012 3:09 PM

    Lavanya,
    This question relates to shell scripting and in IMO it is not an oracle question.
    I have made some initial assumptions before my proposed solution.
    PLEASE note that this is untested, but can just guide you as a template for solving your problem.
    Assuming that you have properly set up the control file and mapped each and every table in it as per the file information which you have..
    Assuming the text file to be in the format of : ------ (as suggested by other posters earlier, this file holds instructions about the file and table mapping which shall be used by your sqlldr process.)
    tmp.txt:
    text_file_1-------------should goes to----customer_info_table
    text_file_2------------should goes to------customer_address_table
    text_file_3-----------should goes to-------customer_order_table
    while read line
    do
    SQLLDR CONTROL=`echo $line | sed 's/should goes to/ /g' | sed 's/-//g' | awk -F " " '{print $1}'`.ctl,
    LOG=`echo $line | sed 's/should goes to/ /g' | sed 's/-//g' | awk -F " " '{print $1}'`.log,
    BAD=`echo $line | sed 's/should goes to/ /g' | sed 's/-//g' | awk -F " " '{print $1}'`.bad,
    DATA=`echo $line | sed 's/should goes to/ /g' | sed 's/-//g' | awk -F " " '{print $1}'`.txt
    USERID=scott/tiger
    done <tmp.txtAll I am trying to run from the above shell script is : -- PLEASE TEST it if it matches your requirement.
    SQLLDR CONTROL=text_file_1.ctl, LOG=text_file_1.log, BAD=text_file_1.bad, DATA=text_file_1.txt USERID=scott/tiger
    SQLLDR CONTROL=text_file_2.ctl, LOG=text_file_2.log, BAD=text_file_2.bad, DATA=text_file_2.txt USERID=scott/tiger
    SQLLDR CONTROL=text_file_3.ctl, LOG=text_file_3.log, BAD=text_file_3.bad, DATA=text_file_3.txt USERID=scott/tigerRepeating my assumptions, I assume you have all those files required for SQLLDR process to run (ctl file, data file...)
    Cheers,
    Manik

  • Fetch data from text file to print

    Dear All,
    I am trying to fetch data from a text file in to Oracle database to print.
    The problem I have is that I cannot gather data because this is a statement, generated by a report utility and the data consist of multiple dimensions.
    First 3 fields of data are in the first 3 rows of a page and the rest is displayed column wise for the next 20 rows (5th row to 24th Row). Then there is a page break character ASCII (012) (Hex - 0C)then the next record starts.
    Please give me a solution to fetch first 3 lines to one master table & the column of data to a detail table.
    I konw I can fetch data using SQL Loader but the problem is how can I seperate multiple dimention data.
    Sample
    <page breake>
    Code:123456
    Name:1233445566
    Address:aaaaaaaaaaaaa
    Detail1 Detail2 Detail3
    ======= ======= =======
    AAAAAAA BBBBBBB CCCCCCC
    AAAAAAA BBBBBBB CCCCCCC
    <page break>
    Code:123457
    Name:AAAAAAAA
    Address:AAAAAAAA
    Detail1 Detail2 Detail3
    ======= ======= =======
    AAAAAAA BBBBBBB CCCCCCC
    AAAAAAA BBBBBBB CCCCCCC
    <page break>
    Thank you in advance..
    Regards, Shaamil.

    Try using the package UTL_FILE.
    http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96612/u_file.htm#998101

Maybe you are looking for