K-nearest neighbors in MLT - any example?

Hi, 
There are currently no example on the LabVIEW MLT about the k-NN vi.
We would like to use k-NN and would like to refer to some examples. 
We couldn't get the distance control VI to work, and we are a bit puzzled by the fact that "examples" only accepts 1D arrays (our data is 2400 vectors, each of size 1x256).
Our understanding of the VI is that "distance" specifies which type of norm, "examples" is the labeled data, "sample" is the new, unlabeled data. 
When running with the current setup, there seems to be an error with the distance control.
Thanks for your help in advance, 
N&A
Attachments:
kNN pb.PNG ‏9 KB

Hi Pallikaranai,
I attempted several more times to work with the MLT but couldn't find any way, even getting onto NI themselves who tried to help but couldn't. But, I did get help from a LabVIEW user and a paper that was able to help me use a method which would be quite similar to KNN. Basically I had databases of 'knocking' or 'tapping' data and I wanted to compare my live signal to these databases to see if it was a 'tap' or a 'knock'.
I put my live signal and database amplitudes thorugh this method:
Wavelet transform
Covariance
SVD
find log base 10 of Vector S of SVD
find Mean, Max and  Min values of this and add togther to find Value X
compare this value X to the same values of the databses after they were put through the same method and the smallest difference was the database
that the event belonged in.
I have also attached my code for my DB showing how I did it in LabVIEW. I hope its of help, it might not at all. NI had a look over this method themselves too
and they said it should be ok. Are you applying to a signal yourself or anything similar?
Attachments:
SampleSignals.vi ‏223 KB

Similar Messages

  • Mountains and nearest neighbor do not mix

    Note - this is not an Oracle question - but something as food for thought. Appropriate I think as graph is now a big component of the product...
    While on vacation in Colorado last week, we decided to head up to Crested Butte to see a local play production. My wife, searching for a local motel on a site I will not name, found one with great ratings that was quite reasonable and about "30 miles" away. Not being from Colorado, she went ahead and booked it, and then told me where it was. I shook my head. That is no where near 30 miles away, at least by road - it is on the other side of the mountain!
    Obviously this company uses a point to point with nearest neighbor "as the crow flies" method. While simple points might work reasonably well for small areas, say in a city road grid, it is a horrible solution for larger areas and places like Colorado. With mountains that take hours to drive around, those 30 miles or so turn out to be 90 miles of road and take about 3 hours to drive based on posted speeds!
    Needless to say, I was upset. After spending almost an hour on the phone to get this all straightened out and the bill credited, I thought I'd point this out. Not only for "buyer beware" - but mainly as a good example of what not to do when designing map-based systems for consumers. KISS is usually a good approach, but in this case it is a horrible one when a road network with speeds AKA network data model graph solution is required.
    Bryan

    Good point.
    Thinking further, even in a city grid you have one-way streets, parks, longer blocks, etc., which can make the real distance (by road) much further than "as the crow flies". So I'm not sure nn is really good for any such "close to me" analysis tool.
    And yes thanks, had a great vacation. Miss the cool weather from my native state!
    Bryan

  • Nearest Neighbor Query takes 7 minutes

    Hello there, First time poster on the forums. 
    I've been looking into spatial comparison recently and have come across a few problems. The query I run takes 7 minutes to return the nearest neighbor. 
    My table that has the Geographical locations is of the following structure and has 1.7 million rows. 
    CREATE TABLE [dbo].[PostCodeData](
    [OutwardCode] [varchar](4) NOT NULL,
    [InwardCode] [varchar](3) NOT NULL,
    [Longitude] [float] NULL,
    [Latitude] [float] NULL,
    [GeoLocation] [geography] NULL,
    CONSTRAINT [PK_PostCodeData] PRIMARY KEY CLUSTERED
    [OutwardCode] ASC,
    [InwardCode] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    I have another table with many records on which I only have a Geography point (which I call Geolocation) and I'm trying to get the postcode from the PostCodeData table based on the nearest [GeoLocation] naturally.
    This is my query at the moment :
    SELECT top 2 [PostCode]
    ,[Geolocation]
    , (select top 1 pc.InwardCode from PostCodeData pc order by pc.GeoLocation.STDistance(bg.Geolocation)) found_post_code
    FROM [tbl_potatoes] bg
    where bg.Geolocation is not null
    This query is taking 7 minutes and as you can see I'm only doing this for 2 (top 2) records from the burning_glass table. What would happen if I wanted to process the whole table which has like 700k rows.
    What I've tried: 
    1. Created a spatial index.
    2. Followed a post somewhere on these forums about applying it as a hint (WITH: WITH (INDEX(ixs_postcode)))
    It didn't let me apply the hint and gave the following error : 
    Query processor could not produce a query plan because of the hints defined in this query. Resubmit the query without specifying any hints and without using SET FORCEPLAN.
    Any help is appreciated. 

    Just before the end of the day yesterday, a colleague of mine spotted the missing 'Where' in the subquery and we added it in.
    The query now looks as such : 
    UPDATE top(200) tbl_potatoes
    SET PostCode =
    select top 1 pc.OutwardCode
    from PostCodeData pc
    where pc.GeoLocation.STDistance(Geolocation) < 1000
    order by pc.GeoLocation.STDistance(Geolocation)
    WHERE Geolocation is not null;
    The problem is, this query still takes a while. It now takes 3min27seconds for 200 rows. Not that this bit of math would be accurate in any way however if it takes 207seconds to do 200 rows, to do 300,00 it will most likely take somewhere between 80 to 90
    hours. 
    This is hardly going to be something that is going to work.
    That was the update - the SELECT statement :
    SELECT top 200 [PostCode]
    ,[Geolocation]
    , (select top 1 pc.OutwardCode
    from PostCodeData pc
    where pc.GeoLocation.STDistance(bg.Geolocation) < 1000
    order by pc.GeoLocation.STDistance(bg.Geolocation)) found_post_code
    FROM [tbl_potatoes] pot
    where Geolocation is not null
    Takes just 23seconds for 200 records. Meaning it would take around 10 hours for 300k.
    I tried Isaacs second example where he uses the STBuffer(10000) but it leads even more time in the select statement and quite frankly I don't get what is going on in his 3rd example where he talks about his declarative syntax.

  • Exporting a movie with the settings "nearest neighbor"

    Hello everybody!
    I am trying to upscale a movie from an old video game. The resolution is 320x240 and should be upscaled to 1440x1080. The problem is that I don't want Adobe Premiere Pro 6 to upscale it using a chroma subsampling method (http://ingomar.wesp.name/2011/04/dosbox-gameplay-video-capture.html), instead I want to use something similar to the option "nearest neigbor" (the one you have in Adobe Photoshop when you resize images). Why I want this is because I want to keep the pixels from the video game sharp. Is this possible to do?

    And if you take a screen cap, import it into Photoshop and upscale by a factor 4 (with Nearest Neighbour) the result is amazing!
    Actually, I find that up-rezzing with the Nearest Neighbor algorithm to be about the lowest quality of any of the algorithms. It came first, and is basically a holdover from about PS version 2.5. Bicubic interpolation was added later, and then Bicubic Smoother and Bicubic Sharper.
    However, I am always working with continuous tone, high-rez digital photographs, and not screen-caps, so perhaps my material is not the ultimate to judge Nearest Neighbor?
    Still, for a 16x increase, about the only thing that I can suggest (and this is for Stills, and not Video) would be Genuine Fractals (once Human Softaware, but acquired by another company). Still, that is beyond the max limit that I would be comfortable with.
    Others have mentioned Red Giant's Magic Bullet Instant HD, and I would download the trial, then test. That might be "as good as it get."
    Good luck,
    Hunt

  • Cloud of Points Tree /Nearest Neighbor

    Hi guys;
    I'm using a binary tree to construct a tree of two dimensional points .here is how i construct the tree :
    the tree is constructed by successive subdivision of the Plan by semi-Lines accross a given point.
    the first subdivision is done by say a horizantal line across a given point.the plan is then split into two regions : the upper and lower half plans. the points in the upper plan will be in the right subtree and those in the lower plan will go into the left subtree.
    in the next step the plan will be subdiveded by a VERTICAL semi-line at this time : the points at the left of this line will be placed in the left subtree and those on the right will be placed to right subtree.
    Now i managed to write an insert() method for this :
    static Tree insert(Point p, Tree a, boolean vertical)
         if (a == null)
         return new Tree(null, p, null);
         boolean estAGauche =
         (vertical) ? (p.x < a.p.x) : (p.y < a.p.y);
         if (estAGauche)
         Tree g = insert(p, a.filsG, !vertical);
         return new Tree(g, a.p, a.filsD);
         else
         Tree d = insert(p, a.filsD, !vertical);
         return new Tree(a.filsG, a.p, d);
         static Tree insert(Point p, Tree a)
         return insert(p, a, false);
         }Now i want to tackle another problem : given the tree is filled with a cloud of points.
    if i pick a given point in the cloud ,i want to find the nearest neighbor of this point using the tree construct i described above.
    is this possible ? How can I implement it ?
    Many thanks for helping !

    this is because i will be dealing with a verylarge
    number of points so efficiency here is definitelya
    crucial issue...what do you think josiah ?Well, I've used that little algorithm for a global
    map with, say, 1e6 known points
    and the response was always almost intantaneous. It
    depends on the distribution
    of your known points, i.e. you can easily draw
    pathetic situations on a piece of
    paper but on average the nearest point is found
    withing a few searches (after
    finding those two lines using an O(log(n)) binary
    search ...
    Two dimensional locality doesn't help you much when
    you're using quad-trees;
    as has been said before in this thread: two nearest
    points may be miles apart
    in the tree.
    What does help (altough not much) is, after sorting
    the points on increasing Y
    values, do a minor sort using Gray-codes on the X
    coordinate. But that's for a
    later discussion ;-)
    kind regards,
    Jos
    Well, I've used that little algorithm for a global
    map with, say, 1e6 known points
    and the response was always almost intantaneous. It
    depends on the distribution
    of your known points, i.e. you can easily draw
    pathetic situations on a piece of
    paper but on average the nearest point is found
    withing a few searches (after
    finding those two lines using an O(log(n)) binary
    search ...
    What you say is very encouraging so i will try your little algorithm for sure.
    any way At this first stage of my application i'm not demanding some extra ordinary work to be acheived , and this one would be surely very sufficient..
    Two dimensional locality doesn't help you much when
    you're using quad-trees;
    as has been said before in this thread: two nearest
    points may be miles apart
    in the tree.
    you right !
    What does help (altough not much) is, after sorting
    the points on increasing Y
    values, do a minor sort using Gray-codes on the X
    coordinate. But that's for a
    later discussion ;-)
    something interesting i'll be patiently waiting for ;)
    kind regards,
    JosMany thanks ,

  • K Nearest Neighbor Algorithm Code in Java

    I am looking for a code in Java for K nearest neighbor algorithm (considering clusters if possible which is able to detect outlier clusters).
    Thanks!
    Edited by: win13 on Oct 1, 2007 11:54 AM
    Edited by: win13 on Oct 1, 2007 12:00 PM

    interface MS{ // metric space
      double dist(MS p); // distance between this point and argument
    MS[] kNN(MS data, MS target, int k){
      MS[] res = new MS[k]; double[] d = new double[k];
      int n = 0; // number of element in the res
      // check inputs for validity
      if(data.length == 0 || k<=0) return res; // bail on bad input
      double dd = target.dist(data[0]); // load first one into list
      res[n] = data[0]; d[n++] = dd;
      // go through all other data points
      for(int i = 1; i<data.length; i++){
        if( n<k || d[k-1] > (dd = target.dist(data))){ //add one
    if(n<k){res[n] = data[i]; d[n++] = dd;}
    int j = n-1;
    while(j>0 && dd < data[j-1]){ // slide big data up
    res[j] = res[j-1]; d[j] = d[j-1]; j--;
    res[j] = data[i]; d[j] = dd;
    return res;
    As I said, I don't feel that this code is that difficult. I would be more concerned as to whether the data admits the particular definition of outlier that you have selected.
    It is a mistake to assume that one particular definition of a cluster or an outlier will work in all cases. For example using the definition you supply, if you have one single mega cluster of a thousand elements located within a foot of one another here on earth and you have about 10 other "clusters', each with but a single element, each a single light year apart but all somewhere out near the andromeda galaxy, you will conclude that cluster centers are on the average about one light year apart but that there is one bad outlier, that one way over there on earth.
    But, hey it's your data. Go nuts.
    Just for the record, I don't typically test code that I type into the forum so what I have supplied may not even compile and certainly should not be assumed to be correct. You will need to read it, and treat it as an outline for the code that you will need to write.
    Enjoy                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • The nearest neighbor interpolation problem

    Hello,
    After my Photoshop CS6 update I have problem with the Nearest Neighbor interpolation. It was working correctly before. I was setting the General and Free Transform preferences first and rotating pictures by 45 degrees then. It was always giving me pixel-perfect results in PS CS6. Now that stopped working. Am I missing something? I have made video showing my results and all the steps I am making:
    How about you? What your results are after rotating any picture by 45 degrees in the Nearest Neighbor interpolation mode? I would be happy to know what is wrong now and how to achieve good results. I will appreciate any help.

    What your results are after rotating any picture by 45 degrees in the Nearest Neighbor interpolation mode?
    The same mess with Ps 13.0.1 on OS X 10.6.8.
    Very interesting that the Free Transform looks good until it is actually commited.
    I don't know whether it was different in 13.0

  • What is the best way to arrange Videos on a Page? Do you have any examples?

    I'm trying to design an iWeb page strictly for [YouTube] videos and am still perplexed with what the best arrangement is. See my video page here: http://servalonline.com/Serval_Online/Video.html. As you can see, IT *****! Do you have any examples on your site? i.e. a page with videos, that you can share with me? Thanks.

    Chuka wrote:
    Do you have any examples on your site? i.e. a page with videos, that you can share with me?
    They're obviously not my sites, but perhaps they'll give you some layout ideas:
    http://www.bbc.co.uk/news/videoandaudio
    http://www.ted.com/talks
    http://devour.com

  • Req any examples of how to use a USB midi controller​/keyboards with Labview TIA

    Req any examples of how to use a USB midi controller/keyboards with Labview TIA

    Hi,
    To access the MIDI ports you will need to call the Windows SDK. To send MIDI commands is relatively easy, here is an example that shows you how to send data to a MIDI controller or keyboard.
    As far as input goes, this is the hard part. There are a series of functions that you need to call to open up the device, set some buffers and and possibly a callback to get notifications on the incoming data.
    Reading MIDI data will not be an easy task, your best bet will be to implement this in a DLL and call that DLL in LabVIEW, there should be some code available o the web.
    = "http://msdn.microsoft.com/library/default.asp?url​=/library/en-us/multimed/htm/_win32_multimedia_... is a link to the Windows multimedia functions that you could use for MIDI input.
    Let me know if you have any further questions.
    Regards,
    Juan Carlos
    N.I.

  • Req any examples of high to use midi controller/keyboards with Labview TIA

    Req any examples of high to use midi controller/keyboards with Labview TIA

    [email protected];
    Check the following:
    Communicating with a Windows MIDI Device in LabVIEW
    Regards;
    Enrique
    www.vartortech.com

  • In Data Quality transform please explain Associate transform with the help of any example.

    In Data Quality transform please explain Associate transform with the help of any example.

    Hi Neha,
    If we are using multiple match transforms and consolidate the final output we will use associate transform .
    Let me explain with one example based on data quality blue prints for USA .
    We have customer/vendor data .     We need to find the duplicates .
    1. First  we will find the duplicates  on   Name and Address
    2. Second  we will find the duplicates on Name and Email
    3. Third we will find the duplicates on Name and Phone
    Here why we need to find the duplicates in multiple stages . If we are finding the duplicates on combination of  Name, Address, Email and Phone  we may not get proper duplicates   as we are finding the potential duplicates . That's why we are finding the duplicates on different combinations .
    In this case we will get the different group numbers for each match combination . Each combination name is there .
    We want to consolidate and give the group number to the whole set of duplicates . We will pass these  3 match groups to associative transform and generate the  consolidated match group for the input data.
    I hope you understand the concept .
    Thanks & Regards,
    Ramana.

  • Oracle ADF RichSelenium class - any examples on how to use this?

    Digging around the net and found that there is a class for Selenium testing ADF Rich components, namely oracle.adf.view.rich.automation.selenium.RichSelenium located in oracle_common\modules\oracle.adf.view_11.1.1\adf-richclient-automation-11.jar.
    I've been searching for half a day now and cannot find any example code on how to use RichSelenium class for the life of me.
    There are examples of using Selenium with ADF (http://www.oracle.com/technetwork/articles/adf/part6-094560.html) but not using RichSelenium.
    Any lead or information would be highly appreciated, thanks in advance.

    OK figured out how to start using this RichSelenium class and thought I'd post my findings on this thread for the sake of anyone else who wants to know. Here's my code:
    -- START OF CODE
    package my.richselenium.test;
    import java.util.concurrent.TimeUnit;
    import org.junit.After;
    import org.openqa.selenium.WebDriver;
    import org.openqa.selenium.WebDriverCommandProcessor;
    import org.openqa.selenium.firefox.FirefoxDriver;
    * Base test class for handling common functionality across tests - setting up web driver, retrieving URL and cleaning
    * up and resources.
    public class myTest {
    public void runTest() {
    // Create WebDriver
    WebDriver myWebDriver = new FirefoxDriver();
    // Setup Web Driver Command Processor
    WebDriverCommandProcessor wdcp = new WebDriverCommandProcessor("http://www.google.com", this.driver);
    // Instantiate RichSelenium class object
    RichSelenium rs = new RichSelenium(wdcp);
    // Load specific URL
    rs.open("http://www.oracle.com");
    // Let's do some RichSelenium specific processing
    String [] someArray = rs.getAllFields();
    List<String> someList = Arrays.asList(someArray);
    // for loop advance
    for (String temp : someList ) {
    System.out.println(temp);
    rs.close();
    -- END OF CODE
    -----------------------------------------------------------------------------------------------------------------------------------------

  • Can we call functional module in a subroutine? Any example?

    Can we call functional module in a subroutine? Any example?

    sample code....
    REPORT  ZPL_BDC_PA30.
    TABLES : PA0022.
    DATA : V_PERNR LIKE PA0022-PERNR,
           V_SLABS LIKE PA0022-SLABS.
    DATA : FILENAME TYPE STRING.
    DATA : BEGIN OF IT_DATA OCCURS 0,
             PERNR LIKE PA0022-PERNR,       "Personnel Number
             SLABS LIKE PA0022-SLABS,       "Certificate code
             SLABS1 LIKE PA0022-SLABS,      "Certificate code new
           END OF IT_DATA.
    DATA : IT_BDCDATA LIKE BDCDATA OCCURS 1 WITH HEADER LINE.
    DATA : BEGIN OF IT_ERROR OCCURS 0,
             POS LIKE SY-TABIX,
             TEXT(40),
           END OF IT_ERROR.
    PARAMETERS : P_FNAME TYPE DXFIELDS-LONGPATH.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FNAME.
      CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'
    EXPORTING
      I_LOCATION_FLAG       = ' '
      I_SERVER              = '?'
      I_PATH                = I_PATH
      FILEMASK              = '.'
      FILEOPERATION         = 'R'
       IMPORTING
      O_LOCATION_FLAG       = O_LOCATION_FLAG
      O_SERVER              = O_SERVER
         O_PATH                = P_FNAME
      ABEND_FLAG            = ABEND_FLAG
       EXCEPTIONS
         RFC_ERROR             = 1
         ERROR_WITH_GUI        = 2
         OTHERS                = 3
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    START-OF-SELECTION.
      FILENAME = P_FNAME.
      PERFORM UPLOAD.            "Uploading inputfile to internal table.
      PERFORM VALIDATE.          "validating the values
      PERFORM POPULATE_BDC.      "Populating bdc internal table
      PERFORM ERROR_RECORDS
            TABLES IT_ERROR.     "Error records
    *&      Form  bdc_fdata
    FORM BDC_FDATA  USING  FNAM FVAL.
      CLEAR IT_BDCDATA.
      IT_BDCDATA-FNAM = FNAM.
      IT_BDCDATA-FVAL = FVAL.
      APPEND IT_BDCDATA.
    ENDFORM.                    " bdc_fdata
    *&      Form  bdc_hdata
    FORM BDC_HDATA  USING PROGRAM SCRNO DYNBEGIN.
      CLEAR IT_BDCDATA.
      IT_BDCDATA-PROGRAM = PROGRAM.
      IT_BDCDATA-DYNPRO = SCRNO.
      IT_BDCDATA-DYNBEGIN = DYNBEGIN.
      APPEND IT_BDCDATA.
    ENDFORM.                    " bdc_hdata
    *&      Form  upload
    FORM UPLOAD .
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          FILENAME                      = FILENAME
         FILETYPE                      = 'ASC'
         HAS_FIELD_SEPARATOR           = 'X'
      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                      = IT_DATA
       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 I000(BCTRAIN) WITH 'FILE NOT UPLOADED'.
      ELSE.
       MESSAGE I000(BCTRAIN) WITH 'FILE UPLOADED'.
      ENDIF.
    ENDFORM.                    " upload
    *&      Form  populate_bdc
    FORM POPULATE_BDC .
      LOOP AT IT_DATA .
        PERFORM BDC_HDATA USING 'SAPMP50A'
                                    '1000'
                                    'X'.
        PERFORM BDC_FDATA USING 'RP50G-PERNR'
                                 IT_DATA-PERNR.
        PERFORM BDC_FDATA USING 'RP50G-CHOIC'
                                 '0022'.
        PERFORM BDC_FDATA USING 'BDC_OKCODE'
                                 '=MOD'.
        PERFORM BDC_HDATA USING 'MP002200'
                                     '2000'
                                     'X'.
        PERFORM BDC_FDATA USING 'P0022-SLABS'
                                 IT_DATA-SLABS1.
        PERFORM BDC_FDATA USING 'BDC_OKCODE'
                                 '=UPD'.
        CALL TRANSACTION 'PA30' USING IT_BDCDATA.
        REFRESH IT_BDCDATA.
      ENDLOOP.
    ENDFORM.                    " populate_bdc
    *&      Form  validate
    FORM VALIDATE .
        data : num like sy-tabix,
               num1 like sy-tabix.
      LOOP AT IT_DATA.
       num = num + 1.
    num1 = sy-tabix.
        SELECT PERNR
             FROM PA0022
             INTO V_PERNR WHERE
             PERNR EQ IT_DATA-PERNR.
        ENDSELECT.
        IF SY-SUBRC <> 0.
          MOVE num TO IT_ERROR-POS.
          MOVE 'Invalid Pernr' TO IT_ERROR-TEXT.
          APPEND IT_ERROR.
          DELETE IT_DATA .
        ELSE.
          IF IT_DATA-SLABS IS INITIAL.
            MOVE num TO IT_ERROR-POS.
            MOVE 'Certificate code is initial' TO IT_ERROR-TEXT.
            APPEND IT_ERROR.
            DELETE IT_DATA.
          ENDIF.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " validate
    *&      Form  error_records
    FORM ERROR_RECORDS TABLES IT_ERRORS.
      FORMAT COLOR COL_GROUP.
      WRITE : / 'Error in the following records : ' .
      FORMAT COLOR COL_NEGATIVE.
      LOOP AT IT_ERROR.
        WRITE : /  IT_ERROR-POS,
                   IT_ERROR-TEXT.
      ENDLOOP.
    ENDFORM.                    " error_records

  • Is there any  example snippet for XPath using namespace

    Hi,
    I have used XpathApi class to get the XML node matching my xpath that does not deal with namespaces and it works for me. However, it does not seem to work well when I construct the xpath with namespaces (probably I may be doing something wrong example: //ns:node1/@ns:attr1).
    Can anyone give pointers or some example snippet or some links to handle Xpath with namespaces.
    Also if there is any better approach (Classes or framework) for handing XPath with namespaces then please let me know.
    Thanks,
    -vc

    AnkitG wrote:
    Hi All,
    Is there any example for N9010A EXA signal analyzer , I tried to use example of MXA got from the driver page but couldnt get to work. I need to capture the RF data form the analyzer. Please let me know if there any example or way to do it.
    That is an Agilent instrument. Shouldn't be looking for examples on THEIR website?????

  • How to add a multiple roadmap step?Any examples!!!

    Hi All,
    I am using a multistep roadmap within a roadmap ui.It has basically 2 steps assigned to it.I have created 2 context attributes under context node and assigned the datasource property of multistep to it.But i am still unable to see the 2 steps within the multistep element.Any idea of how to do it?Any examples of how to use multi step roadmap.
    Thanks
    Aravind

    Hi Armin,
    Thanks for your input.My problem is i am unable to see the multiple road map step at all.
    This is what i have now.
    1.Roadmap ui
    1a.single roadmapstep1
    1b.single roadmapstep2
    1c.single roadmapstep3
    1d.single roadmapstep4
    1e.single roadmapstep5
    1f.multiple roadmapstep6
    i am not seeing the 1f multiple road map step at all.I have binded the datasource of it to context node of cardinality 0..n and it has 2 context attributes of type string assigned to it.
    Please correct me if i am wrong or missing something

Maybe you are looking for

  • BR0999E Loading of SQL client library orasql9.dll failed

    Hi basis experts, My SAP system is ECC 5.0 and the RDBMS is Oracle 10.2.0.2.0 I want to use transaction DB13 to make database backups, but it sendme an error because it can´t connect to the database. I try to use brtools to make a backup and sendme t

  • How to represent XML inline tags in a Java class

    Dear all, I am currently dealing with the issue of how to transform an XML document into a Java representation. As far as the strucural elements are concerned, I'd represent them each one of them as a Java class. However, the XML structure also allow

  • Playing .dcr files on linux-based server

    Hi there. So I've got situation like this: I would like to present .dcr files on my site (modified Coppermine gallery). And it would be great if I could play these files with internal player (or sth like this) and not count that my visitors have a pl

  • About OCR and Vote Disk size

    Hallo, I have a simple question about OCR and Vote Disk in a 10g/11g RAC setup: official documentation speaks about sizing OCR and Vote Disk about 280 MB, but do they mean each OCR and Vote disk LUN ? In other words, for 2 OCR and 3 Vote disk I need

  • Streaming Video from Premiere Pro

    Is there a simple way to export my video and post in on my server to for streaming? I have tried to export a quicktime file, but it does not compress small enough. I also used Adobe Media encoder to create an .flv file, but I am not a Flash expert so