Skip to Content
avatar image
Former Member

Special character '#' while reading .TNF file from Application server

Dear All,

I am reading a .TNF file from unix directory but while reading this file into a workarea using open dataset

it is appending '#' after each letter .

Below is the open dataset statement used in my program wherein the code page is fetched

as per the system language using FM NLS_GET_FRONTEND_CP .

OPEN DATASET filename for input in legacy TEXT MODE

code page l_codepage

ignoring conversion errors.

Please help me out if someone has faced a similar issue .

Thanks in Advance.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Mar 17, 2011 at 05:56 AM

    Hi.

    Could this be a UNICODE / NONUNICODE problem? If the file was created with UNICODE mode 2-3 bytes/char) and you read it in NONUNICODE mode you will get the additional unicode bytes as non printable signr "#" ...

    Please check this!

    Regards,

    Klaus

    Edited by: Klaus Babl on Mar 17, 2011 6:56 AM

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Aparna,

      this means that the file is encoded in UTF-16BE (Unicode 16 bit Big Endian). SAP number: 4102.

      It is not foreseen to use this encoding in textual upload in ABAP.

      You can convert the file content with the tools mentioned in

      change-output-codepage-of-bacs-files

      I would recommend to convert from 4102 to 4110 (UTF-8). The resulting file can be uploaded with open dataset in Unicode mode.

      Best regards,

      Nils

  • avatar image
    Former Member
    Apr 06, 2011 at 07:18 PM

    We used this to solve the issue with mixed language characters in an inbound file.

    Current Codepage of Appl. Server 4102

    Codepage of Front End 4110 UTF-8 GUI

    In our ABAP to read files from non-unicode systems that send special characters, we use the following....

    open dataset p_file for input IN LEGACY TEXT MODE BIG ENDIAN CODE PAGE '1100' message lv_mess.

    Hope this helps

    Mike Manke

    Add comment
    10|10000 characters needed characters exceeded