cancel
Showing results for 
Search instead for 
Did you mean: 

Message Split: File to Multiple IDOC Types

Former Member
0 Kudos

Hi,

I'm attempting to perform a multi-mapping using BPM where I have File -> XI -> IDOC.

The result will be 3 DIFFERENT IDOC types, but depending on the payload of the file, not all will be created. I have followed the steps in this weblog: https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2748. [original link is broken] [original link is broken] [original link is broken] [original link is broken]

This works fine as long as all 3 messages are being created, however if only 2 of 3 IDOCs are to be created, I receive an error in the PE.

I have set the occurances of the target messages as 0...1 in the Message and Interface Mappings.

Any ideas would be greatly appreciated.

Accepted Solutions (1)

Accepted Solutions (1)

bhavesh_kantilal
Active Contributor
0 Kudos

><i>This works fine as long as all 3 messages are being created, however if only 2 of 3 IDOCs are to be created, I receive an error in the PE.</i>

Just noticed this

The reason is when you have a 1:N mapping inside the BPM, all messages need to be compulsorily be created. If you have 3 messages in the target side all 3 messages / idoc's need to be created as the output of your multimapping.

As a workaround, if the condition which you want to check does not exist and you do not want the idoc to be created, in the mappingcreate the idoc, use some dummy flag and then use a switch in the BPm to decide if the idoc is to be sent to the target system or not.

Regards

Bhavesh

Former Member
0 Kudos

Thanks Bhavesh, good idea using a dummy flag to determine whether or not to send the IDoc.

I think I will attempt to avoid using BPM and just use the multiple Interfaces and Mappings, as mentioned a couple of times.

Thanks again all.

bhavesh_kantilal
Active Contributor
0 Kudos

Michael,

Both these soltutions have their pro's and cons.

With multiple mapping programs you have multiple failure points but with a BPM you have the perfromance overhead issue.

The choice has to be taken after deciding which of these would be a better way to go ahead.

Regards

Bhavesh

Answers (3)

Answers (3)

bhavesh_kantilal
Active Contributor
0 Kudos

As the Idoc is in the Inound Side, multi mapping will not work.

Mutlimapping works only for Adapter on the J2Ee engine as the actual message split happens in the J2EE engine.

As the idoc adapter runs on the ABAP stack, the multimapping will not work with idoc's on the inbound side.

Regards

Bhavesh

Former Member
0 Kudos

Thanks Bhavesh. It was my understanding that message splits for IDOCs could be achieved as long as BPM was used, but this must be incorrect.

Also, how would you explain the fact that it does work as long as all messages are present?

bhavesh_kantilal
Active Contributor
0 Kudos

oops.. I thought you were looking at the MultiMappingwithout BPM blog .

My answer was with reference to multi mapping without BPM.In your case, with a BPM it should work.

Also, if the only reason you are using a BPM is to achieve this multimapping can I suggest another solution?

Have multiple Inbound Interfaces in Integration Directory and one mapping for one Idoc.

Regards

Bhavesh

Former Member
0 Kudos

Thanks Bhavesh. I'd rather not have to redo my mapping, but if I can't get a solution to my initial problem, I'll attempt creating an Interface and Mapping for each IDoc

Former Member
0 Kudos

HI,

In your scenario,

in message mappign change the messge root node occurrences as 0..unbound / 0..1 .

and if the condition is not satisfied to create the message in target side suppress it

to do this you need to use in UDF ResultList.SUPPRESS and map to the target message root node.

also

see the below links

/people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible

/people/sudharshan.aravamudan/blog/2005/12/01/illustration-of-multi-mapping-and-message-split-using-bpm-in-sap-exchange-infrastructure

Regards

Chilla

Former Member
0 Kudos

Thanks Chandra, how can the occurances be changed for the message root node?

The Messages tab allows me to change the occurances of each IDOC, but not the root node (i.e. 'Message1', 'Message2', 'Message3')

I'm using the createIf function to assign ResultList.SUPPRESS to the node below (e.g. INVOIC02) as this has an occurance of 0...1.

Former Member
0 Kudos

HI,

No need of BPM, you can achieve this without also.

See the change the message level occurrences at root node got to message tab and chenge the occurrence , similarly, in interface mapping also.

use this in determination this interface mapping. You will get exact soution.

Regards

Chilla

Former Member
0 Kudos

Chandra, please see my previous reply to your post. The root node occurances can not be changed in the Messages tab.

Former Member
0 Kudos

Hi,

Oh, Correct , you are not able to change the idoc occurrences, yes , i got it,

in this case you have an option have multiple Interface mapping and respective message mappings, mension this on determination .

This can be aciveved with BPM also , here also you have to maitain the saparate MM,Im and route accordingly , or based on context / or conditional routing also.

also we can achieve this with XSLT see the below link may be useful..

/people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping

Regards

Chilla

Former Member
0 Kudos

test ur mapping in the graphical editor itself...and see if its working,

Former Member
0 Kudos

Yes, the mapping is successful in both instances.

Where there are only 2 messages being created, the 'Message3' node is produced without any child elements.