Skip to Content
-1

read .csv from server directory

read .csv contents char, dats, unit etc from server directory.

i have using:

OPEN DATASET file FOR INPUT IN TEXT MODE ENCODING DEFAULT.

...

READ DATASET file INTO my_structure.

dump to "read dataset":

exception = CX_SY_CONVERSION_CODEPAGE

During conversion of a text from code page '4110' to code page '4103', one of the following occurred: - Characters were discovered that cannot be displayed in one of the code pages - The conversion could not be performed for some other reason (see below for more details). Excerpt from the source buffer from the first character that could not be converted, displayed in hexadecimal form (with the ASCII characters in brackets): "82 CF 6E 01 00 00 04 05 00 00 13 00 08 02 5B 43 (..n...........[C)" The system was forced to terminate the current ABAP program 'ZTESTPROVA' since the conversion would have produced incorrect data. There are 50 of these non-convertible characters. If this number is 0, the second of the two scenarios described above applies.

thanks

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Nov 11, 2019 at 11:53 AM

    I prefer to read files in BINARY MODE. And later convert if needed to text in specific code page.

    In your case you would read dataset to xstring and after that convert it to string in code page of CSV file. We cannot tell which one, but probably UTF-8 (that depends on the provider who provides/creates that file).

    Handy methods to conversion are in cl_bcs_convert (method xstring to string in this case).

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.