cancel
Showing results for 
Search instead for 
Did you mean: 

One IDOC to multiple XML messages

Former Member
0 Kudos

Hi! I am using the graphical mapper in XI to map the SHPMNT03 IDOC to an XML message. The IDOC has a shipment node and potentially multiple delivery nodes, for example:

E1EDT20

- E1EDL20

- E1EDL20

- E1EDL20

I need to create one XML message per E1EDL20 node. I figured I could do this in the mapper but when I execute the map for an IDOC with multiple E1EDL20 nodes, I get a 'Cannot cast 2 to boolean' error. The map executes fine when there is a single E1EDL20 in the IDOC.

As always, help is very much appreciated and points awarded.

Thx, Duncan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi all, One smalll question.

Will Multimapping in this case be not helpful?

-Naveen.

Former Member
0 Kudos

hi Naveen. I think this moves me in the right direction. If I understand correctly, in the message mapping I set the source - in my case IDOC - as Occurence = 1 and the receiver - - in my case XML - to Occurence = 0..unbounded. I then build the map. I can get this and the map to work in test. My next question is how to use that at runtime. When the IDOC is sent to XI, I won't have the Message-Message1 structure that the multimap creates in the message mapping. Do I need to use BPM? Thx, Duncan

Former Member
0 Kudos

Hi Duncan,

If your system is running on SP14 or higher, you can do this 1:N message split w/o BPM. For more info..look at http://help.sap.com/saphelp_nw04s/helpdata/en/42/f3b31d48fb1bc8e10000000a11466f/content.htm

Otherwise, you have to use BPM.

praveen

Former Member
0 Kudos

all... thanhe for the advice. got this working. learned about multimapping and that it cannot be done in the IDOC adapter 😃

Former Member
0 Kudos

Hi Duncan,

I dint get u. Plz elaborate 'it cannot be done in IDOC adapter'. Multimapping in adapter??

praveen

Former Member
0 Kudos

Hi Praveen

I read blog - /people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible - plus the SAP help on multimapping. Both indicate that the message splitting in done in the adapter engine, therefore an IDOC sender interface cannot do this as it resides in the integration engine. My solution is a little messy but works, as follows:

1) IDOC adapter to bring IDOC into XI

2) Pass IDOC through - no mapping - and out to a file adapter

3) Use second file adapter to bring the IDOC back in as a file

4) Run the file through the multi mapper

5) Send out the result of the multimap

If you know of a more elegant way - without BPM - then let me know. Thanks! Duncan

bhavesh_kantilal
Active Contributor
0 Kudos

hi Duncan,

Multimapping will not work if the IDOC adapter is on the receiver side or if you are trying to pist mutliple IDOCs.

But, <b>if you are trying an IDOC to FILE scenario, then MUTLIMAPPING will work, as the FILE adapter resides in the ADAPTER engine and there is no SENDER adapter needed for the IDOCs.</b>

No sender agreement and no sender adapter is needed when you are trying to post IDOs from an R3 system and so, as you are trying to push the data into a file , Mutlimapping will work in your case.

Do let me know if I have misunderstood your requirements,

Regards,

Bhavesh

Former Member
0 Kudos

Hi Bhavesh

Now you have grabbed my attention. I tried to set up IDOC to FILE with multimapping but get the following error:

<i><b>Messages in multi message format can be sent to one adapter engine only</b></i>

As you say, I don't need or have sender agreement or sender adapter for the IDOC coming into XI. I have a receiver and interface determination set up to take the IDOC, run it through the multimap and pass it to a receiver agreement that drops the files out to the filesystem. But I get the error above.

Any ideas?

Thx, Duncan

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Duncan,

Can you just check if this is what you have done,

IR

1. Message Mapping -- Occurence of the Destination message type ( file ) is unbounded

2. Interface Mapping -- Occurence of the Destination Interface ( File ) is unbounded

ID

1. No sender communication channel , sender agreement

2. Receiver communcation channel for FIle with appropriate FILE CONSTRUCTION MODE

3. Receiver Determination and Interface Determination with Sender Interface as the IDOC interface and Receiver Interface as the FILE INTERFACE.

I think there is some misunderstanding on this front.

Multimapping will work if you are trying to do an IDOC to FILE with a 1:N split

just check this and let me know if you ve missed something.

Regards,

Bhavesh

Former Member
0 Kudos

Hi Bhavesh

Thanks for the quick response. I must be getting old 'cos I went back through the integration scenario and have it working now. As you say, multimapping with IDOC to file works well. Thanks a million for your input.

Cheers

Duncan

bhavesh_kantilal
Active Contributor
0 Kudos

Hi duncan,

Nice to know it worked

Regards,

Bhavesh

Former Member
0 Kudos

points awarded. thanks again!

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

The error looks more like a data type error to me.

Make sure that the E1EDL20 header and its fields have the correct data type.

Are you using any user defined function anywhere else in the mapping? If so, recheck to see if you have wrongly assigned a numeric value, to boolean.

Also make sure that the header E1EDT20 is of occurance 1..1 and E1EDL20 is 0 to unbounded.

Regards,

Smitha.

Former Member
0 Kudos

Hi,

It seems that it is data type problem, try to create data type same as IDoc and try that will solve your problem.

Thanks,

Prateek

moorthy
Active Contributor
0 Kudos

Hi,

If your target structure is similar like Idoc ( but Flat - not nested), then map node to node.

Do you want to generate multiple Files for each message ?

If so , you can do this with the help of BPM using Correlation concept.

/people/sravya.talanki2/blog/2005/08/24/do-you-like-to-understand-147correlation148-in-xi

Hope this helps.

Regards,

Moorthy