Skip to Content
avatar image
Former Member

How to get rid of Insertion Charactor ""?

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Mar 24, 2010 at 04:39 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 24, 2010 at 04:51 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 24, 2010 at 05:15 PM

    ok. thanks!

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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