on 05-28-2014 8:32 AM
Hi folks,
I have a proxy to file(SFTP) interface.
I need to generate a .csv file. I am using the module localejbs/AF_Modules/MessageTransformBean.
Parameters: Transform.Class - com.sap.aii.messaging.adapter.Conversion
Transform.ContentType - text/plain;charset=utf-8
xml.addHeaderLine - 1
xml.conversionType - SimpleXML2Plain
xml.endSeparator - 'nl'
xml.fieldSeparator - ,
xml.recordsetStructure - Header,Record
.csv file is generating but in case if the data in the single field has commas like address field has Room 100, Estates LA, Fanyu
then in the file instead of coming in the single field address comes in three different fields and due to this the whole record moves forward.
Kindly guide on the same which step to include.
Currently I have convered , to - in the mapping by writing a UDF. But this is a temporary solution as I am manipulating the data.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi all,
Thanks for the inputs.
The issue is now resolved.
I had amended the " before and after the field in the mapping by writing a simple udf.
str = '"' + str + '"';
return str;
The csv file is now generating properly.
Since the file has to open as an excel file other options like fixed field lengths and having a different delimiter that , were not working properly.
This approach works perfectly.
Hi Monika,
If you can give fixed field lengths, why cant you try that.
Regards,
Naveen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Monika!
Why can't you change field separator (xml.fieldSeparator - ,) to any other?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.