cancel
Showing results for 
Search instead for 
Did you mean: 

Interface-Mapping: Multiple IDocs to one target interface

Former Member
0 Kudos

Hi, well i have four IDoc form my client which i will map to a flat-file.

The IDoc-Structure of each of these IDocs are the same and the target file is also looking the same.

Now i thought to do it kind of generic, just one target DT, MT, MI and finally one message mapping and one Interface Mapping.

In the IM i put all four IDocs as Outgoing Interfaces and as target just the one i created. XI reads the the interface properly but when i try to test the IM i get error because IM only supports one pair of interfaces.

Does somebody has a clue how to solve my approach?! (Michal?)

br Jens

Accepted Solutions (1)

Accepted Solutions (1)

former_member184619
Active Contributor
0 Kudos

Hi Jens,

Chk this link

/people/pooja.pandey/blog/2005/07/27/idocs-multiple-types-collection-in-bpm

Sachin

Former Member
0 Kudos

> Hi Jens,

>

> Chk this link

>

> https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/

> 2034

>

> Sachin

Found this link earlier - but its not working for me!

@Bhavesh

Ok, well i'd like to do it in n:1 yes - and i wanted to avoid this overhead in MM, IM and in ID. But i think i have to walk this way!

thx Jens

bhavesh_kantilal
Active Contributor
0 Kudos

> Ok, well i'd like to do it in n:1 yes - and i wanted

> to avoid this overhead in MM, IM and in ID. But i

> think i have to walk this way!

Better than a BPM for sure

Regards

Bhavesh

Former Member
0 Kudos

Bhavesh, i am back again.

Well as u suggested i realized everything.

Now i am stuck in ID because:

i have similar IDocs, different just in their names. because of these names there should be different output-files like a.txt or b.txt for ZIDOC_A, ZIDOC_B e.g.

I configured different Scenarios for each incoming IDoc in ID but in receiver-agreement i have the problem that this is always the same for each Scenario but i am not able to change the CC (FTP receiver) in the receiver-agreement.

how can i solve this?!

br Jens

justin_santhanam
Active Contributor
0 Kudos

Jens,

You can create one more reciever and create separate comm.channel , hope this will solve your problem.

Best regards,

raj.

Former Member
0 Kudos

> Jens,

>

> You can create one more reciever and create separate

> comm.channel , hope this will solve your problem.

>

>

> Best regards,

> raj.

Yes, i had similar idea. I generated a Business Service and try to use this but now there is the problem that i am not able to chose the Inbound-Interface in the Interface Determination.

any idea?!

justin_santhanam
Active Contributor
0 Kudos

Jens,

Add the Inbound interface to the business service.

Best regards,

raj.

Former Member
0 Kudos

Raj, well done, thx for the hint.

How simple to solve!

br Jens

justin_santhanam
Active Contributor
0 Kudos

Jens,

Good to hear, that solved your problem.

Best regards,

raj.

Former Member
0 Kudos

Hi Jens,

see i suggest a workaround for your problem : send idocs from R/3 after collecting it........so r/3 will output the bundled idocs in a file after collecting the idocs.......so ZIDOC_A, ZIDOC_B etc will be collected in files ZIDOC_A_File.xml, ZIDOC_B_File.xml etc .............

now in ID have four sender file adapters to send these four types of idocs in file format..........now in IR, after importing all the idocs........you have to change the xsd of idoc and import it as an external definition.........and then create 4 outbound msg interface having as msg type their external definitions......now for generic struc create one more msg interface having any one xsd......create 4 interface mapping in which you take each source idoc and map to a general structure - which will be a one-to-one mapping...........then map this general struc to the target struc in a msg mapping..........in ID you will have total 5 reciver determinations - one for that you will have target msg interface to generic msg interface and interface determination of the last msg mapping which i said above and a receiver file adapter to output target file......beside this you will have 4 recever determination of 4 idoc to generic structure and these will have no recever agreement...............

Since you have only one recever file adapter, you have to dynamically generate filename, for it in ID check the adapter specific msg attributes -> filename, in IR the 4 msg mappings of idoc to genric struc, take any target node of generic struc and in its mapping create a UDF and in it create filename like a.txt, b.txt etc for output file by dynamic configuration.........

In this way i think you can configure your scenario without using BPM.......

Thanks,

Rajeev Gupta

Former Member
0 Kudos

Hi Rajeev, sounds good to me. I guess i will try to use ur approach. Really appreciate your help!

br Jens

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

I would do 1 idoc a time and appending the file till you have reached 4, that's it.

But I don't know how it is functionally ofcourse.

regards,

Job

bhavesh_kantilal
Active Contributor
0 Kudos

Jens,

As your Source Idoc is different , you cannot follow the approach you are trying.

You can use the Same Inbound Interface , Message Type for the File, but you will need to to have separate Message Mappings and Interface Mappings and separate Configurations For the same in the ID.

What you are currently attempting is a N:1 scenario and if you want to use one mapping etc you would need to use a BPM which I am sure you dont want to.

Regards

Bhavesh