cancel
Showing results for 
Search instead for 
Did you mean: 

Single IDOC to Multiple Interface Mapping

Former Member
0 Kudos

We have a requirement in our project where one masterdata IDOC will be sent from a SAP MDM box and will be transformed to a target IDOC and be sent to an SAP SNC box. However, the scenario is that depending on the contents of the IDOC, there can be multiple IDOCs that need to be created. For example, the single MDM IDOC has V1, V2 and V3 values then the IDOCS that should be sent to the SAP SNC box should be three.

The IT head of the customer decided against using Enhanced Interface Determination (since the problem can be easily solved using a 1:n mapping) due to the complexity especially when the solution is rolled out to other regions as each region has it's own logic (currently, the other implementation has only 1:1 mapping so there is no problem). I had developed a 1:n mapping but the resulting map is too big and very complex.

What I tried to do is to create separate mappings for each scenario that an IDOC needs to be generated out of the values from the received IDOC in XI and then define rules in the Interface Determination. Problem is that XI throws an error stating that multiple interfaces are found. So I cannot use Interface Determination to trigger creation of multiple IDOCS of the same type with different values from a single IDOC sent by the same SAP box.

Question is, is there any way to solve this requirement without using Enhanced Receiver Determination. I was thinking of BPM but not really sure how to do it.

Thanks in advance!

Best Regards,

Rommel Mendoza

Hewlett Packard Asia-Pacific, Ltd.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi,

What I tried to do is to create separate mappings for each scenario that an IDOC needs to be generated out of the values from the received IDOC in XI and then define rules in the Interface Determination. Problem is that XI throws an error stating that multiple interfaces are found. So I cannot use Interface Determination to trigger creation of multiple IDOCS of the same type with different values from a single IDOC sent by the same SAP box.

Based on above statement i think you know how many IDoc needs to be generated. for eg: if you created 3 mappings that means you need 3 Messages to be generated with different values.

In Message Mapping right click the mouse on IDOC node and copy it as many times you want (as many number of MM u created) and do your mapping with conditions on each idoc when to generate.

Regards,

Sukarna

Former Member
0 Kudos

Hi Sukarna,

Yep I tried that as well however, the problem is that the customer wants to separate the logic of the previous implementation which is 1:1 mapping compared to a 1:n mapping. The problems lies in Interface Determination as a 1:n interface mapping cannot be added to a Standard Interface Mapping as it expects 1:1 result. Wouldn't duplicating the IDOC node result to a 1:n result? If I used Enhanced Interface Determination, I have to introduce the previous logic which will not meet the customers criteria of the customer to separate the logic.

Former Member
0 Kudos

Wouldn't duplicating the IDOC node result to a 1:n result?

Nope, if we place the condition on IDOC node, it will create an idoc based on your condition, or else it will not generate an idoc itself.

there is no need to do any enhanced interface determination. because the condition will be checked in the MM itself.

if this didn't clarify you questions, please give me your source and target message samples (just 2 or 3 fields) with the conditions you want to check on the fields. i will try to explain :).

Regards,

Sukarna.ch

Former Member
0 Kudos

Thanks a lot for that.

For example, We have this input Message:

<ZMATMA>

<IDOC>

<E1MARAM>

<E1MARMM>

<MEINH>IT</MEINH>

</E1MARMM>

<E1MARMM>

<MEINH>CS</MEINH>

</E1MARMM>

<E1MARMM>

<MEINH>SW</MEINH>

</E1MARMM>

</E1MARAM>

</IDOC>

</ZMATMA>

then there should be an output of:

<SAVEMULTIPLE204>

<IDOC>

<BUOM>IT</BUOM>

</IDOC>

</SAVEMULTIPLE204>

<SAVEMULTIPLE204>

<IDOC>

<BUOM>CS</BUOM>

</IDOC>

</SAVEMULTIPLE204>

<SAVEMULTIPLE204>

<IDOC>

<BUOM>SW</BUOM>

</IDOC>

</SAVEMULTIPLE204>

The logic is when the MEINH field of the ZMATMA02 IDOC has the values: IT, CS and SW, create one IDOC for each.

Thanks in advance!

Edited by: Rommel Mendoza on Nov 6, 2008 7:30 PM

Former Member
0 Kudos

map <MEINH> to target <SAVEMULTIPLE204> with a remove context function, it will generate the required output.

Regards,

Sukarna

Former Member
0 Kudos

change <MEINH> context to header node node i.e ZMATMA.

Edited by: Chirumamilla Sukarna on Nov 6, 2008 7:35 PM

Former Member
0 Kudos

Problem is that the SAVEMULTIPLE204 is the root node and cannot be duplicated.

Former Member
0 Kudos

<SAVEMULTIPLE204>

<IDOC>

<BUOM>IT</BUOM>

</IDOC>

</SAVEMULTIPLE204>

<SAVEMULTIPLE204>

<IDOC>

<BUOM>CS</BUOM>

</IDOC>

</SAVEMULTIPLE204>

<SAVEMULTIPLE204>

<IDOC>

<BUOM>SW</BUOM>

</IDOC>

</SAVEMULTIPLE204>

if you want this output, then u shd duplicate it.

if you want the output like below

<SAVEMULTIPLE204>

<IDOC>

<BUOM>IT</BUOM>

</IDOC>

<IDOC>

<BUOM>CS</BUOM>

</IDOC>

<IDOC>

<BUOM>SW</BUOM>

</IDOC>

</SAVEMULTIPLE204>

then do the before said mapping to <IDOC> node.

Regards,

sukarna

Former Member
0 Kudos

Thank you very much. It worked wonderfully. Thanks again!

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Rommel,

Not sure if this answers your question.

You can set a field in the input IDOC whose value can be used to determine, who will be the receiver.

create one single map and in that map, check for this field and apply the appropriate mapping rule for target.

Thanks

-Kulwant