cancel
Showing results for 
Search instead for 
Did you mean: 

File Content Conversion---> Removing Quotations from csv file

Former Member
0 Kudos

I have a csv file in the folowing format:

field1,field2,field3,field4

"111","222","333","444"

"aaa","bbb","ccc","ddd"

Suppose the header name is row in IR.

While configuring the sender file adapter in XI, i have given following parameters under file content conversion.

row.fieldNames=field1,field2,field3,field4

row.fieldSeparator=","

row.processFieldNames=fromConfiguration

row.beginSeparator="

After picking up the XML file XI processes the data so that we have out put as

row

field1 111

field2 222

field3 333

field4 444"

row

row

field1 aaa

field2 bbb

field3 ccc

field4 ddd"

row

My Problem is what parameter should I add in ID to remove this last quote say 444" and ddd" from the XML message ????

I tried using

row.endSeparator=" but it is still giving the same output.

Can anyone help ????????????????????????

Accepted Solutions (1)

Accepted Solutions (1)

santhosh_kumarv
Active Contributor
0 Kudos

Hi,

Try this FCC instead

row.fieldNames=field1,field2,field3,field4

row.fieldSeparator=,

row.processFieldNames=fromConfiguration

row.enclosureSign=u201C

row.enclosureSignEsc=u201Cu201C

row.endSeparator='nl'

http://help.sap.com/saphelp_NW04/helpdata/en/e3/94007075cae04f930cc4c034e411e1/frameset.htm

If you specify xml.enclosureSign=u201C and xml.enclosureSignEsc=u201Cu201C, text enclosed in quotation marks is transferred unchanged and the quotation marks are removed.

Thanks

SaNv...

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi,

I also faced the same issue long time back. I used the given below parameters.

row.fieldNames=field1,field2,field3,field4

row.fieldSeparator= , -


dont use row.fieldSeparator=","

row.processFieldNames=fromConfiguration

row.beginSeparator="

Regards,

Narendra Goyal

Former Member
0 Kudos

Hi Dear,

I tried with both these options "0x22" and "0xHH" but no success with either of them.

The prblem is with quotes appearing in the last field for every row.

Can there be any field specific operations instead of row specific operations, that we can use to remove quotes from the last field???

It will be a workaround but useful for short term

Former Member
0 Kudos

Hi I had the similar issue but I fixed it with the following

priceDetails.fieldNames=field1,field2,field3

priceDetails.fieldSeparator=,

priceDetails.enclosureSign="

No need to specify the beginSeparator but just specify the enclosureSign that should solve your issue for the same.

Former Member
0 Kudos

Hi Friends,

I tried out defferent options suggested by you, but i ended up from where i started. Please find my concerns:

1- row.endSeparator="0xHH" seemed to be a good one but didn;t work. I also tried with removing the quotes from this but ended up with same old results

2- field.fieldFixedLengths= 3 I did n't use this one because in the realtime scenerio, this field is not of fixed length

3-row.endSeparator=" I have already used this but ended up nowhere

Any more suggestions???????????

Guys, I do not wanna use any java defined function here as it has to be applied for all the fields and will increease the effort.

Former Member
0 Kudos

Hi

I hope u gave the end separetor as "0x22" for double quotes and not as "oxHH"

Regards

krishna

santhosh_kumarv
Active Contributor
0 Kudos

Try this.

Just add a endseparator in additional to the FCC u sepcified earlier

row.fieldNames=field1,field2,field3,field4

row.fieldSeparator=","

row.processFieldNames=fromConfiguration

row.beginSeparator="

row.endSeparator="

Thanks

SaNv...

Former Member
0 Kudos

Hi,

Thanks for the prompt reply.

I tried the configuration suggested by you but it messed up the things a little more.

Got the following output:

row

field1 "111"

field2 "222"

field3 "333"

field4 "444"

row

row

field1 "aaa"

field2 "bbb"

field3 "ccc"

field4 "ddd"

row

Can you suggest some different configuration??????

Former Member
0 Kudos

hey

can u try typing the hexadecimal value for quotes in the separator like

row.endSeparator="0xHH"

regards

krishna

Former Member
0 Kudos

let field value come with Quotes...in mapping you can use replaceString function to replace " with nothing

3 inputs to replaceString std function..

1 - input string

2 - "

3 - constant ..dont specify any value for constant....

Former Member
0 Kudos

hi

u can try giving

field.fieldFixedLengths= 3

Mugdhas suggestion is alternate way to counter this issue

Good Luck

krishna