cancel
Showing results for 
Search instead for 
Did you mean: 

File Content Conversion -All the input content was not shown in output file

Former Member
0 Kudos

Hi Experts,

In my scenario, I need to send data from .XML file to .txt file, using File Content Conversion at Receiver communication channel. This is File to File scenario.

This is my Input xml file.

<ns:FILEINPUT_MT xmlns:ns="http://File2FileTest">

<RECORD>

<Row>

<FirstName>Susie</FirstName>

<LastName>Tony</LastName>

<City>London</City>

<Country>UK</Country>

</Row>

</RECORD>

</ns:FILEINPUT_MT>

<b>Processing Parameters</b>

Target Directory = C:/Test

File Name Scheme = xi_output.txt

File Construction Mode = Add Time Stamp

File Type = Binary

<b>Content Conversion Parameters</b>

Recordset Structure : RECORD

RECORD.endSeparator = ‘nl’

RECORD.fieldSeparator = ;

After ‘Activate’ and providing the input xml file, xi_output.txt file was generated. But the file content was shown only with ‘Susie’ i.e. with First Name only. I need xi_output.txt file should have all the four fields (FirstName, LastName, City, Country)

Could some one help me to resolve the issue?

Thanks in advance

Sree

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hello Sree,

Please try this Conversion.

RecordStructure: RECORD,ROW

ROW.addHeaderLine 0

ROW.fieldSeparator |

RECORD.fiieldSeparator 'nl'

ROW.endSeparator 'nl'.

Regards,

SriHari.

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

The Receiver File adapter does not support this hiearchy for content conversion.

You can change your target datatype as follows,

<ns:FILEINPUT_MT xmlns:ns="http://File2FileTest">
<RECORD>
<FirstName>Susie</FirstName>
<LastName>Tony</LastName>
<City>London</City>
<Country>UK</Country>
</RECORD>
</ns:FILEINPUT_MT>

And now the content conversion will be,

RecordsetStrucutre : RECORD

RECORD.endSeparator = ‘nl’
RECORD.fieldSeparator = ;

Regards

Bhavesh

Former Member
0 Kudos

Hi Bhavesh,

Thank you for giving the solution.

As you mentioned, I updated the Data Type and message mapping accordingly.

After activation, the xi_output.txt file was shown with all the input data.

But in the weblog which was given by Arpith Seth, it was mentioned that File Receiver with content conversion supports Hirerachy also. Please check the weblog https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1779. [original link is broken] [original link is broken] [original link is broken] [original link is broken]

Please correct me, if I am wrong.

Anyway, thank you so much for your solution.

..Sree

Former Member
0 Kudos

Check these blogs...Might help you.

/people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1

/people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2

/people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30

/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file

/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion

/people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter

/people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns

/people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem

/people/sap.user72/blog/2005/01/06/how-to-process-csv-data-with-xi-file-adapter

/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter

Link for SAP Help

http://help.sap.com/saphelp_nw2004s/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm

Former Member
0 Kudos

Hey Sree,

Why dont you try the content conversion given in

/people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2

I guess you will figure out yor mistake after having a look at this weblog

Thanks,

Pooja

Former Member
0 Kudos

Hi Pooja,

Thanks for sending the link.

I had tried with the Row.fieldNames and values as "FirstName,LastName,City,Country".. Still the xi_output.txt file was shown only data as FirstName.

Sree

Former Member
0 Kudos

Hi ,

Please can you try with ;

Recordset Structure : Row

regards

vijaya

Former Member
0 Kudos

Hi Vijaya,

I had tried with Recordset Structure as 'Row', still the same result was shown in xi_output.txt file i.e. only FirstName was shown instead of all Four fields. Is there any other option?

Thanks

Sree

Former Member
0 Kudos

Sree,

Try by adding Row.fieldNames in the sender communicaiton channel and check.

---Satish

Former Member
0 Kudos

Hi Satish,

I had tried with Row.fieldNames in Receiver Communication channel. Still the FirstName data was only shown in xi_output.txt file.

But you said that try with Row.fieldName in Sender Communication channel. Actually my scenario is related with the sending input data by using XML file to output file(.txt format). I think, at receiver side i.e in Receiver Communication channel.. I need to use the File Content Conversion option. So Row.fieldNames would be fine to use (in Content Conversion Parameters).

Please correct me, if i am wrong.

Thanks

Sree

Former Member
0 Kudos

Sree,

I am sorry. I have thought you are reading a text file. If it is xml then thats fine. We dont need to give this option.

Also this is optional in receiver comm. channel. By the way have the tested the XML file in Message Mapping. When you test in message mapping are you getting all the fileds in the target. Please check this first. If it is yes then there is a problem with content conversion.

---Satish

Former Member
0 Kudos

Satish,

Message Mapping is working fine. I had tested by providing sample data and it was Executed Successfully. As you said, there would be a some problem with Content Conversion parameters.

I also tried with following options.

Recordset Structure = FILEINPUT_MT

FILEINPUT_MT.fieldSeparator = ,

FILEINPUT_MT.fieldSeparator = 'nl'

after providing above options also, the xi_output.txt file was generated with only data as FirstName.

..Sree

Former Member
0 Kudos

Hi,

Sorry about repeating myself but can you try

Recordset Structure : Row

Row.endSeparator = ‘nl’

Row.fieldSeparator = ;

After this in the Integration directory

environment -->Cache Notification

or try creating one communication channel with the same parameter and see if it works

Regards

vijaya

Former Member
0 Kudos

Vijaya,

I had tried with Recordset Structure as 'Row',

Row.endSeparator = ‘nl’

Row.fieldSeparator = ;

But, as a beginner to XI, I did not understand what to do in Environment --> 'Cache Notification'. Could you please explain, how to proceed with steps.(with respect to Cache Notification)

Thanks.

..Sree

Former Member
0 Kudos

Sree,

She is talking about clearing the cache contents. click on Environment --> Clear Cache Notification --> Press Yes

This clears the cache. After clearing the cache you rerun your scenario once again. If this dont solve your issue please send me your mapping screen shot, comm. channel screen shot to my mail id which is in my Business card.

---Satish

Former Member
0 Kudos

Satish,

Thank you for the info about Clear Cache Notification. I did the Clear Cache.

..Sree