cancel
Showing results for 
Search instead for 
Did you mean: 

Using same Idoc type & Message type for 2 Interfaces

Former Member
0 Kudos

Hi all,

we have 2 interfaces which uses same Idoc type, message type & Partner No.Only Process code is going to different according to the posting logic.

How can we differentiate both while posting idocs to not mess up each other .

Regards

Accepted Solutions (0)

Answers (4)

Answers (4)

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

one possibility in in the message mapping validate the process code and complete the EDI_DC40 segment with the propers values. so in one scenario you determinate the receiver.

take alook to this blog: /people/michal.krawczyk2/blog/2005/09/01/xi-idoc-adapter--edidc40--demystified

http://help.sap.com/saphelp_nw04/helpdata/en/13/95244269625633e10000000a155106/content.htm

Edited by: Rodrigo Alejandro Pertierra on Sep 24, 2010 12:29 PM

VijayKonam
Active Contributor
0 Kudos

I guess you might not be able to use the same IDOC for two different interfaces in PI. PI would not allow two receiver deteminations for the same IDOC type. You would have build some logic in the PI mapping so that the target messages are created as needed.

VJ

Former Member
0 Kudos

Hi VJ,

Sender interface are different in both interfaces but uses same receiver interface as Idoc

Regards

Former Member
0 Kudos

Hi Vamsi,

when you have two sender interfaces,then i dont think it will be a problem.

Based on which sender interface is triggered, the corresponding mapping gets executed and send the data to the R/3 system.

u can use the same channel and also the same interafce in the receiver side.

Thanks,

Hemanth.

stefan_grube
Active Contributor
0 Kudos

> How can we differentiate both while posting idocs to not mess up each other .

What do you mean with "not mess up"?

Former Member
0 Kudos

Heloo Stefan

>>What do you mean with "not mess up"?

when we configure inbound partner profile in ECC with 2 entries, it will have same idoc type and message type. only difference is process code.How XI knows which interface has to execute correct one entry in the partner profile

RegardsI

Former Member
0 Kudos

Is it inbound or outbound with respect to R3. If inbound to R3 then you can configure your partner profiles accordingly. You can use different Message Functions there in your partner profile.

Former Member
0 Kudos

Sarvesh,

it is Inbound to SAP, i have thought to use Message code option in partner profile and assign the same at mapping level control record also.

apart from this, is it required to mention this message code inside process code--function module or any where else???

Regards

former_member206760
Active Contributor
0 Kudos

Hi Vamsi,

Do u really require 2 process codes in this case???

u can have one process code and in the posting FM ..depending on whether the data is coming from interface1 or 2 you can change logic inside the FM...

Former Member
0 Kudos

Hi all,

Say example:

Interface 1 is invoice coming from legacy system to SAP and i have to use AAA.BBB Idoc

Interfaces 2 is accrual coming from legacy system to SAP and i have to use AAA.BBB Idoc

So i am creating partner No with LS_LEGACY and with 2 inbound entries one for each.

Even though i am using the same Idoc types but inside those the process codes are different because they are different in posting logic.

Issue:

From XI perspective i can't differentiate them saying like Invoice interface should execute the entry in the partner profile with invoice process code and accrual interface with accrual process code.

My Idea is to design like this...

Using the Message Code option, While creating partner profile give the MESCODE and in Mapping provide the same MESCODE.

So that even thought i am using the same partner No with same message type & basis types for 2 scenarios, the right interface will trigger the right process code based on the MESCODE mentioned in mapping by carrying the control record values

Please let me know ur views

Regards

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

as i sugguest before,you can define the IDoc for two diferents profiles. once you define it, you can dynamic define the IDoc destination configuring the EDI_DC40 sengment in the message mapping. by this way you use the same IDoc and MT for 2 interfaces. plase refer to my previous post-

also i found additional information:

2. How do I use 'Apply Control Record Values from Payload' parameter with the IDOC adapter?

See notes:

a) 728792 - how the fields in the control record get set.

b) 792333 for an overview of how to convert partners in the IDoc adapter.

http://help.sap.com/saphelp_nw04/helpdata/en/13/95244269625633e10000000a155106/content.htm

Edited by: Rodrigo Alejandro Pertierra on Sep 27, 2010 11:13 AM