cancel
Showing results for 
Search instead for 
Did you mean: 

Doubt with MultiMapping

Former Member
0 Kudos

Hey guys

i m doin a multimapping scenario but getting some errors.its for test purposes so my source and target structures both are same .

i m taking help from the followin the following blog

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

My source structure is

<?xml version="1.0" encoding="UTF-8"?>

<ns:MT_file_file xmlns:ns="http://tb1.com">

<Test>Test</Test>

</ns:MT_file_file>

and on the receiver side i have repeated this structure twice i.e. under the message tab i added the same structure again entry under Target message ,so i have Message1 and Message2 on target side and Message 1 on sender side.den i did the mapping and when i test my mapping under the test tab,i dont see the <Test>.....</Test> element getting generated.the structure i get ove thr is

<?xml version="1.0" encoding="UTF-8"?>

<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">

<ns0:Message1 />

<ns0:Message2 />

</ns0:Messages>

and in the bottom it says "Compilation of Mapping successful"

and idea why my target structure is wrong.

i m on SP9

thanx

ahmad

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Ahmad -

On the test tab, there's a little wand icon for "Generate Instance". Use this and populate your <Test> field with a value. If you look at your test source, it should look something like:

<?xml version="1.0" encoding="UTF-8"?>

<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">

<ns0:Message1>

<ns:MT_file_file xmlns:ns="http://tb1.com">

<Test>Test</Test>

</ns:MT_file_file>

</ns0:Message1>

</ns0:Messages>

If this is how you have it, then the only other thing might be that you're not mapping to the <i><ns:MT_file_file xmlns:ns="http://tb1.com"></i> node on the target side, especially if you set the occurence to 0..1. If it's 1..1, then that node should automatically come without a mapping.

Regards,

Jin

Former Member
0 Kudos

hey

yeah its working fine now,i jst had to click on Generate Instance and it started working fine,but when i used to do 1-1 mapping i didnt had to click on Generate Instance.i only had to click on execute,why do i have to generate instance in this case

thanx

ahmad

Former Member
0 Kudos

Hi Ahmad -

<i>Generate Instance</i> only refers to your test source in the test tab. It's always a good way to check what the test source and actual message at runtime should look like since it's based on your source Message Type. Especially when you have namespace concerns, you can use it to see what the mapping actually expects for a source.

In the multi-mapping case, the main difference are those Messages/Message1... tags used in multi-mapping. Not exactly sure why it didn't work for you without using the generated instance, but apparently something was off. I can assure you it will come in handy for some of your 1-1 mappings as well.

Regards,

Jin

Answers (0)