cancel
Showing results for 
Search instead for 
Did you mean: 

Duplicate check while mapping

Murali_Shanmu
Active Contributor
0 Kudos

Hello,

I have a source message with 2 fields headerID and DetailID.

The target is an IDoc structure with below snippet.

Segment E1E337

     HeaderID

      Sub-Segment E1E440

          DetailID

HeaderID and DetailID in the IDoc segments are mapped to the sources structure fields accordingly.

When there are 6 messages, I am able to see an IDoc with 6 E1E337 segments. This works fine.


I need to insert the following logic:

Check and create the segment E1E337 as long as the values of HeaderID and DetailID are unique. There should not be two E1E337 segments which have the same value for HeaderID and DetailID.

I think this needs a UDF. Can someone assist as to how this needs to be done.

Thanks,

Murali

Accepted Solutions (1)

Accepted Solutions (1)

markangelo_dihiansan
Active Contributor
0 Kudos

Hi,


I need to insert the following logic:

Check and create the segment E1E337 as long as the values of HeaderID and DetailID are unique. There should not be two E1E337 segments which have the same value for HeaderID and DetailID.

This can be achieved using the following logic: Concat HeaderID and DetailID and then use removeContext -> sort:ascending -> splitByValue:ValueChanged -> collapseContext -> E1E337.

Regards,

Mark

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi ,

Use the below logic

Regards

Venkat