cancel
Showing results for 
Search instead for 
Did you mean: 

Filter duplicate values in Mapping

markbernabe
Active Participant
0 Kudos

Hi,

Is it possible to check if the value that will be assigned to a target field has been mapped/assigned or existing already?

Say I have this source:

<root>

     <object

          <custID>1234</custID>

     </object

     <object>

          <custID>1234</custID>

     </object>

     <object>

          <custID>5678</custID>

     </object>

</root>

The target structure is the same as the source. However, I need to filter duplicate values. So my target should look like this:

<root>

     <object

          <custID>1234</custID>

     </object

     <object

          <custID>5678</custID>

     </object>

</roo>

Is there a way to achieve this in graphical mapping?

Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

markbernabe
Active Participant
0 Kudos

Hi,

Sorry, but this should be the correct structure.

And the target should be like this. So basically, the duplicate nodes should be suppressed

Muniyappan
Active Contributor
0 Kudos

Hi,

check this.

http://scn.sap.com/thread/3190674

Regards,

Muniyappan.

markbernabe
Active Participant
0 Kudos

Thanks Muni and to everyone! Special mention to Grzegorz Glowacki

Answers (4)

Answers (4)

Muniyappan
Active Contributor
0 Kudos

Hi,

check this.

mapping

results

Regards,

Muniyappan.

markbernabe
Active Participant
0 Kudos

Hi Muniyappan,

This is almost working. Only the unique custIDs are mapped. However, the other data linked to the custID like address, age are not getting mapped correctly.

iaki_vila
Active Contributor
0 Kudos

Hi Mark,

Try this:

Regards.

Message was edited by: Iñaki Vila

naveen_chichili
Active Contributor
0 Kudos

Hi Mark,

Check if format by example might work for your requirement.

Thanks and Regards,

Naveen

former_member190624
Active Contributor
0 Kudos

Hi Mark,

Yes you can , Use Sort function and split by value (value change ) functions to achieve this

Thanks

Hari.

markbernabe
Active Participant
0 Kudos

Hi Hari,

Thanks! I tried this, used Sort then Split by Value ( value change) then Collapse Context. It worked except for 1 test case

<root>

     <object>

          <custID>1234</custID>

     </object>

     <object> 

          <custID>1234</custID>

     </object>

     <object>

          <custID>5789></custID>

     </object>

</root>

    

But the result I got is this

<root>

     <object>

          <custID>1234</custID>

     </object>

     <object> 

          <custID>1234</custID>

     </object>

</root>

Did I miss anything?

former_member190624
Active Contributor
0 Kudos

Hi Mark,

I missed remove context . Inaki vila already provided you correct answer.

Thanks

Hari.