About Read stmt

Hi Friends,
can anyone .. Explain this below READ statement.
LOOP AT it_hrp1000.
    READ TABLE it_hrp1000 WITH KEY plvar = p_plvar
                               and otype = p_otype
                               and endda = p_endda2
                               BINARY SEARCH.
MY QUESTION IS,
WHY WE ARE USING THE ABOVE READ STMT WITH CONDITIONS IN PRG.. I MEAN WHICH WHICH SCENARIO..(SITUATION).
PLS.EXPLAIN ANY ONE.

Read statement is basically used to capture one particular record instead of looping over the whole table. With the read statment you can just get one particular row of the table , put it in a work area and process it as per your requirement.
please go through the following links to understand the fucntionality of read statement and how can we read lines of tables;
http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb35f8358411d1829f0000e829fbfe/content.htm
Problem with read table with binary search
Please reward the helpful entries.
Regards,
Raman.

Similar Messages

  • Read stmt

    read itab index i..
    except this statement can i use read stmt in another way?

    Hi Balu
    <b>Reading Lines of Tables </b>
    <b>
    To read a single line of any table, use the statement: </b>
    READ TABLE <itab> <key> <result>.
    For the statement to be valid for any kind of table, you must specify the entry using the key and not the index. You specify the key in the <key> part of the statement. The <result> part can specify a further processing option for the line that is retrieved.
    If the system finds an entry, it sets SY-SUBRC to zero, if not, it takes the value 4, as long as it is not influenced by one of the possible additions. If the internal table is an index table, SY-TABIX is set to the index of the line retrieved. If the table has a non-unique key and there are duplicate entries, the first entry is read.
    <b>Specifying the Search Key</b>
    The search key may be either the table key or another key.
    <b>Using the Table Key</b>
    To use the table key of <itab> as a search key, enter <key> as follows:
    READ TABLE <itab> FROM <wa> <result>.
    or as follows
    READ TABLE <itab> WITH TABLE KEY <k1> = <f 1> ... <k n> = <f n> <result>.
    In the first case, <wa> must be a work area compatible with the line type of <itab>. The values of the key fields are taken from the corresponding components of the work area.
    In the second case, you have to supply the values of each key field explicitly. If you do not know the name of one of the key fields until runtime, you can specify it as the content of a field <n i > using the form (<n i >) = <f i >. If the data types of <f i > are not compatible with the key fields, the system converts them.
    The system searches for the relevant lines as follows:
    Standard tables
    Linear search, where the runtime is in linear relation to the number of table entries.
    Sorted tables
    Binary search, where the runtime is in logarithmic relation to the number of table entries.
    Hashed tables
    The entry is found using the hash algorithm of the internal table. The runtime is independent of the number of table entries.
    <b>
    Using a Different Search Key</b>
    To use a key other than the table key as a search key, enter <key> as follows:
    READ TABLE <itab> WITH KEY = <f> <result>.
    or as follows
    READ TABLE <itab> WITH KEY <k1> = <f1> ... <k n> = <f n> <result>.
    In the first case, the whole line of the internal table is used as the search key. The contents of the entire table line are compared with the contents of field <f>. If <f> is not compatible with the line type of the table, the value is converted into the line type. The search key allows you to find entries in internal tables that do not have a structured line type, that is, where the line is a single field or an internal table type.
    In the second case, the search key can consist of any of the table fields <k 1 >...<k n >. If you do not know the name of one of the components until runtime, you can specify it as the content of a field <n i > using the form (<n i >) = <f i >. If <n i > is empty when the statement is executed, the search field is ignored. If the data types of <f i > are not compatible with the components in the internal table, the system converts them. You can restrict the search to partial fields by specifying offset and length.
    The search is linear for all table types. The runtime is in linear relation to the number of table lines.
    <b>
    Specifying the Extra Processing Option</b>
    You can specify an option that specifies what the system does with the table entry that it finds.
    <b>Using a Work Area
    </b>
    You can write the table entry read from the table into a work area by specifying <result> as follows:
    READ TABLE <itab> <key> INTO <wa> [COMPARING <f1> <f 2> ...
                                                 |ALL FIELDS]
                                      [TRANSPORTING <f1> <f 2> ...
                                                     |ALL FIELDS
                                                    |NO FIELDS].
    If you do not use the additions COMPARING or TRANSPORTING, the contents of the table line must be convertible into the data type of the work area <wa>. If you specify COMPARING or TRANSPORTING, the line type and work area must be compatible. You should always use a work area that is compatible with the line type of the relevant internal table.
    If you use the COMPARING addition, the specified table fields <f i > of the structured line type are compared with the corresponding fields of the work area before being transported. If you use the ALL FIELDS option, the system compares all components. If the system finds an entry with the specified key <key> and if the contents of the compared fields are the same, SY-SUBRC is set to 0. If the contents of the compared fields are not the same, it returns the value 2. If the system cannot find an entry, SY-SUBRC is set to 4. If the system finds an entry, it copies it into the target work area regardless of the result of the comparison.
    If you use the TRANSPORTING addition, you can specify the table fields of the structured line type that you want to transport into the work area. If you specify ALL FIELDS without TRANSPORTING, the contents of all of the fields are transported. If you specify NO FIELDS, no fields are transported. In the latter case, the READ statement only fills the system fields SY-SUBRC and SY-TABIX. Specifying the work area <wa> with TRANSPORTING NO FIELDS is unnecessary, and should be omitted.
    In both additions, you can specify a field <f i > dynamically as the contents of a field <n i > in the form (<n i >). If <n i > is empty when the statement is executed, it is ignored. You can restrict the search to partial fields by specifying offset and length.
    <b>Using a Field Symbol</b>
    You can assign the table entry read from the table to a field symbol by specifying <result> as follows:
    READ TABLE <itab> <key> ASSIGNING <FS>.
    After the READ statement, the field symbol points to the table line. If the line type is structured, you should specify the same type for the field symbol when you declare it. This allows you to address the components of the field symbol. If you cannot specify the type statically, you must use further field symbols and the technique of assigning components of structures to address the components of the structure.
    For further information about assigning table lines to field symbols, refer to Access Using Field Symbols.
    <b>
    Examples</b>
    DATA: BEGIN OF LINE,
    COL1 TYPE I,
    COL2 TYPE I,
    END OF LINE.
    DATA ITAB LIKE HASHED TABLE OF LINE WITH UNIQUE KEY COL1.
    DO 4 TIMES.
      LINE-COL1 = SY-INDEX.
      LINE-COL2 = SY-INDEX ** 2.
    INSERT LINE INTO TABLE ITAB.
    ENDDO.
    LINE-COL1 = 2. LINE-COL2 = 3.
    READ TABLE ITAB FROM LINE INTO LINE COMPARING COL2.
    WRITE: 'SY-SUBRC =', SY-SUBRC.
    SKIP.
    WRITE: / LINE-COL1, LINE-COL2.
    The output is:
    SY-SUBRC =    2
             2        4
    The program fills a hashed table with a list of square numbers. The work area LINE, which is compatible with the line type, is filled with the numbers 2 and 3. The READ statement reads the line of the table in which the key field COL1 has the same value as in the work area and copies it into the work area. SY-SUBRC is set to 2, because the contents of field COL2 were different.
    DATA: BEGIN OF LINE,
    COL1 TYPE I,
    COL2 TYPE I,
    END OF LINE.
    DATA ITAB LIKE SORTED TABLE OF LINE WITH UNIQUE KEY COL1.
    DO 4 TIMES.
      LINE-COL1 = SY-INDEX.
      LINE-COL2 = SY-INDEX ** 2.
    INSERT LINE INTO TABLE ITAB.
    ENDDO.
    CLEAR LINE.
    READ TABLE ITAB WITH TABLE KEY COL1 = 3
                    INTO LINE TRANSPORTING COL2.
    WRITE:   'SY-SUBRC =', SY-SUBRC,
           / 'SY-TABIX =', SY-TABIX.
    SKIP.
    WRITE: / LINE-COL1, LINE-COL2.
    The output is:
    SY-SUBRC =    0
    SY-TABIX =       3
             0        9
    The program fills a sorted table with a list of square numbers. The READ statement reads the line of the table in which the key field COL1 has the same value as in the work area and copies it into the work area. Only the contents of COL2 are copied into the work area LINE. SY-SUBRC is zero, and SY-TABIX is 3, because ITAB is an index table.
    DATA: BEGIN OF LINE,
            COL1 TYPE I,
            COL2 TYPE I,
          END OF LINE.
    DATA ITAB LIKE SORTED TABLE OF LINE WITH UNIQUE KEY COL1.
    DO 4 TIMES.
      LINE-COL1 = SY-INDEX.
      LINE-COL2 = SY-INDEX ** 2.
      INSERT LINE INTO TABLE ITAB.
    ENDDO.
    READ TABLE ITAB WITH KEY COL2 = 16  TRANSPORTING NO FIELDS.
    WRITE:   'SY-SUBRC =', SY-SUBRC,
           / 'SY-TABIX =', SY-TABIX.
    The output is:
    SY-SUBRC =    0
    SY-TABIX =       4
    The program fills a sorted table with a list of square numbers. The READ statement reads the line of the table in which the key field COL1 has the value 16. It does not use the table key. No fields are copied to a work area or assigned to a field symbol. Instead, only the system fields are set. SY-SUBRC is zero, since a line was found, and SY-TABIX is four.
    DATA: BEGIN OF LINE,
    COL1 TYPE I,
    COL2 TYPE I,
    END OF LINE.
    DATA ITAB LIKE HASHED TABLE OF LINE WITH UNIQUE KEY COL1.
    FIELD-SYMBOLS <FS> LIKE LINE OF ITAB.
    DO 4 TIMES.
      LINE-COL1 = SY-INDEX.
      LINE-COL2 = SY-INDEX ** 2.
    INSERT LINE INTO TABLE ITAB.
    ENDDO.
    READ TABLE ITAB WITH TABLE KEY COL1 = 2 ASSIGNING <FS>.
    <FS>-COL2 = 100.
    LOOP AT ITAB INTO LINE.
      WRITE: / LINE-COL1, LINE-COL2.
    ENDLOOP.
    The output is:
             1        1
             2      100
             3        9
             4       16
    The program fills a hashed table with a list of square numbers. The READ statement reads the line of the table in which the key field COL1 has the value 2 and assigns it to the field symbol <FS>. The program then assigns the value 100 to component COL2 of <FS>. This also changes the corresponding table field.
    Regards Rk

  • Read stmt problem in ECC 6.0

    My read stmt is not working in ECC 6.0
    READ TABLE gt_zadi_matnr_conv WITH KEY
    mandt = sy-mandt zadi_key_type = 'WERKS'
    zadi_key_value = gs_zadi_m_2017_gm02-plant BINARY SEARCH.

    SORT gt_zadi_matnr_conv BY zadi_key_value.
      LOOP AT gt_zadi_m_2017_gm02 INTO gs_zadi_m_2017_gm02.
        READ TABLE gt_zadi_matnr_conv WITH KEY zadi_key_type = 'WERKS'
         zadi_key_value = gs_zadi_m_2017_gm02-plant BINARY SEARCH.
        IF sy-subrc = 0 .
          gv_reebok_monitor = 'X'.
          PERFORM convert_number_rbk_vs_adi USING gs_zadi_m_2017_gm02-plant
                                               gs_zadi_m_2017_gm02-material
                                      CHANGING gs_zadi_m_2017_gm02-material.
        ENDIF.
    Ihave commented  sort stmt like
    SORT gt_zadi_matnr_conv BY zadi_key_value.
    Now my code is working ..
    Now my doubt is Can I comment my sort ?????????
    Or is there any issu ue?
    If so please suggest me what to do  ?

  • Question about reading hex data

    Hello! I am a Labview Novice and having a problem about reading hex data.
    Basically I am having bytes from the serial port like this: "80100E0E0AB4F646F24A00911267087E032080057FFF "
    It is not encoded in ASCII. What I want to do is to convert the hex to an ASCII hex string.
    so that the string would become hex numbers in ASCII.
    I think the following might be a solution, but I have no idea what the subvi is in the solution.
    http://forums.ni.com/t5/LabVIEW/Hex-String-to-Ascii-Hex-String/m-p/886078/highlight/true#M400462
    Thanks in advance and I appreciate your kind help!
    Solved!
    Go to Solution.

    coolmatthew wrote:
    What I want to do is actually this.
    You are using way too much code for all this. All you need is a concatenate strings, replacing your entire loop and such. Same result.
    (see also)
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    HEXTwiddler.png ‏4 KB

  • Asking about read voltage.vi

    i'am pretty confused about reading voltage.vi where i dont know where all numbers come. Can i use it directly for reading stauff or tachometer ? anw, what is board ID and channels ? is there any pictures for both ?
    sorry for silly questions noobs here...
    thx,
    Attachments:
    postind di thread labview.JPG ‏32 KB

    Hi bangbit,
    As Pnt pointed out, the VI for which you posted an image does not acquire any
    data.  Since you are interested in measuring voltage, I will assume that
    you have either an E Series or M Series device.  If I am wrong, please
    specify what hardware you have and what driver will you use with it (E Series
    devices can use either DAQmx or the Tradional DAQ drivers)?  
    I recommend starting with one of the shipping examples available in
    LabVIEW.  In LabVIEW, go to the help menu and select Find Examples. 
    From there, select Hardware Input and Output and depending on whether you are
    using DAQmx or Traditional DAQ, you can select the appropriate folder according
    to the driver you are using.  If you are using DAQmx, you may want to play
    with the DAQ Assistant VI to set up some standard tasks. 
    You can find the device name by opening up Measurement and Automation Explorer
    (a program that installs with the device drivers).  Your device with the
    device name will be listed there. 
    If you have general questions about how to program in LabVIEW, please refer to LabVIEW Introduction Course
    - Six Hours and Getting
    Started with NI-DAQmx: Main Page. 
    Best Regards
    Hani R.
    Applications Engineer
    National Instruments

  • About read consistency

    Dear Guys
    i m getting confused in read consistent image of oracle
    please clear a little
    suppose if i fired a query that takes 20 min to retrieve data...now its in processing when a B user update some of the rows and fired commit in between..suppose after 5 mins when A fired query
    Now please tel A after 20 mins would get the updated rows or same image as it was when started query means old rows data

    user11221081 wrote:
    Dear Guys
    i m getting confused in read consistent image of oracle
    please clear a little
    suppose if i fired a query that takes 20 min to retrieve data...now its in processing when a B user update some of the rows and fired commit in between..suppose after 5 mins when A fired query
    Now please tel A after 20 mins would get the updated rows or same image as it was when started query means old rows dataYou should tell us that what should happen? Always remember that the databases work following the ACID properties where C stands for consistency. This means, that you must not ever see what is called a dirty read . It means that there must not be the case that you should see two different set of results in a single fetch. If a situation happens like this, the database must ensure that your data must be able to show that image of the data which is consistent to the time from when your query started. This is why you need the read consistent image and your database must follow some way of transaction isloation level which in Oracle database is read committed . This means that never ever a reader won't worry about writer and writer won't worry about reader (the word is wait but I changed it to worry to make the point clear).
    If this doesn't make the things clear to you, read the link that Srini has given to you already.
    HTH
    Aman....

  • About Read table

    Can any body explain about Read table and when it can use.

    Hi,
    When u want to read a record based on some condition then u can use READ.
    LOOP AT itab.
    READ TABLE itab WITH KEY matnr = itab-matnr.
    IF sy-subrc = 0.
    ENDIF.
    ENDLOOP.
    U can read only a single record.
    U can also use
    READ TABLE itab INDEX 1.
    Reward points if this is helpful.

  • A question about reading tomcat source code

    Hi, everyone!
    I just saw the tomcat source code, there is a method named "await" in StandardServer class. The comment of this method decribe that this method will wait util a proper shutdown command is received.
    I'm confused about it after read this method.
    In my opinion, this method create a server socket on port 8005 by default, and wait for "SHUTDOWN" string to only close the server socket which is listening on port 8005.
    But I think this method is supposed to close all the server sockets which are listenning for client's request and belong to this server when port 8005 received "SHUTDOWN" string.
    Thank you in advance.
    Edited by: Garrett.Li on Oct 17, 2007 9:18 AM

    about reading tomcat source code i cant get you man,

  • A problem about reading from serial port

    Hi,
       I just sent '0x03' from MCU to PC continuously, and then sent  '/n' as a stop character after every '0x03'. I use labview to read the data. The problem is when it get two '03' it get a '0', another two '03' and another a '0'. I don't know where is the '0' from?
      PS: Hyper terminal can display natrually.
       Thank you! 
    帖子被hengfo在08-08-2007 10:14 PM时编辑过了
    Attachments:
    serial read.vi ‏36 KB

    I think the problem may be the loop reading the serial port is running too fast.  There is no timing delay in the loop, so you are reading it as fast as you can, and probably faster than the device is sending data.  So sometimes the buffer is empty, and then the empty string gets converted to a numeric zero.  The way to know for sure is to put an indicator on the error wire coming out of the serial port read.  I bet you will see errors about the read buffer being empty.
    Put a wait timer in the loop to slow down the execution just slightly.  This is a good idea so that LV doesn't eat up all the CPU resources.  Look at the example for Basic Serial Write and Read.  You may want to have a loop ahead of the read that waits until there are a certain number of bytes at the port before it reads the serial port.  You may want to put a loop around the serial port that waits until a valid number is read in before it exits the loop and goes to the numeric conversion.
    Message Edited by Ravens Fan on 08-09-2007 08:50 AM

  • Question about Reader DRM activation

    Hi All
    I got a paper "FAQ ACS Discontinuation of Sales, November 30, 2004"
    I have a question about ACS.
    As I konw, ACS is discontinued effective November 30, 2004.
    and I read a section in paper below:
    Q. Will Adobe Reader and Acrobat users get support from Adobe for eBook issues?
    A. Support is not available for the free Adobe Reader, however, assistance for user activation is
    available until December 31, 2006.
    Does it mean Reader activation service will be stop until December 31, 2006?
    That's a big problem for our ebook service!!

    Adobe communicated in January to ACS customers that the DRM Activator service would remain operational until December 31, 2007, one year longer than previously announced.
    If you didn't receive this announcement, send your contact info (email and surface mail) to "[email protected]".
    You'll receive an autotmated reply that your email bounced but it will then be manually confirmed.

  • Question about read method of InputStream

    Hello everyone,
    I am using read method of InputStream to read a stream from a remote machine. The network connection is not very stable (for example, a wireless network whose the signal strength is relatively low). I am wondering if read method returns -1 (which indicates the end of the stream has been reached), and if I invoke read method again on the same stream, is it possible to read any more data?
    I think maybe I can read some more data even if read returns -1 in one time because the connection is not very stable. I am looking for your comments to my problem in my specific situation.
    regards,
    George

    Thanks Adeodatus,
    Doc says This method blocks until input data is
    available, the end of the stream is detected, or
    an
    exception is thrown.
    http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputS
    tream.html#read()
    I have not found any related parts in documents.
    http://java.sun.com/j2se/1.4.2/docs/api/
    Them's docs.
    if you're using a different version of java, replace
    the underlined portion with your version number.I am using JDK 1.3, and I have found related documents. But I can not find out where can I set timeout value of read operation. I am reading data from an HTTP InputStream. Can you help?
    regards,
    George

  • Question about reading a string or integer at the command line.

    Now I know java doesn't have something like scanf/readln buillt into it, but I was wondering what's the easiest, and what's the most robust way to add this functionality? (This may require two separate answers, sorry).
    The reason I ask is because I've been learning java via self study for the SCJA, and last night was the first time I ever attempted to do this and it was just hellish. I was trying to make a simple guessing game at the command line, I didn't realize there wasn't a command read keyboard input.
    After fighting with the code for an hour trying to figure it out, I finally got it to read the line via a buffered reader and InputStreamReader(System.in), and ran a try block that threw an exception. Then I just used parseInt to get the integer value for the guess.
    Another question: To take command line input, do you have to throw an exception? And is there an easier way to make this work? It seems awfully complicated to take user input without a jframe and calling swing.
    Edited by: JGannon on Nov 1, 2007 2:09 PM

    1. Does scanner still work in JDK1.6?Try it and see. (Hint: the 1.6 documentation for the class says "Since: 1.5")
    If you get behaviour that doesn't fit with what you expect it to do, post your code and a description of our expectations.
    2. Are scanner and console essentially the same thing?No.
    Scanner is a class that provides methods to break up its input into pieces and return them as strings and primitive values. The input can be a variety of things: File InputStream, String etc (see the Scanner constructor documentation). The emphasis is on the scanning methods, not the input source.
    Console, on the other hand, is for working with ... the console. What the "console" is (and whether it is anything) depends on the JVM. It doesn't provide a lot of functionality (although the "masked" password input can't be obtained easily any other way). In terms of your task it will provide a reader associated with the console from which you can create a BufferedReader and proceed as you are at the moment. The emphasis with this class is the particular input source (and output destination), not the scanning.
    http://java.sun.com/javase/6/docs/api/java/util/Scanner.html
    http://java.sun.com/javase/6/docs/api/java/io/Console.html

  • Question about reading csv file into internal table

    Some one (thanks those nice guys!) in this forum have suggested me to use FM KCD_CSV_FILE_TO_INTERN_CONVERT to read csv file into internal table. However, it can be used to read a local file only.
    I would like to ask how can I read a CSV file into internal table from files in application server?
    I can't simply use SPLIT as there may be comma in the content. e.g.
    "abc","aaa,ab",10,"bbc"
    My expected output:
    abc
    aaa,ab
    10
    bbb
    Thanks again for your help.

    Hi Gundam,
    Try this code. I have made a custom parser to read the details in the record and split them accordingly. I have also tested them with your provided test cases and it work fine.
    OPEN DATASET dsn FOR input IN TEXT MODE ENCODING DEFAULT.
    DO.
    READ DATASET dsn INTO record.
      PERFORM parser USING record.
    ENDDO.
    *DATA str(32) VALUE '"abc",10,"aaa,ab","bbc"'.
    *DATA str(32) VALUE '"abc","aaa,ab",10,"bbc"'.
    *DATA str(32) VALUE '"a,bc","aaaab",10,"bbc"'.
    *DATA str(32) VALUE '"abc","aaa,ab",10,"b,bc"'.
    *DATA str(32) VALUE '"abc","aaaab",10,"bbc"'.
    FORM parser USING str.
    DATA field(12).
    DATA field1(12).
    DATA field2(12).
    DATA field3(12).
    DATA field4(12).
    DATA cnt TYPE i.
    DATA len TYPE i.
    DATA temp TYPE i.
    DATA start TYPE i.
    DATA quote TYPE i.
    DATA rec_cnt TYPE i.
    len = strlen( str ).
    cnt = 0.
    temp = 0.
    rec_cnt = 0.
    DO.
    *  Start at the beginning
      IF start EQ 0.
        "string just ENDED start new one.
        start = 1.
        quote = 0.
        CLEAR field.
      ENDIF.
      IF str+cnt(1) EQ '"'.  "Check for qoutes
        "CHECK IF quotes is already set
        IF quote = 1.
          "Already quotes set
          "Start new field
          start = 0.
          quote = 0.
          CONCATENATE field '"' INTO field.
          IF field IS NOT INITIAL.
            rec_cnt = rec_cnt + 1.
            CONDENSE field.
            IF rec_cnt EQ 1.
              field1 = field.
            ELSEIF rec_cnt EQ 2.
              field2 = field.
            ELSEIF rec_cnt EQ 3.
              field3 = field.
            ELSEIF rec_cnt EQ 4.
              field4 = field.
            ENDIF.
          ENDIF.
    *      WRITE field.
        ELSE.
          "This is the start of quotes
          quote = 1.
        ENDIF.
      ENDIF.
      IF str+cnt(1) EQ ','. "Check end of field
        IF quote EQ 0. "This is not inside quote end of field
          start = 0.
          quote = 0.
          CONDENSE field.
    *      WRITE field.
          IF field IS NOT INITIAL.
            rec_cnt = rec_cnt + 1.
            IF rec_cnt EQ 1.
              field1 = field.
            ELSEIF rec_cnt EQ 2.
              field2 = field.
            ELSEIF rec_cnt EQ 3.
              field3 = field.
            ELSEIF rec_cnt EQ 4.
              field4 = field.
            ENDIF.
          ENDIF.
        ENDIF.
      ENDIF.
      CONCATENATE field str+cnt(1) INTO field.
      cnt = cnt + 1.
      IF cnt GE len.
        EXIT.
      ENDIF.
    ENDDO.
    WRITE: field1, field2, field3, field4.
    ENDFORM.
    Regards,
    Wenceslaus.

  • Cant seem to find any information about reading text on a pdf browser or open word document for coded UI.

    Hi forum,
            I'm currently building automation for this web application for my job that have links that opens either a word document, a web page or opens up a pdf document in the browser in the same screen.  All i'm trying to do is read
    the text from the pdf browser, or the word document that opens up and read the related text off these documents. 
    I know how to read the related text from the web page that opens but for
    the other two options i dont really know what i have to do.  I read the ALM add for word might
    work but i haven't tried to implement this or know if this will help me. 
    When i read these strings out i plan on comparing them and doing an assertion on them.
    Can someone point me to the right direction on doing this.
    Tahnks

    Hi skinny_Will,
    The coded UI test would have some limitations for the Word/office controls by design.
    To really read and compare the text value, I'm afraid that we would use certain extension tool/add-in and custom code for it.
    Please check the Visual Studio Coded UI for Word Add-In.
    Reference:
    https://social.msdn.microsoft.com/Forums/en-US/b12f1cf8-322f-4b3a-ad8f-011065d91356/comparing-word-documents-in-coded-ui?forum=vstest
    Best Regards,
    Jack
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Question about reading a sequential file and using in an array

    I seem to be having some trouble reading data from a simple text file, and then calling that information to populate a text field. I think I have the reader class set up properly, but when a menu selection is made that calls for the data, I am not sure how to receive the data. Below is the reader class, and then the code from my last program that I need to modify to call on the reader class.
    public void getRates(){
              try{
                 ArrayList<String> InterestRates = new ArrayList<String>();
                 BufferedReader inputfile = new BufferedReader(new FileReader("rates.txt"));
                 String data;
                 while ((data = inputfile.readLine()) != null){
                 //System.out.println(data);
                 InterestRates.add(data);
                 rates = new double[InterestRates.size()];
                 for (int x = 0; x < rates.length; ++x){
                     rates[x] = Double.parseDouble(InterestRates.get(x));
           inputfile.close();
           catch(Exception ec)
    //here is the old code that I need to change
    //I need to modify the rateLbl.setText("" + rates[1]); to call from the reader class
    private void mnu15yrsActionPerformed(java.awt.event.ActionEvent evt) {
            termLbl.setText("" + iTerms[1]);
              rateLbl.setText("" + rates[1]);

    from the getRates function your InterestRates ArrayList is declared within that function, so it will not be accesible from outside of it, if you declare it outside then you can modify in the function and have it accessible from another function.
    private ArrayList<String> InterestRates = new ArrayList<String>();
    public void getRates(){
              try{
                 BufferedReader inputfile = new BufferedReader(new FileReader("rates.txt"));
                 String data;
                 while ((data = inputfile.readLine()) != null){
                 //System.out.println(data);
                 InterestRates.add(data);
                 rates = new double[InterestRates.size()];
                 for (int x = 0; x < rates.length; ++x){
                     rates[x] = Double.parseDouble(InterestRates.get(x));
           inputfile.close();
           catch(Exception ec)
         }

Maybe you are looking for

  • How to rename with inverse rating in the filename?

    This is a question about sorting and renaming. I have a bunch of sports images in Lightroom that are all tagged with an appropriate rating or 1-5 stars.  Because they are sports images, some are sequences of images taken at 8fps. I want the images to

  • Overlapping data when more data column chart SSRS

    Hi guys, In my ssrs report the column chart  display is not good when more number of datas are viewed.How to overcum this issue I searched more on this issue no good solution found. I attached screenshot for this report, any suggestions pls Thanks, R

  • WRT54G V.5 and WAP54G in "Repeater Mode" works flawlessly!

    If any of you've wondered if the combination of a Linksys WRTG54 V 5.0 Wireless Router and a Linksys WAP54G can function in "Repeater Mode". The answer is Yes. Repeater mode means to repeat your Lan wirelessly. All clients of the WAP54G are on the sa

  • Appending two internal tables

    hello friends, I have two internal tables of different structure. i have filled those two internal tables using join statements. But one field is common in both the tables, when i try to append both tables into another new internal table. i cant get

  • Event Callback Problems during compilation

    Hi I try to register a callback vi with the "Register Event Callback"-node. I pass a reference of an array as user parameter into to the "Register Event Callback"-node. Everything works well in the development environment. But when I try to build an