Filter the unique records

Hi ,
for writting a code for "filter the unquie records based on EXNUM AND EXYEAR"
I HAVE WRITTEN
"delete the adjacent duplicate from y_v_delivery(defined)
   comparing EXNUM EXYEAR"
IS IT CORRECT OR NOT

Hi Bijender,
First Use SORT for the same.
SORT y_v_delivery BY EXNUM EXYEAR.
And then use DELETE..which is correct.
Reward points if useful.
Regards,
Atish

Similar Messages

  • Start routine to filter the duplicate records

    Dear Experts
    I have two questions regarding the start routine.
    1) I have a characteristic InfoObject with transactional InfoSource. Often the 'duplicate records' error happens during the data loading. I'm trying to put a start routine in the update rule to filter out the duplicate records. 
    After searching the SDN forum and SAPHelp, I use the code as:
    DELETE ADJACENT DUPLICATES FROM DATA_PACKAGE COMPARING KEY1 KEY2 KEY3.
    In my case, the InfoObject has 3 keys: SOURSYSTEM, /BIC/InfoObjectname, OBJVERS. My code is:
    DELETE ADJACENT DUPLICATES FROM DATA_PACKAGE COMPARING SOURSYSTEM /BIC/InfoObjectname OBJVERS.
    When checking the code I got message: 'E:No component exists with the name "OBJVERS".' So I only included the first 2 keys. But the routine does not work. The duplicate error is still happening. What is missing in this start routine?
    2) Generally, for a start routine, do I really need to include the data declaration, ITAB or WA, SELECT statement etc.?
    Do I have to use the statement below or just simply one line?
    LOOP AT DATA_PACKAGE.
    IF DATA_PACKAGE.....
    ENDIF.
    ENDLOOP.
    Thanks for your help in advance, Jessica

    Hello Jessica,
    if it won't be possible for you to get unique data from the very beginning, there is still another way to manage this problem in a start routine.
    Sort ... and delete adjacent ... must remain. Further on build up an internal table of type data_package, but defined with STATICS instead of DATA. This i-tab stays alive for all data-packages of one load. Fill it with the data of the transferred data-packages, and delete from every new data-package all records which already are in the statics i-tab. Alternatively you could do the same with a Z-(or Y-)database-table instead of the statics i-tab.
    It will probably cost some performance, but better slow than wrong data.
    Regards,
    Ernst

  • Override the unique record of the table

    friends
    i am having a record in the table , and always i want the latest value in the table.
    the record is with 4 fields.
    mandt primary key
    numb  primary key
    username
    date
    now in the program i read the numb from the ztable and after reading that
    i want to update the field with +1 ie override the old record.
    I tried with update and modify statement  but they are inserting the new record,
    i tried the where clause but that is not working.
    when i am using modify statement i am using numb+1 , so it is inserting the new record.
      How to handle this situation , please advice

    Hi,
      As Number is primary key, After reading and adding Number then you need to delete the existing latest record and Insert the new record.
    For EX
    NUM  USERNAME
    0001  NAREN
    0002 SATISH
    0003 RAVI
    Then last number is 0003 , add 1 then num is 0004.Then delete 0003 RAVI
    and add 0004 RAVI
    then DATA becomes
    NUM  USERNAME
    0001  NAREN
    0002 SATISH
    0004 RAVI
    Hope this will help  you.
    Thanks and Regards,
    Narendra.Soma

  • Filters, copy, delete and unique records

    I use a lot the Unique records filter in Excel, anyone knows if it's available on Numbers???,
    Additionally, when I filter a list and I try to copy the filtered results, I copy the whole table again, and when I delete filtered rows, Numbers delete all the non-show rows that are between the filtered ones. How can I avoid it?

    Hi..
    Ex: U have ITAB1 - Email is one of the field
    1. SORT ITAB1BY EMAIL.
    2. DECLARE WF_EMAIL TYPE EMAIL.
    LOOP AT ITAB1.
      AT FIRST.
    WF_EMAIL = ITAB1-EMAIL.
      ENDAT.
    IF NOT WF_EMAIL = ITAB1-EMAIL.
      APPEND ITAB3.  " passing unique entry
       WF_EMAIL = ITAB1-EMAIL.
    ENDIF.
    * pass the values to ITAB2 and APPEND for duplicate all records
    ENDLOOP.
    Hope this Helps,
    Nag
    Edited by: Naga Mohan Kummara on Dec 14, 2009 11:46 AM

  • Debatch unique records only, BizTalk 2010

    Hi all,
    I have a flat file coming onto BizTalk that contains multiple duplicate rows.  I want to debatch to XML, however only keep the unique records.  Is there a way of doing this without using a custom pipeline component?
    Thanks in advance.
    GilesB

    Use a map and with custom XSLT in your map you can filter the records eliminating the duplicate records (Muenchian), then in orchestration by calling the Receive pipeline you can debatch the message. Check the following references for eliminating the duplicate
    records in maps:
    http://social.msdn.microsoft.com/Forums/en-US/760d5bd6-aa97-4fff-a4c8-706f86bda7b5/eliminate-duplicate-records-in-map-instance?forum=biztalkgeneral
    http://alamnaushad.wordpress.com/2012/02/24/filter-unique-records-using-biztalk-xsl/
    And following is the reference for debatching the message in orchestration by calling the Receive pipeline
    http://geekswithblogs.net/sthomas/archive/2005/06/16/44023.aspx
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • Unique records in ODS

    Hello
    I put all of the Info Objects avaiable in Info Source and my ODS still aggregates the data. How to make the records unique for ODS? I mean, is any possibility to add the unique identifier, generated / populated by Update Rules?
    Kooyot.

    HI kooyat--
    Under ODS settings you do have a checkbox with Unique records,..
    you enable that check box and check whether it brings the Uniques records or not.
    If this doesn't you  have to go for an unique identifier in Update rules.
    Regards,
    VIshwa.

  • Unique records

    I've created a dynamic table that retrieves multiple records
    for an individual. I've included a submit button in each line
    created with the unique record ID as hidden data to be sent for
    selecting a update page, but the data I get is all of the unique
    records ID's, like 45,46,48,49,50 where I only wanted #46. The
    example in the workbook shows an href call to select a particular
    record. Is it possible to use either a submit key or a radio button
    to select a certain record to update? I have additional data I need
    to pass along to the next page so an href pointer won't really
    work. What am I doing wrong?

    If you don't want to use an HREF pointer, then you will need
    to use some JavaScript to let you know which record the user has
    selected. Instead of using a type="submit", use a type="button" and
    then include the following onClick statement in the tag:
    onClick="document.form1.selectID=#rs_AP_Cert_Quest.Key#;
    document.form1.submit();"
    Then include a hidden form element named selectID at the
    bottom of the page.
    I probably would use a function instead of coding it directly
    in case I needed to add some more functionality and it would get to
    messy to do all of the JS inline. But the above code will get you
    running.

  • Counting Unique Records: very urgent

    Hi,
    I have to create a query for which i have to count the unique records appearing for a particular selection. For that i created a CK and in its agregation set Count all values <> 0 For customer. we are having Modality in my rows and CK in column. Now what happens if for 4 different records there is one customer then output appears one against that modality but it should show 4. As such there is no unique field in the cube that i can count. But we have maintined a Count key figure against each record in the cube that has value 1 for each row. But as it is a Key figure i cannot use it in aggregation. Is there any way to solve this situation....
    Please help. Its very urgent..
    Thanks
    Points assured.

    Hello,
      Use Exception Aggregation as Customer. It will work.
    Crearte CKF
            Assign 1 initial value
           Count all properties
          Exception aggretion is Customer.
    I think It should work
    Thanks,
    Kishore
    @KR

  • How do i filter the records in analytic view by using variable/parameter for a time range

    i have a analytic view which has a output column as date type. i want the user who use this view have the control to decided the output records based on a time range (from x to y).
    i tried to create 2 variables, 1 for start_time, 1 for end_time. Ideally, i should have a expression for filtering data like this:
    $$start_time <= date_column <= $$end_time
    However, the variable windows doesn't seem to be feasible for the expression as above.
    Does anyone has the same problem and get it solved?
    Thanks!

    just figured out by my own. So the answer is using "variable" with "range" option.
    Making a variable, then set the "selection type" to "range".
    When preview the data, the variable input window pops up with operator on default "equal", use dropdown list to swtich it to "between", then you can enter the start_time and end_time as a range filter.

  • Can we Filter the records using ROW_NUMBER() funtion?

    Oracle 10G
    Hi all,
    In the below query i used ROW_NUMBER() function to get the rownum value after descending order the results.
    How Can i filter the first 10 rows without using a subquery?
    I tried to use alias names but it doesn't work. Is there a way or it should be done only with subqueries?
    select article_type_id,
    article_type_desc,
    ROW_NUMBER() OVER ( order by article_type_id desc) rnum
    from s_article_types
    Results are
    ARTICLE_TYPE_ID     ARTICLE_TYPE_DESC     RNUM
    37     Non-Degree News     1
    36     Career News     2
    35     ET News     3
    34     Hotcourses 2.0 General     4
    33     Hotcourses 2.0 Permanent     5
    32     Hotcourses 2.0 News     6
    1 General news 37
    Thanks in advance

    You can do
    select * from
      select article_type_id, 
      article_type_desc,
      ROW_NUMBER() OVER ( order by article_type_id desc) rnum
      from s_article_types
    where rnum <= 10You can't do it direct.

  • Selecting unique records- Removing consecutive same data

    HI,
    am having a table where in some x,y,msg_date_info fields are there...here the data is in huge number...i need to fetch the data from this table subject to the following query conditions.
    SELECT  X longit,Y latit,MSG_DATE_INFO,row_number() over (order by MSG_DATE_INFO asc) SlNo FROM
    (SELECT distinct x,y,MSG_DATE_INFO,row_number() over (order by MSG_DATE_INFO desc) r
      FROM TRACKING_REPORT WHERE MSISDN='123456789') WHERE R between 1 and 20this works fine...
    here one more thing i want to add up...this query results in 20 rows as expected and i want to filter the records if consecutive x and y values of these rows are same and give only unique values of x and y(condition that same x and y can be there somewhere in the order of data).
    this example will show what is my requirement in detail....and this is the output of the above query
    >
    80.20550609     13.09469998     08-Mar-10 19:23:23     1
    80.20550609     13.09469998     08-Mar-10 19:28:37     2
    80.20087123     13.09437811     08-Mar-10 19:33:25     3
    80.20550609     13.09469998     08-Mar-10 19:38:24     4
    80.20550609     13.09469998     08-Mar-10 19:43:25     5
    80.20550609     13.09469998     08-Mar-10 19:48:25     6
    80.20087123     13.09437811     08-Mar-10 19:53:25     7
    80.20087123     13.09437811     08-Mar-10 19:58:24     8
    80.20550609     13.09469998     08-Mar-10 20:03:25     9
    80.20087123     13.09437811     08-Mar-10 20:08:24     10
    80.20550609     13.09469998     08-Mar-10 20:13:24     11
    80.20087123     13.09437811     08-Mar-10 20:18:37     12
    80.20550609     13.09469998     08-Mar-10 20:23:32     13
    80.20550609     13.09469998     08-Mar-10 20:28:25     14
    80.20550609     13.09469998     08-Mar-10 20:33:23     15
    80.20550609     13.09469998     08-Mar-10 20:38:24     16
    80.20550609     13.09469998     08-Mar-10 20:43:24     17
    80.20550609     13.09469998     08-Mar-10 20:48:24     18
    80.20550609     13.09469998     08-Mar-10 20:53:22     19
    80.20550609     13.09469998     08-Mar-10 20:58:24     20
    >
    from this output i need to filter out CONSECUTIVE unique x and y values. and the output has to be like
    >
    80.20550609     13.09469998     08-03-10 19:23     1
    80.20087123     13.09437811     08-03-10 19:33     3
    80.20550609     13.09469998     08-03-10 19:48     6
    80.20087123     13.09437811     08-03-10 19:53     7
    80.20550609     13.09469998     08-03-10 20:03     9
    80.20087123     13.09437811     08-03-10 20:08     10
    80.20550609     13.09469998     08-03-10 20:13     11
    80.20087123     13.09437811     08-03-10 20:18     12
    80.20550609     13.09469998     08-03-10 20:58     20
    >
    how to go about this requirement?
    Edited by: Aemunathan on Mar 9, 2010 5:45 PM

    The following gives the same results on your test data but maybe it's more accurate because searches both for changes in x and in y:
    SQL> with mytab as (
      2  select 80.20550609 x, 13.09469998 y, '08-Mar-10 19:23:23' mydate, 1 rn from dual union
      3  select 80.20550609,13.09469998, '08-Mar-10 19:28:37', 2 from dual union
      4  select 80.20087123,13.09437811, '08-Mar-10 19:33:25', 3 from dual union
      5  select 80.20550609,13.09469998, '08-Mar-10 19:38:24', 4 from dual union
      6  select 80.20550609,13.09469998, '08-Mar-10 19:43:25', 5 from dual union
      7  select 80.20550609, 13.09469998, '08-Mar-10 19:48:25', 6 from dual union
      8  select 80.20087123, 13.09437811, '08-Mar-10 19:53:25', 7 from dual union
      9  select 80.20087123, 13.09437811, '08-Mar-10 19:58:24', 8 from dual union
    10  select 80.20550609, 13.09469998, '08-Mar-10 20:03:25', 9 from dual union
    11  select 80.20087123, 13.09437811, '08-Mar-10 20:08:24', 10 from dual union
    12  select 80.20550609,13.09469998, '08-Mar-10 20:13:24', 11 from dual union
    13  select 80.20087123, 13.09437811, '08-Mar-10 20:18:37', 12 from dual union
    14  select 80.20550609, 13.09469998, '08-Mar-10 20:23:32', 13 from dual union
    15  select 80.20550609, 13.09469998, '08-Mar-10 20:28:25', 14 from dual union
    16  select 80.20550609, 13.09469998, '08-Mar-10 20:33:23', 15 from dual union
    17  select 80.20550609, 13.09469998, '08-Mar-10 20:38:24', 16 from dual union
    18  select 80.20550609, 13.09469998, '08-Mar-10 20:43:24', 17 from dual union
    19  select 80.20550609, 13.09469998, '08-Mar-10 20:48:24', 18 from dual union
    20  select 80.20550609, 13.09469998, '08-Mar-10 20:53:22', 19 from dual union
    21  select 80.20550609, 13.09469998, '08-Mar-10 20:58:24', 20 from dual
    22  )
    23  select x, y, mydate, rn from (
    24  select x, y, mydate, rn, nvl(lead(x) over (order by rn),0) next_x
    25         , nvl(lead(y) over (order by rn),0) next_y
    26  from mytab
    27  ) where next_x != x or next_y != y;
                       X                    Y MYDATE                               RN
             80.20550609          13.09469998 08-Mar-10 19:28:37                    2
             80.20087123          13.09437811 08-Mar-10 19:33:25                    3
             80.20550609          13.09469998 08-Mar-10 19:48:25                    6
             80.20087123          13.09437811 08-Mar-10 19:58:24                    8
             80.20550609          13.09469998 08-Mar-10 20:03:25                    9
             80.20087123          13.09437811 08-Mar-10 20:08:24                   10
             80.20550609          13.09469998 08-Mar-10 20:13:24                   11
             80.20087123          13.09437811 08-Mar-10 20:18:37                   12
             80.20550609          13.09469998 08-Mar-10 20:58:24                   20
    9 rows selected.Max
    http://oracleitalia.wordpress.com

  • How to fetch the distict records from xcelsius excel column

    i have brought the datas from database using webservice
    from this data i want to fetch the distinct records in another column
    how to do this without using third party tool like "Centigon filtered summary"
    plz help me.
    Regards
    Ram.G
    Edited by: g.ram84 on Dec 1, 2009 6:57 AM

    Hi Ram,
    This can be achieved using functionalities within excel of the Xcelsius.
    Please try the steps below:
    1) From the excel menu choose Data | Filter | advaced Filter.
    2) choose your entire range.
    3) choose location to copy.
    4) choose Unique records only
    and only unique records will be copied.
    Hope this helps...
    Regards,
    Ankeet

  • Can not filter the data with the extended class

    Hi,
    I have a quick question about PortableObject format. I have created a class which extends PortableObject interface and implemented serializer methods as well. I have updated it in the pof-config.xml file as well. If I insert the objects of this type of object in the cache, they get inserted properly and I can filter the values based on the getters defined in the class. Everything works fine here.
    Now, I am trying to extend the existing class that I have. We have our custom API which we have built for our domain objects. I need to store these objects in the cache. So, naturally I need to implement PortableObject interface to do that. So, instead of creating a new class with new set of getters and setters and local fields, I am extending our domain class to create a new class which implements PortableObject interface. Instead of defining the local fields and getters and setters i am reusing the ones provided by my existing class. Now, I can insert the objects of the new class to the cache. But I can not filter the values for the objects of this new class.
    Let me show you what exactly I am trying to achieve by giving a small example:
    Domain Class:
    class Person
    private String person_name;
    *public String getPerson_name() {return person_name;}*
    *public String setPerson_name(person_name) {this.person_name = person_name;}*
    The new class implementing PortableObject interface:
    class ExtPerson extends Person implements PortableObject
    public static final PERSON_NAME = 0;
    *public void readExternal(PofReader reader) throws IOException{*
    setPerson_name(reader.readString(PERSON_NAME));
    *public void writeExternal(PofWriter writer) throws IOException{*
    writer.writeString(PERSON_NAME, getPerson_name());
    *// And HashCode, Equals and ToString methods, all implemented using the getter from the Person class*
    So, if I create a new class ExtPerson without extending the Person class and write all the methods, store the objects in the cache and perform the following query, I get the size printed
    System.out.println((cache.entrySet(new EqualsFilter("getPerson_name","ABC"))).size());
    But if I use the extended class and insert the values into the cache and if I use the same query to filter, I get 0 printed on the console.
    System.out.println((cache.entrySet(new EqualsFilter("getPerson_name","ABC"))).size());
    So, can anyone tell what exactly is causing this?
    Thanks!

    Well, just a quick question. It seems that I can not get ContainsAnyFilter or ContainsAllFilter working.
    EqualsFilter is actually working properly.
    I am preparing a Set of Strings and passing it to ContainsAnyFilter or ContainsAllFilter and it is returning me 0 records.
    E.g.:
    Set<String> setStr = new HashSet<String>();
    setStr.add("ABC");
    setStr.add("DEF");
    System.out.println((cache2.entrySet(new ContainsAnyFilter("getPerson_name", setStr))).size());
    I get 0 in my output
    If I try this:
    System.out.println((cache.entrySet(new EqualsFilter("getPerson_name","ABC"))).size());
    System.out.println((cache.entrySet(new EqualsFilter("getPerson_name","DEF"))).size());
    I get 1 for each of the query.
    If I club all these EqualsFilter in a Filter[] array and create an AnyFilter or AllFilter and pass it to the query, it works fine.
    List<Object> lst = new ArrayList<Object>();
              lst.add("ABC");
              lst.add("DEF");
    Filter[] filter = new Filter[lst.size()];
         for(int i=0;i<lst.size();i++)
              filter[i] = new EqualsFilter("getPerson_name",lst.get(i).toString());
    AnyFilter fil = new AnyFilter(filter);
    System.out.println((cache4.entrySet(fil)).size());
    I get the desired result here, which is 2.
    Am I missing something here?

  • To get the unique id of the selected row in a JTable as in Database

    Hi,
    After fetching the recodrs from the Database, I have displayed them in a JTable. Though I fetched all the columns from db, I am displying only only 2 columns, say Name and Number neither of which is unique, however I have a unique ID for each record in the db. Now when I select some row in the JTable, I need to know its unique ID (the one which is in the db) which i have not displayed in the JTable.
    Is there any API method that can store the unique ids of a table? Or how can this be done?
    Thanks in Advance.

    Although, if you don't want the Id visible in the table, then you need to remove its TableColumn from the TableColumnModel.
    Then when you want to reference the id you need to use:
    table.getModel.getValueAt(...);

  • How to get the last record??

    Hi, I now have to get only the last record from one table
    from MS Access.
    I was looking for the useful method from API, however,
    I cannot get it.
    How to get only the last record from one table ???
    Please help, thanks.

    In RDBMS, row order is really not relavent by iteself. Meaning there is no such thing as 'last record' unless it's in the context of a column (e.g. timeStamp).
    Of course, rows are inserted and stored in some natural order, but you cannot assume they'll come back the same way in a 'Select *' as they were entered.
    So, if you mean last row as in last inserted row, I would add a timestamp field that's set at insert, or use a autonumber column. Either way, have a column that will always contain the highest number or newest timestamp, and then you can build your where clause from that.
    For instance, in Access, I have an autonumbered field called 'fred', with other columns. If I want the last record, I simply use the following:
    select * from atable where fred in (SELECT max(fred) AS Max FROM atable);
    the 'where in' clause will filter to only those records in the subsequent select statment, which of course is only one, the max of the column fred.
    bRi

Maybe you are looking for

  • SAP HR-IN Form 16 Queries , Digital Signatures, SAP ADS

    Hi. I have a couple of queries with regard to Form 16. 1. My firm wants to use digital signature in the Form 16. How to configure the signature part of the Form16 in SAP? 2. Where is the purpose of SAP ADS in digital signature? 3. Do I need to get a

  • IOS7.0.2 bug???

    I updated to iOS 7.0.2. But I cannot use play/stop /like for music that on the lock screen. I cold do that before updating. This is very inconvenient.

  • How to use sampling procedure

    Hello Friends, I have to map the following scenario. Please advise the config & master data. 1) My sample size should change if my acceptance & rejecetion level changes. 2) If rejection increases then the sample size in the next lot should increase &

  • Web Service Consumption + SM59 ( HTTPS)

    Hello ABAP Gurus, I have issue to consume web service. I am trying to consume web service form external plm server. it has https protocol. For this i tried to create rfc type G for external server but I am wondering that what i need to know to create

  • BPS WIB - how to transport with correct URL in hyperlink

    Hi all, If I have a hyperlink in my BSP web interface (WIB for BPS)which references my BWD server, how do I make sure that when I transport to BWQ or BWP that the correct server address part of the URL is written in for the relevant system? Thanks, R