cancel
Showing results for 
Search instead for 
Did you mean: 

Duplicate values in message mapping

Former Member
0 Kudos

Hi Guys,

I have IDoc to file scenario and source IDoc have two same fields from two different segments but target there is only one field to send to. What is the best way and how to map two source fields to one target field by removing duplicate values from source fields? Can this be done with graphical mapping or need UDF?

Source:
<E1EDP01 SEGMENT="">
    <MATNR>12345</MATNR>
     </E1EDP01>
<E1EDL44 SEGMENT="">
<MATNR>12345</MATNR>
</E1EDL44>

Target:
<Material>12345</Material>

Thanks,

Marko

Accepted Solutions (1)

Accepted Solutions (1)

former_member184720
Active Contributor
0 Kudos

Hi Marko - How are you creating the target root element.. one for each E1EDL44 ?

If so to remove the duplicates  try the below mapping.

MATNR (E1EDL44 ) -> remove contexts ->sort -> split by value (value changed) ->collapse context -> split by value(for each value) - target field

if there would be only one material always, then it doesn't matter which one you map.

Former Member
0 Kudos


Hello,

I am getting MATNR from each of E1EDP01 and E1EDL44 and sometimes they are same values so I need to remove if any duplicate values coming and only pass single value to target material field. I will need to map MATNR to both E1EDP01 and E1EDL44 and filter either by queue or context. I had seen above mapping but could not think of using it for two source fields.

Thanks,

Marko

former_member184720
Active Contributor
0 Kudos

Hi Mark - it is a bit unclear on the target structure.

Can you please share the sample source xml and expected output?

If you just want to remove duplicates(MATNR) then above mapping should work. Did you try..

Answers (1)

Answers (1)

0 Kudos

Dear Marko P

Validate your specification ... since the E1EDL44-MATNR segment (Handling Unit Item) field can be different from E1EDP01-MATNR (Item General Data), you should check with consultant SAP which position the delivery to be mapped. Based on this definition should apply the mapping.

regards

Juan