cancel
Showing results for 
Search instead for 
Did you mean: 

Choose interface mapping based on flag

Former Member
0 Kudos

Hello!

How can I configure the following for a System_A (IDoc) -> XI -> (IDoc) System_B scenario?

If System_A sends an X flag in the payload the X_Interface_Mapping needs to be executed, otherwise the Y_Interface_Mapping needs to be executed.

Regards, Tanja

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Tanja,

this is possible.:)

In interface determination, you can put same recvr interface (your inboun idoc) twice with different mappings against these and you can put the condition to select the one you want.

its like

interface A cond flag = X intf map A

interface A cond flag = Y intf map B

If you need any more input from my side, please let me know.:)

Regards

Pushkar

stefan_grube
Active Contributor
0 Kudos

I am not sure if that works, but it is worth to give a try.

I have tested a different scenario: A message should be doubled and posted with the same interface type but different mappings. Here I received an error message that a message split is not allowed with the same interface.

But here the scenario is different, as only one of the mappings will be used. So this might work.

Regards

Stefan

henrique_pinto
Active Contributor
0 Kudos

pushkar,

you're right, you can enter the same target interface more than 1 time in the interface determination list. For each one, you could enter different mappings and different conditions.

Regards,

Henrique.

Former Member
0 Kudos

Hello Pushkar!

Thanks, this was very helpful. This was exactly what I needed and I was not aware of this feature until now.

Regards, Tanja

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Tanja,

I guess your querry has been resolved.. kindly mark this thread complete.

If you need any more help , please let me know..

n dont miss my SDN Points.

Regards

Pushkar

stefan_grube
Active Contributor
0 Kudos

It is not possible to have the same receiver and the same interface.

So you have to create a virtual receiver with same connection data.

When you have an IDoc receiver, you need a header mapping for applying the original receiver again.

Regards

Stefan

Former Member
0 Kudos

Hello!

I was thinking about this before but was not sure if this will work for an IDoc receiver. So I can generate a dummy business service for system B and then create an additional receiver determination object and interface determination object for it?

And then I use XPath and send the message either to the existing system B which checks for flag X and uses X_Interface_Mapping or to the new dummy system B which checks for flag Y and uses Y_Interface Mapping?

Regards, Tanja

stefan_grube
Active Contributor
0 Kudos

I have not tested this so far, but I do not see a reason why this should not work besides there is much effort to create all the business systems and channels pointing to the system when you have multiple mappings.

If this would not be IDocs you could use dummy interface names, that would be easier.

Regards

Stefan

justin_santhanam
Active Contributor
0 Kudos

Tanja,

Are you using BPM? Because the mapping part itself has to be decided on the payload.

Best Regards,

raj.

Former Member
0 Kudos

Hi Raj!

I forgot to mention that we do not use using BPM in this scenario. Is there a solution without BPM?

Regards, Tanja

henrique_pinto
Active Contributor
0 Kudos

Unfortunatelly, there is no way of doing this in standard. It'd be necessary a conditional mapping selection inside the interface mapping (if <condition> use this mapping program sequence) like you have inside receiver and interface determination.

briefly: you have interface determination but not interface mapping determination.

A possible workaround would be to create different dummy message interfaces refering to the same message type, and then you create a mapping for each of the dummy target interfaces in order to select them with condition inside interface determination.

Or you could burn some brain cells and implement the conditional logic inside the mapping program itself. It is the right thing to do in this case (since you have same source and target structures, you implement conditional checks in the mapping logic itself).

Regards,

Henrique.

Former Member
0 Kudos

Hello!

> A possible workaround would be to create different dummy message interfaces

> refering to the same message type, and then you create a mapping for each of the

> dummy target interfaces in order to select them with condition inside interface

> determination.

In this IDoc scenario no message interfaces are used but only the ORDERS05 IDoc.

> Or you could burn some brain cells and implement the conditional logic inside the

> mapping program itself.

From design perspective I'd prefer to have the two mappings totally separated rather than trying to mix everything together and cover the requirements for the X and Y mapping in the same graphical message mapping.

Regards, Tanja