cancel
Showing results for 
Search instead for 
Did you mean: 

help with FormatByExample

Former Member
0 Kudos

Target structure..

Multimapping:

messages

Messages1

+root1

+root2

+root3

++sourcefield>formatByValue>targetField

+root4

I have a scenario where I am generating the root2 out of the MM. root3 where I have used FormatByExample is not existing at all during MM.

Now I am getting following error message.

The message is: Exception:[com.sap.aii.mappingtool.tf3.IllegalInstanceException: Function formatByExample: Queues have not equal number of values.] in class com.sap.aii.mappingtool.flib3.NodeFunctions method formatByExample[com.sap.aii.mappingtool.flib3.Plainer@5b507b29, ] com.sap.aii.mappingtool.tf3.MessageMappingException: Runtime exception during processing target field mapping

This looks strange to me.

Why does it generate error mesg at root3 for root2 node, when the root node of root3 is existing at all?

FYI, the FormatByExample here did not have a equal contexts and is expected.

Venkat.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Venkat,

Please check your queues context and they both should be equal where ever you have used the function. A simple example you can see here:

http://www.sap technical.com/Tutorials/XI/NodeFunctions/Page7.htm

Regards,

---Satish

Former Member
0 Kudos

Satish,

Both the Queues are not equal.

in my MM im not generating the root3 node ( which has formatByValue) but I am generating a target root2 node which do not have any formatByExample used.

The error says that queues are not equal in root3. But I am not generating them at all. they are my next messages under multi mapping.

I had already created this MM and I know how it works in normal scenarios, what surprises me is why is it showing error for a node that is not generating?

Venkat.

Former Member
0 Kudos

Venkat,

Try to disable root3 segment itself and then give a try and see you have the same error or not.

Regards,

---Satish

Former Member
0 Kudos

I had tried that.

It is working if I disable root3 or remove formatByExample from the mapping of root3.

You know what this is true for useOneAsMany. I had this problem with useOneAsMany some time back which I fixed by using a simple mapping with If-Then-Else.

Now this ... is there any other altenate to use some mix of standard functions to achieve formatByExample functionality?

Else I will raise a mesg with SAP.

Thanks,

Venkat.

Former Member
0 Kudos

Hi Venkat,

If you diasable root3 it is working.

If you enable root3 and if you remove formatbyexample it is working.

If you enable root3 and if you put formatbyexample it is not working. So you have the issue over there and as you already said the queues ar not equal near that function. So you need to make the queues equal and then only it works. I am not sure of your mapping why you are using this function, so I cannot comment. Before raising oss make sure you check all the possibilities.

Regards,

---Satish

Former Member
0 Kudos

Hi,

Please clearly specify what is you source and target structure. what maaping logic are you useing then only we will be able to help you.

Shweta.

Former Member
0 Kudos

Well,

I fixed this issue by including one more if condition.

I am still confused as why is it referring to error on root3 when root3 is not getting generated at all

Answers (0)