on 07-29-2006 9:29 PM
Hi,
i am executing Text file 2 XML..
i am getting this error, in I.R, when i am trying to execute with XML file generated from SXMB_MONI.
Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XML Declaration not allowed here.(:main:, row:1, col:8)
the XML File is
<?xml version="1.0" encoding="utf-8" ?>
- <ns:MT_Out_Orders xmlns:ns="URN://Text">
- <Recordset>
- <Orders>
<OrderNo>1211</OrderNo>
<Item>Monitor</Item>
<Qty>5</Qty>
<Price>1200</Price>
</Orders>
+ <Orders>
<OrderNo>1213</OrderNo>
<Item>Mouse</Item>
<Qty>40</Qty>
<Price>10</Price>
</Orders>
- <Orders>
<OrderNo>1214</OrderNo>
<Item>Headphone</Item>
<Qty>90</Qty>
<Price>7</Price>
</Orders>
</Recordset>
</ns:MT_Out_Orders>
-
my incoming Datatype is like this
DT_Out_Orders
Orders
OrderNo
Item
Qty
Price
my Sender Adapter (File)
Document Name MT_Out_Orders
Document Namespace URN://Text
Document Offset 0
Recordset Name
Recordset Structure Order,*
Recordsets per Message *
Orders.fieldNames OrderNo,Item,Qty,Price
Orders.fieldSeparator ,
Orders.endSeparator 'nl'
Orders.processConfiguration FromConfiguration
Any sugg?
Thanks
Seshu
Hi Seshu,
I do not know of any other way to do this, except by using a BPM.
For BPM configuration, take a look at this..
http://help.sap.com/saphelp_nw2004s/helpdata/en/3c/831620a4f1044dba38b370f77835cc/frameset.htm
On this page, go through the tree structure on the left side of the screen. You have many examples of BPM configuration for different scenarios.
Hope this helps!
cheers,
Prashanth
P.S Please mark helpful answers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Seshu,
Use a BPM to get the files, and check for the condition, and perform the mapping in the transformation step.
cheers,
Prashanth
P.S Please mark helpful answers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Seshu,
I agree with Sriram.Nice to see that your problem finally got solved
cheers,
Prashanth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
one final question: how to map this.. multiple senders
1.
DT_Out_Orders
Orders
Order 1-unbounded
OrderNo
2.
DT_Out_OrdersItems
Items
Item 1-unbounded
OrderNo
Item
Qty
Price
Sender is coming from 2 text files
and need to club them as one file.. i.e orderno should match(from sender files), and one orderno may contain multiple items.
<u>Receiver</u>
DT_In_Bills
Bills
Bill 1-unbounded
RefNo
Item
Amount
thanks
Seshu
Seshu,
Can you explain the requirements further?
Are your Files going to be picked by 2 independent File adapters or the same file adapter?
You can use a single File adapter to pick up multiple Files. See <a href="http://help.sap.com/saphelp_nw04/helpdata/en/3c/b4a6490a08cd41a8c91759c3d2f401/content.htm">Specifying Additional Files</a> in the File adapter for more info.
So, if you can look into the posswiblity of haveing multiple files picked by a single file adapter, then you can avoid a BPM.
File adapter will pick the 2 files, then perfrom the mapping based on the requirements you have and then send out the single message which you want.
Regards,
Bhavesh
Hi Seshu,
It is the header mapping making the difference.
cheers,
Prashanth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Seshu,
The reason for the error that i am going to satae may not be the problem, but still u can try this. Hopefully the error might be resolved.
In the sender adapter, u have mentioned:
Recordset Structure Order,* (This Order does not end with an 's').
But the file that u are passing has the recordset name as 'Orders'.
Try correcting this.
Regards
Neetu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Seshu
Ur original XML has the <recordset> tag which i think you have not removed while doing the content conversion.Actually its no way different from ur new XML tag <ORDERS> except that I think your XML instance you used for testing doesn't reference <Recordset> tag, hence the error..
Got it..
You just try by giving input like this
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_Out_Orders xmlns:ns="URN://Text">
<Orders>
<OrderNo>1211</OrderNo>
<Item>monitor</Item>
<Qty>5</Qty>
<Price>100</Price>
</Orders>
<Orders>
<OrderNo>1213</OrderNo>
<Item>Mouse</Item>
<Qty>5</Qty>
<Price>10</Price>
</Orders>
<Orders>
<OrderNo>1214</OrderNo>
<Item>headphone</Item>
<Qty>90</Qty>
<Price>7</Price>
</Orders>
</ns:MT_Out_Orders>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Seshu,
The problem is the "-" and "+" higlighted below. Remove them and test your scenario.
<i><?xml version="1.0" encoding="utf-8" ?>
<b>-</b> <ns:MT_Out_Orders xmlns:ns="URN://Text">
<b>-</b> <Recordset>
<b>-</b> <Orders>
<OrderNo>1211</OrderNo>
<Item>Monitor</Item>
<Qty>5</Qty>
<Price>1200</Price>
</Orders>
<b>+</b> <Orders>
<OrderNo>1213</OrderNo>
<Item>Mouse</Item>
<Qty>40</Qty>
<Price>10</Price>
</Orders>
<b>-</b> <Orders>
<OrderNo>1214</OrderNo>
<Item>Headphone</Item>
<Qty>90</Qty>
<Price>7</Price>
</Orders>
</Recordset>
</ns:MT_Out_Orders></i>
Regards,
bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Seshu,
As suggested by Bhavesh, problem is with the '+' and '-' which are present in your message.
To avoid this, in your sxmb_moni screen, right click on your message and select view source. Copy, paste the source of your xml file from there in your message mapping.
Regards,
Divija
Message was edited by: Divija KN
Hi Seshu,
Check with all these things ..
1)In the sender file content conversion dont specify any name space name for the "recordset name space" and try the scenario
2)When you pasted the xml check whether you have any spaces before start of the tag <?xml version="1.0" encoding="UTF-8"?>. If YES, remove the space and test your mapping again.
3)Go to the test tab keep values in the fields and then click on XML and cross check this XML with your message in the SXMB_MONI.This is to check if ur XML is formatted well.
Try these out and let me know.
cheers,
Prashanth
P.S Please mark helpful answers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Seshu,
It looks like a mapping error. Please test your mapping in IR with the payload from SXMB_MONI. You can refer michal's weblog for the same.
/people/michal.krawczyk2/blog/2005/09/16/xi-how-to-test-your-mapping-in-real-life-scenarios
cheers,
Prashanth
P.S Please mark helpful answers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
But your post tells me that there is a error in the mapping.
Check your input xml is in valid format ? Because if you copy the xml from SXMB_MONI , you will get - characters.. So it will give error. Delete these and check it.
Refer this to get more.
/people/michal.krawczyk2/blog/2005/09/16/xi-how-to-test-your-mapping-in-real-life-scenarios
Regards,
moorthy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.