cancel
Showing results for 
Search instead for 
Did you mean: 

File Adapter -- File Format (Mapping Error)

Former Member
0 Kudos

Hi All, am using a file adapter to pick up file using content conversion , but i can see it happens to be mapping error, i have set all in right format but below one thing i cud not understand how to change, as shown bellow.

Test XML format in mapping:

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

<ns0:MT_DMS_FINAL xmlns:ns0="http://dms:scenario">

<Record>

<Row>

<FirstName/>

</Row>

</Record>

</ns0:MT_DMS_FINAL>

actual XML picked up by Sender File Adapter:

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

<ns:MT_DMS_FINAL xmlns:ns="http://dms:scenario">

<Record>

<Row>

<FirstName>296501_000_00</FirstName>

</Row>

</Record>

</ns:MT_DMS_FINAL>

The difference between both is the "ns0" and "ns" , how to make it equal , which part is to be modified to make it equal, kindly revert back with solution.

With regards

Srinivas

Accepted Solutions (0)

Answers (3)

Answers (3)

GabrielSagaya
Active Contributor
0 Kudos

Remove the values from the XML Namespace tab, while creating the Message Type.

Please visit the blog

/people/sameer.shadab/blog/2005/12/05/how-to-remove-namespaces-in-mapping--xi

check your mapping

<MT_DMS_FINAL>

<Record>

<Row>

<FirstName/>

</Row>

</Record>

</MT_DMS_FINAL>

Former Member
0 Kudos

Hi ,

Thx for replies , i followed as shown in above blog and went fine but there is mapping error as shown below,

xml format after pick by sender file adapter

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

<MT_DMS_FINAL>

<Record>

<Row>

<FirstName>296501_000_00</FirstName>

</Row>

</Record>

</MT_DMS_FINAL>

xml file format from test tab in Message mapping

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

<MT_DMS_FINAL>

<Record>

<Row>

<FirstName>296501_000_00</FirstName>

</Row>

</Record>

</MT_DMS_FINAL>

See above xml first statment is different , how to make it equal

Help

Srini

Former Member
0 Kudos

Hello Shrini,

Can you please tell what error you are getting in Message Mapping test?

Thanks,

Mahi

Former Member
0 Kudos

Hi

Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XML Declaration not allowed here.(:main:, row:1, col:8)

thx

Former Member
0 Kudos

HI,

The UTF-8 is default conversion encoding for File Adapter. But I am doubtful if the difference in "utf-8" and "UTF-8" will make any problem. Else Try to give the File Endcoding parameter as utf-8 in communication channel and try once again.

Thanks

swarup

Former Member
0 Kudos

Where exactly can i find this settings in the CC configuration

thx

Srini

Former Member
0 Kudos

let us know where u r getting this error

when u test it urself in the mapping editor

or

when system executes the mapping after picking the file

Former Member
0 Kudos

in the test tab itself.

When i see in the sxmb_moni of XI box the message has been processed sucessfully.

Am wondering how cud there be no message error in SXMB_MONI but there is when it is made to r on test tab

i raised this question nbc i cud not see the target interface message in the target system SXMB_MONI

With regards

Srinivas

Former Member
0 Kudos

in the sxmb_moni go to inbound payload... right click-->view source then copy that payload and test in the mapping editor...

Former Member
0 Kudos

i copied the same , which i pasted above

after doing so i got the error i the test tab

srini

Former Member
0 Kudos

hi,

use the AF_Modules below and try.In the sender side module configuration also the same order.

1.MessageTransformBean -Its the same like FCC.used to convert the text into xml file.

[http://help.sap.com/saphelp_nw04/helpdata/en/24/4cad3baabd4737bab64d0201bc0c6c/content.htm]

2. call sap adapter.

If you got the same error then

2.XMLAnonymizerBean- use this and change your name space which you want.

[http://help.sap.com/saphelp_nw04/helpdata/en/45/d169186a29570ae10000000a114a6b/content.htm]

3.call sap adapter.

*Reward Points if useful*

Regards,

Prakasu.

Edited by: prakasu on May 26, 2008 11:32 AM

Former Member
0 Kudos

Hi,

I think u should change utf-8" to "UTF-8" will make any problem. you can change it in mapping editor..

Regards,

Abid Mazhar

Former Member
0 Kudos

Can you paste content conversion parameters ??

Former Member
0 Kudos

Document Name: MT_DMS_FINAL

Document Namesapcxe : http://dms:scenario

Recordset Name : Record

RecordStructire Structure : Row,*

RecordSet sEQUENCE : Asc

Row.fieldNames FirstName

Row.fieldSeparator ,

Row.processConfiguration FromConfiguration

Row.endSeperator 'nl'

xml:

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

<ns0:MT_DMS_FINAL xmlns:ns0="http://dms:scenario">

<Record>

<Row>

<FirstName>2332_454_rtr</FirstName>

</Row>

</Record>

</ns0:MT_DMS_FINAL>

************************************************************************

file content :

wewewe_3434_rtrrt (Only one content)

former_member184619
Active Contributor
0 Kudos

Hi Venkat,

just check the content conversion parameter:

Row.processConfiguration FromConfiguration

it should be.

Row.processFieldNames fromConfiguration

and also

Row.endSeperator 'nl'

it should be

Row.endSeparator 'nl'

Regards,

Sachin

Former Member
0 Kudos

Hi,

The difference between both is the "ns0" and "ns" , how to make it equal , which part is to be modified to make it equal, kindly revert back with solution

There is no need to make them equal, the error is not due difference between "ns0" and "ns".

ns0 is due to occurrences u mention in message mapping.

and in your configuration

check Row.endSeparator 'nl'

I think with the configuration and mapping u will not get any error. If u have any error u can copy it.

Regards,

Pradeep A.

Edited by: Pradeep Amisagadda on May 20, 2008 9:25 AM

Former Member
0 Kudos

U need to remove all the spaces before u begin the first statement in XML.

regards

chandrakanth

Former Member
0 Kudos

Halo,

thanks for reply,

Where to remove the space, i donot get it whart u replied back.Kindly elobrate.

with regards

Srinivas

Former Member
0 Kudos

If u ask me about the file content , it has only one record that has to be put in to XML,and it starts immeditaely with no space

regards

Srinivas