cancel
Showing results for 
Search instead for 
Did you mean: 

Run Time Message Mapping error

Former Member
0 Kudos

Hello Experts,

I am working on JDBC to IDOC scenario. I am getting mapping error at SXMB_MONI and the error message is as below:

com.sap.aii.mappingtool.tf7.IllegalInstanceException: Cannot create target element /ZABCD01. Values missing in queue context. Target XSD requires a value for this element, but the target-field mapping does not create one. Check whether the XML instance is valid for the source XSD, and whether the target-field mapping fulfils the requirement of the target XSD at and so on.....

I tested in Message Mapping by entering the values and I am able to see the target structure with out any Mapping errors..

But when JDBC real time it got Runtime mapping error as above:

Source

tablename.Set -


1.1

row--


0.Unbound

-


a----


0.1

-


b----


0.1

Target

ZABCD01-----1.1

IDOC--


1.1

-Begin-----Required

XYZ--


0.1

-


a----


0.1

-


b----


0.1

Dont know where is the problem is: I tried with payload its giving the same error as runtime....

Payload looks as :

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

- <set>

- <row>

<a>value</a>

<b>value</b>

</row>

</set>

Can any one faced same issue?

Thanks

Rajeev

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Rajeev,

Did you give any condition for /ZABCD01. It says some error over here.

Are you just opening the message in sxmb_moni before message processing and on the source right click ---> view source --> and testing the payload directly or are you making changes. Try to put as it is.

Regards,

---Satish

Former Member
0 Kudos

Hi Satish,

If I copy and past the payload of SXMB_MONI in to Message Mapping test tab I am getting the same error:

Now I am testing with that payload data in MM Test tab : I treid not to map root node /ZABCD01 and also IDOC but still getting the same error..

Cannot create target element /ZABCD01/IDOC. Values missing in queue context. Target XSD requires a value for this element, but the target-field mapping does not create one. Check whether the XML instance is valid for the source XSD, and whether the target-field mapping fulfils the requirement of the target XSD

Edited by: rajeev raj on Aug 25, 2009 5:16 PM

Edited by: rajeev raj on Aug 25, 2009 5:17 PM

Former Member
0 Kudos

Rajeev,

The idoc occurrence from waht you have given is 1..1. So thats why you are getting the error now.

Map with constant(withspace) and see what it gives. I feel you are doing somethign wrong there.

Regards,

---Satish

Former Member
0 Kudos

Satish,

If I map IDOC and root node as well to Constant then I am unable to get fields or segments under IDOC.

Dont know where the problem is...

Former Member
0 Kudos

Rajeev,

It might be the problem with your test message only then.

Try to map according to the payload from moni. Also verify the test message has the same structure as the source structure.

Regards,

---Satish

Former Member
0 Kudos

I imported the structure from jdbc database table itself so its External defination..

Former Member
0 Kudos

Rajeev,

There might be some mismatch between the external definition and the data how it is coming in moni. Please check both of them are having the same strcture.

Else can you put your xsd and sample payload here, so that somebody can help you out here.

Regards,

---Satish

Former Member
0 Kudos

I imported the structure from jdbc database table itself so its External defination..

More over satish when I test in the MM Test tab with out SXMB_MONI payload I see the strucutre as

<TableName set>

....<row>

.....a

.....b

all are in green

when I use sxmb_moni payload then I see

<set>

...<row>

......a

......b

all are in RED..

is there any thing missing?

Former Member
0 Kudos

Rajeev,

So there is a mismatch between the incoming payload and the xsd. Change the strcuture accordingly (edit the schema according to the payload in altova xm spy).

Regards,

---Satish

Former Member
0 Kudos

HI Satish,

I created a new Datatype and tested wtih payload still the same..I am unable to create target node as IDOC segment is 0..unbound and below all fields are not not creating stilll they are mapped to source fileds.. what would be the reason?

IDOC structure is:

ZIDOC........................1....1

...IDOC........................1....1

.....BEGIN.....................Requied (I disabled this filed)

.....SEGMENT1.............1....1

.....SEGMENT2..............0...1

.........SUBSEGMENT1...0...99

..............FIELD1.............0....1

..............FIELD2..............0...1

..............FIELD3..............0...1

..........SUBSEGMENT2....0...1

..............FIELD4..............0...1

..............FIELD5..............0...1

JDBC strucute is

MT_XYZ

....set.................1...1

.....row...............0...unbound

......field1............0...1

......field2............0...1

......field3............0...1

......field4............0...1

I am not mapping all fields to respective fileds of source to target ...if I dont map ZIDOC and IDOC then mapping executing successful but I am not getting SUBSEGMENT1 and SUBSEGMENT2 with there fields values..

If I do test by entering values manually it populate all fields values with subsegments but when i copy the payload from SXMB_MONI then I am getting error and If I remove target node mappings I am unable to get subsegment and fileds populated..

How can I make FIELDS of IDOC to get populated??

Thanks

Rajeev

Edited by: rajeev raj on Aug 25, 2009 9:26 PM

Former Member
0 Kudos

Hi,

In addition, I would like to add that you make sure there is no case mismatch between your data type and the payload because even though you give the same tag names but if they differ in case then also you will not be able to get you results. Just check it in your Message Mapping under test tab by putting payload data and if they are red then there is a mismatch else ok.

Regards,

Sarvesh

Former Member
0 Kudos

HI,

The difference between the pay load and the MM test tab source code is :

MM Test tab Source code:

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

<ns0:MT_ABC xmlns:ns0="http://sap.com/xyz/ttt">

<resultset>

<row>

<Filed1/>

<Filed2/>

</row>

</resultset>

</ns0:MT_ABC>

Payload is:

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

- <resultset>

- <row>

<Field1>value</Field1>

<Fileld2>Value2</Field2>

</row>

</resultset>

Why I see <ns0:MT_ABC xmlns:ns0="http://sap.com/xyz/ttt"> and </ns0:MT_ABC> at the end of code? I even created a data type instaed of using External defination but still the same problem.. and the nodes and fileds are in red......... any light on this issue?

Thanks

Rajeev

Former Member
0 Kudos

Ok rajeev. got it. Go to sender message type and under XML namesapce whatever it is delete it and activate. Then you should hv same payload.

Regards,

---Satish

Former Member
0 Kudos

Actually this difference is the main problem. You shoud get MT_ABC tag in your payload.

Former Member
0 Kudos

What Rajiev has said is also one of the solution but I have a feeling that you have not mentioned the "Document Name" as MT_ABC in your sender CC under Processing Parameters Settings. Also provide the Document Namespace. So chek and if you have not provide these details then just add them and activate your channel again and then test it end to end.

So once you maintain these parameters in your sender CC then your missing tags will come in your source payload.

Former Member
0 Kudos

Its an External Defination so I cant edit...

In CC I mentioned document Name as resultset .... what would be name space? urn:sap.com:jdbcAdapter??

I made changes in CC and I am able to get rid of mapping error but now I got one more error:

Unable to convert the sender service xxx to an ALE Logical System

Now the MM Test tab source code and payload differe as:

Source code:

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

<ns0:Tablename.resultSet xmlns:ns0="urn:sap.com:jdbcAdapter">

<row>

<Field1/>

<Field2/>

</row>

</ns0:Tablename.resultSet>

PayLoad

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

- <ns:Tablename.resultSet xmlns:ns="urn:sap.com:jdbcAdapter">

- <row>

<Field1>Value</Filed1>

<Field2>Value</Field2>

</row>

</ns:Tablename.resultSet>

Why the difference is ns0 ???

Thanks

Rajeev

Edited by: rajeev raj on Aug 25, 2009 11:47 PM

Edited by: rajeev raj on Aug 26, 2009 12:05 AM

Former Member
0 Kudos

Use the same namespace under which you have created your data type and message type.

Former Member
0 Kudos

Its an external defination

Former Member
0 Kudos

>

> Its an external defination

Ok it is an external definition but it will be in some namespace, corrct. So use the same namespace in you sender CC.

Answers (0)