cancel
Showing results for 
Search instead for 
Did you mean: 

How to get rid of Insertion Charactor ""?

Former Member
0 Kudos

Hello,

I have a flat file, like:

"02323";"05";"00";"HV";"Dirk";"Ellinghaus";"19651231";0;1;;25;44;"12";.........

"82344";"05";"00";"HS";"Thomas";"Schmidt";"19730202";0;2;;33;23;"12";.........

.........

some fields with insertion character"" some fields without "".

It is difficult for content conversion.

Recordset.fieldNames ID, ConNo, ParNo, CusNo, ....

Recordset.endSeparator "

Recordset.beginSeparator "

Recordset.fieldSeparator ;

I think it would not be a good idea with Text functions for every field to get rid of insertion characters.

A UDF could be an alternative? How to do it?

Thanks in advance!

Rene

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Rene,

if you want to do that in the mapping, you can use the standard function ReplaceString and just set the third argument to an empty constant.

Regards

Sven

Answers (2)

Answers (2)

Former Member
0 Kudos

ok. thanks!

Former Member
0 Kudos

Hi Dong,

You can remove them while reading the file in file sender communication channel only so taht you dont need to remove them during mapping. Use this parameter (from sap help) in your file sender comm channel:

NameA.enclosureConversion

To remove the delimiter upon transfer, or to replace it with escape characters, enter YES. This is the default value.

To transfer the characters unchanged enter NO.

Note:

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

If the escape character for a quotation mark (u201Cu201C) occurs in the text itself, it is replaced by the quotation mark during the transfer.

Also you have few parameters which you can try with your file. See this parameters in sap help:

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

Regards,

---Satish

Shabarish_Nair
Active Contributor
0 Kudos

there are multiple ways;

1. Use a replaceString function for every field in the message mapping mapping

2. Use a simple java mapping before the original message mapping to remove all " characters

3. Write a module that will remove all " in the adapter itself

Former Member
0 Kudos

Hi, Shabarish,

This ReplaceString works.

However, I prefer your suggestion about Java Mapping or UDF.

I'm new comer to PI, could you give me more details how to do it?

Regards

Kefei

Edited by: Rene Dong on Mar 24, 2010 6:13 PM

Shabarish_Nair
Active Contributor
0 Kudos

There are many blogs available on SDN on java mappings and modules.

Could you please do a search on SDN for the same? (those are the rules of engagement)