on 01-02-2007 2:45 PM
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
Hello Sree,
Please try this Conversion.
RecordStructure: RECORD,ROW
ROW.addHeaderLine 0
ROW.fieldSeparator |
RECORD.fiieldSeparator 'nl'
ROW.endSeparator 'nl'.
Regards,
SriHari.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
Please can you try with ;
Recordset Structure : Row
regards
vijaya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
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
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
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
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
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.