cancel
Showing results for 
Search instead for 
Did you mean: 

.csv file having issues

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Monika,

Check the below link. It might help you

http://scn.sap.com/thread/3522564

Regards,

Sudha

Answers (3)

Answers (3)

sahana_ps
Participant
0 Kudos

Hi,

Check this

Former Member
0 Kudos

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.

naveen_chichili
Active Contributor
0 Kudos

Hi Monika,

If you can give fixed field lengths, why cant you try that.

Regards,

Naveen    

former_member192343
Active Contributor
0 Kudos

Hi Monika!

Why can't you change field separator (xml.fieldSeparator - ,) to any other?