cancel
Showing results for 
Search instead for 
Did you mean: 

IDoc -> IDoc interfacing with multiple mappings

Former Member
0 Kudos

Hi,

We want to use two different mappings for the same IDoc interface (based on a condition). So we use the ORDERS idoc for a sales scenario and also for a purchase scenario. The sending service is the same for both ORDERS messages, lets call it service SEND. Furthermore, for both ORDERS messages, the receiving service is also the same lets call it RECV.

The problem is that we want to use a different mapping for the ORDERS sales scenario as for the ORDERS purchase scenario. The sending and receiving interface in both cases is the same.

The receiver determination and interface/mapping determination is a problem in this case.

One way to solve this is to use a party, but in the configuration of the party you can only use the same sending logical system name ONCE. So party A cannot have the same logical system name (SEND) as party B (SEND) for scheme ALE#LS.

Another way would be to use different services, one for the first scenario and mapping and one for the second. Again the problem is that you need to enter adapter settings for both services (RECV1 and RECV2), but a logical system name can only be used in ONE service. If you want to assgin it to a second service, this is not allowed.

Does anybody have a solution for this?

thanks !

Accepted Solutions (1)

Accepted Solutions (1)

MichalKrawczyk
Active Contributor
0 Kudos

Hi Alexander,

why don't you try doing it in one BPM?

something like this:

one sender

one receiver

2 mapping programs

<b>Receive step</b> -> <b>Swich Step</b> - if PO go to <b>Transformation step</b> one (mapping 1), else go to <b>Transformation step</b> two (mapping for the SO) - <b>Send Step</b>?

you can base you swith step on E1EDK14 segment qualifier = 013

(As far as I remamber only Purches orders have it)

but check it:)

BTW

if you use the Swith Step you probably want to use a Transformation step before the Swith step (mapping from ORDERS to dummy message with one TAG - indication if this is PO or SO based on content of the ORDERS) this way the swich step will work for sure

Regards,

michal

Message was edited by: Michal Krawczyk

Former Member
0 Kudos

True Michal,

BPM was/is an option I also had in mind (and you mentioned it before in one of the forum topics), but I was thinking if there was a more "standard" way of doing this, instead of using a BPM ?

thanks for your answer!

Answers (4)

Answers (4)

Former Member
0 Kudos

If the graphical mapping is not sufficient you can also think about using XSL or Java mapping

Former Member
0 Kudos

Thanks Theo for your input.

Former Member
0 Kudos

Hi Alex,

You can create two different business services as middle dummy services, and assign different mappings to each service. Then direct the messages (or IDOC in your case) back to the target system.

Hope this resolves the problem.

Regards,

Hart

Former Member
0 Kudos

Hi Alexander,

my answer was a bit too quick. It am used to using muliple DIFFERENT inbound interfaces.

You are right duplicate inbound interfaces is not allowed. On help.sap.com (patch 12) it says:

In the Display/Edit Interface Determination editor, enter the assignment between the outbound interface and the inbound interface(s) in a table. Each table line represents <b>exactly one assignment</b> between the outbound interface and an inbound interface.

I think BPM is the best solution. But take into account it is consuming more resources during runtime.

How different are your mappings ??

Isn't it a possibility to do all in one mapping and then use 'if then else'

Former Member
0 Kudos

Hi Alexander,

I agree with Udo.

In the configuration directory go to the interface determination.

Normally only 1 interface is defined there. (configured inbound interfaces).

When you add a second one in the bottom screen (second one can be the same as the first) an extra column will appear. This is the column where you can call the condition editor.

And then based on the condition use 1 map or the other.

Former Member
0 Kudos

Udo and Theo,

We have tried this as well (this would be the standard solution I was using the first time) but when we use the SAME IDOC twice in this screen (and of course they have the same namespace) the error is:

Check Result for Object | SENDER | ORDRSP.ORDERS04 | CCS_DEOT01010 IDoc PORDCR1.PORDCR101 | urn:sap-com:document:sap:idoc:messages occurs more than once as inbound interface in Interface-Ermittlung | CSC_NLTDEV033 | ORDRSP.ORDERS04 | | CCS_DEOT01010

So WE are NOT allowed to use the same interface TWICE.

We are on patch level 9. Does this have anything to do with our problem ?

udo_martens
Active Contributor
0 Kudos

Hi Alexander,

for the receiver determination you can use a X-Path condition concerning the payload. This is as well possible in the interface determination to use another mapping.

Regards,

Udo