Help required on mapping to remove duplicate entries

Hi all experts,
I need some help in mapping. I am new to this tool. How would I remove duplicate entries in source payload? My structure is as follows
Message Structure
<List> 1-1
<ParentNode> 0-unbounded
<Child1> 0-1
<Child2> 0-1
Source:
<List>
     <ParentNode>
          <Child1>PK1</Child1>
          <Child2>SomeValue1</Child2>
     </ParentNode>
     <ParentNode>
          <Child1>PK1</Child1>
          <Child2>SomeValue1</Child2>
     </ParentNode>
     <ParentNode>
          <Child1>PK2</Child1>
          <Child2>SomeValue2</Child2>
     </ParentNode>
</List>
Target I would like:
<List>
     <ParentNode>
          <Child1>PK1</Child1>
          <Child2>SomeValue1</Child2>
     </ParentNode>     
     <ParentNode>
          <Child1>PK2</Child1>
          <Child2>SomeValue2</Child2>
     </ParentNode>
</List>
Any help?
Thanks so much all

Hi,
Please note that in my reply I asked you to map ParentNode with <Child1> Please see the below.
<Child1>-->RemoveContext Node function>Split by Value(set the property as on value change)->CollapseContext---<ParentNode>
Secondly: introduce split by value(for each value ) after collapse context for child1 and child2. as shown below.
<Child1>-->RemoveContext Node function>Split by Value(set the property as on value change)->CollapseContext>Split by value(for each value)----</Child1>
<Child2>-->RemoveContext Node function>Split by Value(set the property as on value change)->CollapseContext>Split by value(for each value)----</Child2>
it will surely work,

Similar Messages

  • Remove duplicate entries from dropdownlist in web dynpro abap

    How to remove duplicate entries from dropdownlist in web dynpro abap? Can someone please help me
    I have maintained the data in the z table wherein the records of particular fields are repeated but when i show that record in the Web Dynpro application dropdown list, the user should only be able to view the unique data for selection of that particular field.

    Hi,
    try this code in init method.
    use the
    Delete adjacent duplicates.
    <set the table>
    select <f1>  from <table> into TABLE <Itab> whre <condition>.
       DELETE ADJACENT DUPLICATES FROM <Itab> COMPARING <f1>.
         lo_nd_vbap->bind_table( new_items = <itab> set_initial_elements = abap_true ).

  • TS4062 how do i remove duplicate entries from my phone directory?

    question; how do i remove duplicate entries from my phone directory?

    go to your contacts icon and choose the one you want to delate
    Choose edit, top right and go (scroll) to the bottom of the page and press delete contact

  • Trick to remove duplicate entries from tables ?

    hi.
    i have 53tables which are having duplicate entries and names of all 53 tables r listed in top_t table ?
    can any1 provide me solution to show and if possible ask for remove of those duplicates entries from each table if required ?
    daily i am removing duplicates manually ....its too tedious now !
    can any1 help me out ?

    Well, I suppose if the duplication is such that
    SELECT DISTINCT * FROM tablename;gives you the required result, then you could have a procedure that made a copy of the table, deleted/truncated the original, then inserted the distinct values back into it.
    In 10g you could even use flashback to avoid the temp copy - but it also means you can't use TRUNCATE so whether it's any more efficient I'm not sure. But just for fun and since it's urgent:
    CREATE OR REPLACE PROCEDURE dedupe_table
        ( p_table_name user_tables.table_name%TYPE )
    IS
        k_start_timestamp TIMESTAMP := SYSTIMESTAMP;
    BEGIN
        SAVEPOINT start_of_dedupe;
        BEGIN
            EXECUTE IMMEDIATE 'DELETE ' || p_table_name;
        EXCEPTION
            WHEN OTHERS THEN
                ROLLBACK TO start_of_dedupe;
                RAISE_APPLICATION_ERROR
                ( -20000
                , 'Error deleting ' || UPPER(p_table_name) ||
                   CHR(10) || DBMS_UTILITY.FORMAT_ERROR_BACKTRACE
                , TRUE );
        END;
        BEGIN
            EXECUTE IMMEDIATE
            'INSERT INTO ' || p_table_name ||
            ' SELECT DISTINCT * FROM ' || p_table_name || ' AS OF TIMESTAMP :b1'
            USING k_start_timestamp;
        EXCEPTION
            WHEN OTHERS THEN
                ROLLBACK TO start_of_dedupe;
                RAISE_APPLICATION_ERROR
                ( -20000
                , 'Error repopulating ' || UPPER(p_table_name) ||
                   CHR(10) || DBMS_UTILITY.FORMAT_ERROR_BACKTRACE
                , TRUE );
        END;
    END dedupe_table;
    SQL> select * from wr_test;
          COL1 C C
             1 A B
             1 A B
             2 C D
             2 C D
    4 rows selected.
    SQL> BEGIN
      2      dedupe_table('WR_TEST');
      3  END;
      4  /
    PL/SQL procedure successfully completed.
    SQL> select * from wr_test;
          COL1 C C
             1 A B
             2 C D
    2 rows selected.I make no claims for robustness, efficiency or human safety.
    Edited by: William Robertson on Sep 24, 2009 7:12 PM

  • How to remove duplicate entries in OID due to an AD-OID bootstrap

    Don't worry about the "why" but there were changes made to the mapping file for an AD-OID synch and dipassistant commands mp and bootstrap run and now there are some duplicate entries for users in OID. The only difference between the duplicates for each of those user (besides the creation/modify timestamps) is their ORCLGUID. Their orclobjectsid, orclobjectguid, dn, uid, etc. are the same. Also, our OID is used for SSO to an oracle portal. So ... is there any way to programmtically get rid of the duplicates or do I have to manually go through and delete. And if manually, which one of the two should be removed? The one created first or last?
    You'll have to excuse myself and my co-workers 'cause we're still newbies when it comes to OID. :-)

    Found an easier way to delete my unwanted users ... Softerra LDAP Administrator 3.5. :-)
    After I did the deletes, we implemented a new mapping file (see my post at Changing Domain Rules in mapping file for Active Directory-OID synch ) and ran bootstrap. Now I just have to update the GUID and DN in portal.wwsec_person$ with the new orclguid and dn from OID for each affected user.

  • Remove duplicate entry from table

    Hello all,
    In my one table
    File Stage log (File_Stage_Log_ID int identity(1,1),File ID int ,Quarter_Date nvarchar(50),StageID int )
    have done duplicate entry by mistake on similar quarter_date 
    something like ..
    FILE_ID
    Quarter
    FILE_STAGE_LOG_ID
    STAGE_ID
    22401
    Dec-13
    233091
    450
    22401
    Dec-13
    244116
    420
    22401
    Mar-14
    233095
    450
    22401
    Mar-14
    237478
    405
    22401
    Jun-14
    237479
    405
    22401
    Jun-14
    233099
    450
    22401
    Sep-14
    233102
    450
    22401
    Sep-14
    237480
    405
    22401
    Dec-14
    237481
    405
    22401
    Dec-14
    227275
    420
    there are too many files which have the same duplicacy ..
    now , above you can see that dec -13 quarter coming twice for a single file 
    tell me the way to delete one entry from the table for a files 
    so that i have output at the end like ...
    FILE_ID
    Quarter
    FILE_STAGE_LOG_ID
    STAGE_ID
    22401
    Dec-13
    233091
    450
    22401
    Mar-14
    233095
    450
    22401
    Jun-14
    237479
    405
    22401
    Sep-14
    233102
    450
    22401
    Dec-14
    237481
    405
    Please help me with easiest possible way ..
    Dilip Patil..

    How do you determine which one out of duplicate to be kept? As per output it doesnt follow any pattern
    so it may be this
    --DELETE t
    SELECT *
    FROM
    SELECT ROW_NUMBER() OVER (PARTITION BY FILE_ID,Quarter_Date ORDER BY FILE_ID) AS Rn,*
    FROM FileStageLog
    )t
    WHERE Rn >1
    Run the select above to see records to be removed and once happy uncomment the delete, comment the select * and run the query to do the delete
    If it doesnt give expected records, explain on what basis you want to identify records to be deleted
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • How to remove duplicate entries from Settings General iTunes Wi-Fi Sync?

    On my iPhone under Settings > General > iTunes Wi-Fi Sync there is a duplicate entry for my Mac. One is active, the other one shows options greyed out, as if it can't see the Mac on the network (although it's the same name). Is there a way to manually remove that entry from the iPhone?
    I am running iOS 7.0.4, and OS X 10.9.1, iTunes 11.1.3 on the Mac.

    iPhone 3G doesn't support Wi-Fi sync or IOS 5.1.1. You have to connect to iTunes using the dock connector to sync.
    Unless you have a iPhone 3GS or jailbroken.

  • How do I remove duplicate entries in my Contact List?

    I imported my contact list from MS Outlook, but for some reason there are many duplicate entries in Thunderbird.

    This add on claims to do what you want. I have never used it so I cannot comment on if it works.
    https://addons.mozilla.org/en-US/thunderbird/addon/duplicate-contact-manager/?src=ss

  • Table Search Help to Remove Duplicate Entry

    Hi All Tha ABAP GURUS,
    I have created 2 tables say A with fields main description and sub decription and another table B in which there are these 2 fields with other fields. I want to display search help for Table B for fields main description and sub decription separately and I have done the same by creating Elementary Search Help (ZDS and ZDM resp.) . For sub description it is working fine and for main description it is displaying value but duplicate. How to remove these duplicate values.
    For Eg Values are
    Main Desc   Sub Desc
    1                   A
    1                   B
    1                   C
    2                   D
    2                   E
    In my case it is showing
    1
    1
    1
    2
    2
    but I want
    1
    2
    I want to achieve this without creating any ZProg. Can I use search help exit.Kindly guide me in this matter how to use it.
    Thanks & Regards,
    Bharti Jain

    Yes you can delete duplicates in a search help exit, but not without "without creating any ZProg" as you will create a Function Module (and Group)
    Duplicate the sample FM F4IF_SHLP_EXIT_EXAMPLE in a customer function group, and delete duplicate records of RECORD_TAB in the step 'DISP' (executed before display).
    You could also perform the select yourself adding a DISTINCT option to the statement in the 'SELECT' step but this will take more time to develop, as you must read the other parameters to use selections provided by user or program.
    Regards
    Raymond,

  • Mapping issue - Remove Duplicates

    Hello,
    I want to remove the duplicate nodes. Below is the issue:
    Input Structure:
    MainNode   0..n
    --SubNode  0..n
    key
    Val
    Output Structure:
    MainNode 0..n
    --Subnode 0..n
    key
    Val
    Now the example input:
    <MainNode>
    <subnode>
    <key> 1001 </key>
    <val< 1 </Val>
    </Subnode>
    <subnode>
    <key> 1002 </key>
    <val> 2 </val>
    </subnode>
    <subnode>
    <key> 1001 </key>
    <val> 1 </val>
    </subnode>
    Output should be:
    <MainNode>
    <Subnode>
    <key> 1001 </key>
    <val> 1 </val>
    </subnode>
    <subnode>
    <key> 1002 </key>
    <val> 2 </val>
    </subnode>
    i.e., it should remove the duplicate keys.
    I tried as below, but doesnot work:
    key --> removeContext --> Merge userdefinded function -->Subnode
    Merge:
    public void merge(String[] key, ResultList result, Container container) {
    HashSet hs = new HashSet();
    for(int i = 0; i < a.length; i++) {
        hs.add(a<i>);       
    Iterator it = hs.iterator();
    while(it.hasNext()) {
        String val = it.next().toString();
        result.addValue(val);
        result.addContextChange();
    Any other solution?

    Hi laxmi,
      First try to sort those values by Key using Sort and collapse context so that when sorted all the similar elments group together then apply collapse context so that only the first repetition (1001) will be considered .Then use split by value (on change) and map .Try to think to do using predefined function SORT.
    http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/content.htm
    Thanks,
    Ram.

  • Help required in mapping Materials , Quotation and Sales order

    Hi,
    We need your help for the following requirement
    There is a vehicle model and colours for these models
    Company gets sales plan from dealers for vehicle model and later dealer confrms  the PO Qty with model and required colour.
    I need to map this in SAP.
    I am proposing to create a Quotation for the sales plan from dealers with vehicle model and when company recieves PO , they will create Sales order with reference to Quotation.
    The challenge i need to get all the colours ( finished materials ) for that model, currenttly all models and finished materials are managed in product heirarchy.
    When i create order with reference to quotation..........the dealer should able to get the list of colours ( materials ) in the system for that model ( i am planning to create material masters for these models as well)....Please help me how to map this in SAP SD
    i am just guessing if higher level item category concept can help .......or please suggest feasible solution
    When he creates sales order with reference to quotation, instead of model ( mateial ) from the qtn ..........dealer should get the list of end prodcuts ( colours ) for the model in the sales order so that he chooses the required colour and saves SO.
    Actually this is a portal driven project and SO creation is also integrated inthe portal for the dealers.
    Regards
    Venkata Rama Reddy

    Hi there,
    You said that the sales order process is done through the portal through the dealers?  We are currently looking at a similar requirement from a customer perspective to create an online store sort of feel integrating the S/D module.
    Can you share any ideas, things you did for portal integration?  Web Dyn Pro application, Visual Composer, gave portal access to the dealers to S/D transactions?
    Thanks for any input you can give!
    Jonathan

  • Help Required COMPLEX  MAPPING !!!!! POINTS WILL BE GIVEN !!

    Hii I am doing a file sender config and my message is something like this
    C1TN4028260000PP345700210 2620582 005 0000000000000072020061802 000000000000000000
    C2TN402826000000001037331742557076 0000071641086338975600000110230000394007
    C3TN4028260000000010000071641086338975600097BP 0005 00000000030000000000
    here the C1, C2, C3 are unbounded it is explained below
    This is only a part of the Payload............
    my Datatype format is
    OCCURANCES
    <Data_DT>
    <Record> 1
    <Header> 0..1
    There are many fields....
    </Header>
    <Control_1> 0...unbounded, this is the C1 record
    There are many fields....
    </Control_1>
    <Control_2> 0...unbounded, this is the C2 record
    There are many fields....
    </Control_2>
    <Control_3> 0...unbounded, this is the C3 record
    There are many fields....
    </Control_3>
    <Line> 0..1
    There are many fields....
    </Line>
    </Record>
    Only write E1EDL37 segment if subsequent "C3" record contains C3_Data(This is one of the fields in Segment Control_3) > 0.  If C2_Num = C3_Num, then only one E1EDL37 segment needs to be written for this "C2" record.  If C2_NUM <> C3_NUM, then one E1EDL37 segment has to be written for the C2 record and one has to be written for the C3_NUM for the C3 record.  In this case one E1EDL44 segment must be written with each unique C2_NUM.
    This is a standard Idoc,
    Part of the structure,
    E1EDL37   unbounded
           E1EDL44   unbounded, its in item level of E1EDL37

    Hai,
      <b>Only write E1EDL37 segment if subsequent "C3" record contains C3_Data(This is one of the fields in Segment Control_3) > 0.</b>
      In message mapping  choose <u><b>arithematic options</b></u> like if-else and compare ur data record with the condition and do mapping accordingly.
    <b>If C2_Num = C3_Num, then only one E1EDL37 segment needs to be written for this "C2" record.</b>
      Take if-else operator in  Graphical mapping and compare both C2_NUM and C3_NUM and if true map C2_Num to E1EDL37.
    <b> If C2_NUM <> C3_NUM, then one E1EDL37 segment has to be written for the C2 record and one has to be written for the C3_NUM for the C3 record. In this case one E1EDL44 segment must be written with each unique C2_NUM.</b>
      check for condition C2_NUM <> C3_NUM using if-else operator and if true map corresponding C2 record to E1EDL37  and if false map corresponding C3_NUM to required segment.
      To write E1EDL44 segment for unique C2_NUM....check the flds of C2 record with each other for uniqueness and map the corresponding unique C2_NUM to each E1EDL44.
    I hope this will help u to get through ur mapping.
    Cheers,
    Prasanthi.

  • How to Remove duplicate entries in address book

    After syncing with iCloud (three computers and a phone) suddenly I am seeing multiple entries for the same contact in the address book and multiple entries in the calendars for the same event.  Can anyone suggest how to stop this and how to delete the multiple entries without having to manually delete each item?  The new Address book does noit seem to have a list view that shows the entire address book 9only shows addresses with two or three alphabets...
    Is there a setting to prevent this from happening?  I had similar experiences with the old Mobile.me and was hoping the problem had been fixed.
    The value of iCloud is lessened when these issues crop up and there seems to be no defined method to fix the problem.  I see numerous entries on the Support Community boards with the same problem.
    Any suggestions?  Thank you.

    Hi,
    Take a look at Address Book Account Basics (with iCloud). and Duplicate address Book entries.
    I too had the same issue and this helped solve it.
    Hope this helps.

  • Remove duplicate entry in list component

    I have a list component which loads xml into it. I have
    multiple entries in the list that are the same and i want to remove
    the duplicates. if anyone has an idea or hint it would be
    appreciated.
    Thanks

    "Rain1522" <[email protected]> wrote in
    message
    news:ebamrt$s5h$[email protected]..
    >I have a list component which loads xml into it. I have
    multiple entries in
    >the
    > list that are the same and i want to remove the
    duplicates. if anyone has
    > an
    > idea or hint it would be appreciated.
    >
    > Thanks
    >
    > function loadGulf(){
    > import mx.xpath.XPathAPI;
    > var cityXml:XML = new XML();
    > cityXml.ignoreWhite = true;
    > cityXml.onLoad = function(success:Boolean) {
    > trace("onload...");
    > if (success) {
    > trace("success...");
    > // Retrieve all Cities notes within /document/City.
    > var thePath_str:String = "/document/City"; // path of
    nodes
    > var plan_array:Array =
    XPathAPI.selectNodeList(this.firstChild,
    > thePath_str);
    > for (var i:Number = 0; i < plan_array.length; i++) {
    > var planArray = plan_array
    .firstChild.nodeValue;
    >
    > function checkMatch(compare:String) {
    > for(j=0;j<myList.length;j++){
    > if (myList.getItemAt(j).label==compare){
    > return true;
    > }
    > }
    > }
    >
    if(checkMatch(plan_array.firstChild.nodeValue)!=true){
    > myList.addItem(plan_array
    .firstChild.nodeValue);
    > }
    >
    > }
    > } else {
    > trace("error loading XML");
    > }
    > };
    > cityXml.load("new.xml");
    > }
    > loadGulf();
    >
    I have a book with a function for quick searching arrays, but
    it is at work.
    If not answered by tomorrow morning then I will try to
    remember to post a
    solution.

  • Help required in mapping MM pricing

    PO should have conditions for
        freight
        Insurance
        bank charges
    all paid to the vendor who is supplying goods.
    These prices will have to be loaded on materials on GR.
    2.
    PO should not have any values against the conditions as mentioned above as he will not be paid for that.
    When goods arrive, these charges are paid by local clearing agent or agents.
    He will be paid accordingly based on the invoice he sends.
    These costs also should be booked on material upon GR.
    The local vendor or vendors does the clearing of goods at the port and for that he/they charge company and sends invoices.
    Company wants to track these expenses per vendor and also wants different GL accounts for each type of conditions(heads of expenses these vendor/s charges in their invoice such as port charges, clearing charges,insurance charges,bank charges,freight where original supplier do not charge for these costs to the company)
    Importantly,all these costs also have to be loaded on material .How this will be done ?
    Consider also the case where you raised the PO with only conditions such as insurance and bank charges included in the PO and rest of the charges as mentioned above are borned by local vendor for clearing goods.
    Now when I do the goods receipt the value will only get updated by the quantity*rate basis in mat master.
    How can we load the values incurred for clearing the goods at the time of GR then ?
    example: PO qty:100 @rate 10/ea
    GR:  Stock with MAP updated say as 10(no invoice yet from original supplier and also from the local clearing vendor)
    Now these goods are transferred to other plant vide say STO or plant to plant transfer.
    This material will also get updated with MAP as 10.
    Now after couple of days the local vendor invoice comes and he is paid actually for the charges he claimed and also comes in the invoice of original goods supplier.
    When these invoices will be posted how these costs will be added to the material ?
    Can any one please suggest the best possible solution ASAP as am left with no time here.
    Regards,
    Manoj

    Hi,
    Your requirement is very common across all manufacturing comapanies.
    1)Create seperate condition types for freight, insurance and bank charges with condition category as "B - Delivery costs"
    2) flag the "accruals" check box. 
    3) Select the appropriate value for "Vendor in GR" field as per your requirement. 
    4) Insert these condition types in the calculation schema as per the requirement
    5) Assign an accrual key.  If the amount to be posted to different accounts, use different accrual keys.
    6) maintain the "Actual Value" ( a sort of total of all conditon types used in the schema) in the schema such that it includes the values of above condtion types.  Check value "S" is assigned in the "sub totals" field for "Actual Value" (if you are following standard JRM000, just insert your condition types before the "actual value" level)
    Now your schema is ready.  Since the values of freight, insurance and bank charges are included in "actual value", always the material will be loaded with this value at the time of GR. 
    Usually vendor code will be defaulted in the vendor field of the above condtion types.  You can change the same at the time of PO creation by selecting the condition type and clicking on details icon. 
    You can post the vendor invoice for base value and taxes using the variant
    "goods/service items" and post the other charges to different vendor account using "planned delivery costs" variant.  if there are any differences between the planned value in the PO and actual invoice receipt, those are automatically adjusted.
    If you require any further clarifications plz revert back
    regards,
    Mallik

Maybe you are looking for

  • Report to extract the total Amount that we spent for materials

    Hi Guru's, I was trying to find a report that gives all the following information by Company Code. Out put should have the following fields: 1)Vendor Name, 2) Vendor Number, 3)Company Code, 4) Payment Terms Code From Vendor Master, 5) Payment Terms D

  • How to make file associations in XFCE permanent

    Hi, I have a problem with file associations in XFCE (Thunar, actually), because I can't make it permanent. After setting up, they work fine, but they change to default values after some time. Anyone with same problem?:|

  • Can PE9 burn Blu-ray files to DVD?

    I do not have a Blu-ray burner and do not anticipate getting one for a year or two.  I was not able to burn or copy Blu-ray files in PE7 and ask if it can be done in PE9.  I did download the trial version of Sony Vegas HD Movie Studio Suite and was a

  • UEFI Bios for Pavilion a6750t?

    Hi, I have a Pavilion a6750t with Windows 7 64-bit.  I am trying to use a 3TB hard drive for my main drive.  I seem to need GPT partitioning with UEFI bios to use all 3TB as my C drive.  Does that sound right?  Right now, it is recognizing about 2TB

  • Offset feature not creating clean lines when repeating pattern/image

    Using PSE11, I have been working at several repeating patterns using the offset feature, but am having a problem with images not having a clean seam when connecting different layers to create the pattern.  Any recommendations? Thanks. Here's a screen