on 08-25-2009 4:07 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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?
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
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
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
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.
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
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.